1. Nov 03, 2020
  2. Nov 02, 2020
  3. Oct 29, 2020
  4. Oct 28, 2020
    • Sergey Pepyakin's avatar
      let go fees (#1867) · 11df6f86
      Sergey Pepyakin authored
      11df6f86
    • Sergey Pepyakin's avatar
      Downward Message Processing implementation (#1859) · ed759c75
      Sergey Pepyakin authored
      * DMP: data structures and plumbing
      
      * DMP: Implement DMP logic in the router module
      
      DMP: Integrate DMP parts into the inclusion module
      
      * DMP: Introduce the max size limit for the size of a downward message
      
      * DMP: Runtime API for accessing inbound messages
      
      * OCD
      
      Small clean ups
      
      * DMP: fix the naming of the error
      
      * DMP: add caution about a non-existent recipient
      ed759c75
  5. Oct 24, 2020
    • Sergey Pepyakin's avatar
      Runtime API for checking validation outputs (#1842) · 4a17a2bc
      Sergey Pepyakin authored
      * annoying whitespaces
      
      * update guide
      
      Add `CheckValidationOutputs` runtime api and also change the
      candidate-validation stuff
      
      * promote ValidationOutputs to global primitives
      
      i.e. move it from node specific primitives to global v1 primitives. This
      will be needed when we share it later in the runtime inclusion module
      
      * refactor acceptance checks in the inclusion module
      
      factor out the common code to share it during the block inclusion and
      for the forthcoming CheckValidationOutputs runtime api.
      
      Also note that the acceptance criteria was updated to incorporate checks
      that exist now in candidate-validation
      
      * plumb the runtime api outside
      
      * extract validation_data from ValidationOutputs
      
      * use runtime-api to check validation outputs
      
      apart from that refactor, update docs and tidy a bit
      
      * Update the maxium code size
      
      This is to fix a test that performs an upgrade.
      4a17a2bc
  6. Oct 09, 2020
    • Rakan Alhneiti's avatar
      Update to work with async keystore – Companion PR for #7000 (#1740) · bc7d1322
      Rakan Alhneiti authored
      
      
      * Fix keystore types
      
      * Use SyncCryptoStorePtr
      
      * Borrow keystore
      
      * Fix unused imports
      
      * Fix polkadot service
      
      * Fix bitfield-distribution tests
      
      * Fix indentation
      
      * Fix backing tests
      
      * Fix tests
      
      * Fix provisioner tests
      
      * Removed SyncCryptoStorePtr
      
      * Fix services
      
      * Address PR feedback
      
      * Address PR feedback - 2
      
      * Update CryptoStorePtr imports to be from sp_keystore
      
      * Typo
      
      * Fix CryptoStore import
      
      * Document the reason behind using filesystem keystore
      
      * Remove VALIDATORS
      
      * Fix duplicate dependency
      
      * Mark sp-keystore as optional
      
      * Fix availability distribution
      
      * Fix call to sign_with
      
      * Fix keystore usage
      
      * Remove tokio and fix parachains Cargo config
      
      * Typos
      
      * Fix keystore dereferencing
      
      * Fix CryptoStore import
      
      * Fix provisioner
      
      * Fix node backing
      
      * Update services
      
      * Cleanup dependencies
      
      * Use sync_keystore
      
      * Fix node service
      
      * Fix node service - 2
      
      * Fix node service - 3
      
      * Rename CryptoStorePtr to SyncCryptoStorePtr
      
      * "Update Substrate"
      
      * Apply suggestions from code review
      
      * Update node/core/backing/Cargo.toml
      
      * Update primitives/src/v0.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Fix wasm build
      
      * Update Cargo.lock
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      bc7d1322
  7. Oct 06, 2020
    • ordian's avatar
      NetworkBridge: validator (authorities) discovery api (#1699) · b84f3c03
      ordian authored
      
      
      * stupid, but it compiles
      
      * redo
      
      * cleanup
      
      * add ValidatorDiscovery to msgs
      
      * sketch network bridge code
      
      * ConnectToAuthorities instead of validators
      
      * more stuff
      
      * cleanup
      
      * more stuff
      
      * complete ConnectToAuthoritiesState
      
      * Update node/network/bridge/src/lib.rs
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * Collator protocol subsystem (#1659)
      
      * WIP
      
      * The initial implementation of the collator side.
      
      * Improve comments
      
      * Multiple collation requests
      
      * Add more tests and comments to validator side
      
      * Add comments, remove dead code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * Fix build after suggested changes
      
      * Also connect to the next validator group
      
      * Remove a Future impl and move TimeoutExt to util
      
      * Minor nits
      
      * Fix build
      
      * Change FetchCollations back to FetchCollation
      
      * Try this
      
      * Final fixes
      
      * Fix build
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * handle multiple in-flight connection requests
      
      * handle cancelled requests
      
      * Update node/core/runtime-api/src/lib.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * redo it again
      
      * more stuff
      
      * redo it again
      
      * update comments
      
      * workaround Future is not Send
      
      * fix trailing spaces
      
      * clarify comments
      
      * bridge: fix compilation in tests
      
      * update more comments
      
      * small fixes
      
      * port collator protocol to new validator discovery api
      
      * collator tests compile
      
      * collator tests pass
      
      * do not revoke a request when the stream receiver is closed
      
      * make revoking opt-in
      
      * fix is_fulfilled
      
      * handle request revokation in collator
      
      * tests
      
      * wait for validator connections asyncronously
      
      * fix compilation
      
      * relabel my todos
      
      * apply Fedor's patch
      
      * resolve reconnection TODO
      
      * resolve revoking TODO
      
      * resolve channel capacity TODO
      
      * resolve peer cloning TODO
      
      * resolve peer disconnected TODO
      
      * resolve PeerSet TODO
      
      * wip tests
      
      * more tests
      
      * resolve Arc TODO
      
      * rename pending to non_revoked
      
      * one more test
      
      * extract utility function into util crate
      
      * fix compilation in tests
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      
      * revert pin_project removal
      
      * fix while let loop
      
      * Revert "revert pin_project removal"
      
      This reverts commit ae7f529d
      
      .
      
      * fix compilation
      
      * Update node/subsystem/src/messages.rs
      
      * docs on pub items
      
      * guide updates
      
      * remove a TODO
      
      * small guide update
      
      * fix a typo
      
      * link to the issue
      
      * validator discovery: on_request docs
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      b84f3c03
    • Bastian Köcher's avatar
      Make collation an optional return (#1787) · ce0fa3ad
      Bastian Köcher authored
      This pr changes the collator interface function to return an optional
      collation instead of a collation. This is required as the parachain
      itself can fail to generate a valid collation for various reason. Now if
      the collation fails it will return `None`.
      
      Besides that the pr adds some `RuntimeDebug` derive for `ValidationData`
      and removes some whitespaces.
      ce0fa3ad
  8. Aug 18, 2020
    • asynchronous rob's avatar
      Implement validation data refactor (#1585) · 8c881e45
      asynchronous rob authored
      
      
      * update primitives
      
      * correct parent_head field
      
      * make hrmp field pub
      
      * refactor validation data: runtime
      
      * refactor validation data: messages
      
      * add arguments to full_validation_data runtime API
      
      * port runtime API
      
      * mostly port over candidate validation
      
      * remove some parameters from ValidationParams
      
      * guide: update candidate validation
      
      * update candidate outputs
      
      * update ValidationOutputs in primitives
      
      * port over candidate validation
      
      * add a new test for no-transient behavior
      
      * update util runtime API wrappers
      
      * candidate backing
      
      * fix missing imports
      
      * change some fields of validation data around
      
      * runtime API impl
      
      * update candidate validation
      
      * fix backing tests
      
      * grumbles from review
      
      * fix av-store tests
      
      * fix some more crates
      
      * fix provisioner tests
      
      * fix availability distribution tests
      
      * port collation-generation to new validation data
      
      * fix overseer tests
      
      * Update roadmap/implementers-guide/src/node/utility/candidate-validation.md
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      8c881e45
  9. Aug 17, 2020
  10. Aug 13, 2020
    • asynchronous rob's avatar
      Remove v0 parachains runtime (#1501) · ae5990c7
      asynchronous rob authored
      * remove v0 parachains modules and switch to v1 primitives
      
      * get tests compiling for runtime-common
      
      * remove registrar module
      
      * Add a dummy module
      
      * remove runtime-parachains
      
      * mostly remove old parachains code from polkadot-runtime
      
      * remove slots::Trait implementation
      
      * remove sp_std prelude import
      
      * add a ZeroSizedTypeDifferentiator to dummy
      
      * finish porting over polkadot runtime
      
      * ZeroSizedTypeDifferentiator was actually unnecessary
      
      * westend
      
      * kusama
      
      * test-runtime (no dummy modules)
      
      * fix warning
      
      * fix chain-specs
      
      * fix test-service
      
      * test-client
      
      * remove dead import
      
      * remove unused needed_extrinsics parameter
      
      * runtimes compile
      
      * remove rococo-v0
      
      * remove remaining references to Rococo
      
      * bump versions
      ae5990c7
  11. Aug 10, 2020
  12. Aug 06, 2020
    • Peter Goodspeed-Niklaus's avatar
      implement provisioner (#1473) · a39d8803
      Peter Goodspeed-Niklaus authored
      * sketch out provisioner basics
      
      * handle provisionable data
      
      * stub out select_inherent_data
      
      * split runtime APIs into sub-chapters to improve linkability
      
      * explain SignedAvailabilityBitfield semantics
      
      * add internal link to further documentation
      
      * some more work figuring out how the provisioner can do its thing
      
      * fix broken link
      
      * don't import enum variants where it's one layer deep
      
      * make request_availability_cores a free fn in util
      
      * document more precisely what should happen on block production
      
      * finish first-draft implementation of provisioner
      
      * start working on the full and proper backed candidate selection rule
      
      * Pass number of block under construction via RequestInherentData
      
      * Revert "Pass number of block under construction via RequestInherentData"
      
      This reverts commit 850fe62c.
      
      That initially looked like the better approach--it spent the time
      budget for fetching the block number in the proposer, instead of
      the provisioner, and that felt more appropriate--but it turns out
      not to be obvious how to get the block number of the block under
      construction from within the proposer. The Chain API may be less
      ideal, but it should be easier to implement.
      
      * wip: get the block under production from the Chain API
      
      * add ChainApiMessage to AllMessages
      
      * don't break the run loop if a provisionable data channel closes
      
      * clone only those backed candidates which are coherent
      
      * propagate chain_api subsystem through various locations
      
      * add delegated_subsystem! macro to ease delegating subsystems
      
      Unfortunately, it doesn't work right:
      
      ```
      error[E0446]: private type `CandidateBackingJob` in public interface
         --> node/core/backing/src/lib.rs:775:1
          |
      86  | struct CandidateBackingJob {
          | - `CandidateBackingJob` declared as private
      ...
      775 | delegated_subsystem!(CandidateBackingJob as CandidateBackingSubsystem);
          | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
      ```
      
      I'm not sure precisely what's going wrong, here; I suspect the problem is
      the use of `$job as JobTrait>::RunArgs` and `::ToJob`; the failure would be
      that it's not reifying the types to verify that the actual types are public,
      but instead referring to them via `CandidateBackingJob`, which is in fact private;
      that privacy is the point.
      
      Going to see if I can generic my way out of this, but we may be headed for a
      quick revert here.
      
      * fix delegated_subsystem
      
      The invocation is a bit more verbose than I'd prefer, but it's also
      more explicit about what types need to be public. I'll take it as a win.
      
      * add provisioning subsystem; reduce public interface of provisioner
      
      * deny missing docs in provisioner
      
      * refactor core selection per code review suggestion
      
      This is twice as much code when measured by line, but IMO it is
      in fact somewhat clearer to read, so overall a win.
      
      Also adds an improved rule for selecting availability bitfields,
      which (unlike the previous implementation) guarantees that the
      appropriate postconditions hold there.
      
      * fix bad merge double-declaration
      
      * update guide with (hopefully) complete provisioner candidate selection procedure
      
      * clarify candidate selection algorithm
      
      * Revert "clarify candidate selection algorithm"
      
      This reverts commit c68a02ac.
      
      * clarify candidate selection algorithm
      
      * update provisioner to implement candidate selection per the guide
      
      * add test that no more than one bitfield is selected per validator
      
      * add test that each selected bitfield corresponds to an occupied core
      
      * add test that more set bits win conflicts
      
      * add macro for specializing runtime requests; specailize all runtime requests
      
      * add tests harness for select_candidates tests
      
      * add first real select_candidates test, fix test_harness
      
      * add mock overseer and test that success is possible
      
      * add test that the candidate selection algorithm picks the right ones
      
      * make candidate selection test somewhat more stringent
      a39d8803
  13. Jul 31, 2020
    • Fedor Sakharov's avatar
      Parachains-runtime (#1505) · eca01a8c
      Fedor Sakharov authored
      * Initial commit
      
      * v0 to v1 primitives and remove attestations
      
      * Review fixes
      
      * implement candidate_events
      
      * remove dead code
      eca01a8c
  14. Jul 30, 2020
    • asynchronous rob's avatar
      Implement the Runtime API subsystem (#1494) · f772196f
      asynchronous rob authored
      * type defaults for ParachainHost
      
      * add ValidationCode message
      
      * implement core loop of runtime API subsystem
      
      * subsystem trait implementation for runtime API subsystem
      
      * implement a mock runtime API
      
      * some tests that ensure requests are forwarded to runtime API correctly
      
      * fix dependency grumbles
      
      * improve RuntimeApiError API
      f772196f
  15. Jul 23, 2020
    • asynchronous rob's avatar
      Include a reference to the validation data in the candidate descriptor (#1442) · cce0a950
      asynchronous rob authored
      * rename GlobalValidationSchedule to GlobalValidationData
      
      * guide: update candidate descriptor to contain validation data hash
      
      * guide: add note in inclusion module about checking validation data hash
      
      * primitives: update CandidateDescriptor to contain new hash
      
      * fix payload computation
      
      * add helpers for computing validation data to runtime modules
      
      * guide: note routines
      
      * inclusion: check validation data hash and fix local_validation_data bug
      
      * add a case to candidate_checks and improve that test substantially
      
      * bump versions
      
      * address review comments
      
      * add a test for including code upgrade
      
      * bump kusama version
      
      * bump westend & polkadot versions
      cce0a950
  16. Jul 18, 2020
    • asynchronous rob's avatar
      Implement Runtime APIs (#1411) · 5d7142f1
      asynchronous rob authored
      * create a README on Runtime APIs
      
      * add ParaId type
      
      * write up runtime APIs
      
      * more preamble
      
      * rename
      
      * rejig runtime APIs
      
      * add occupied_since to `BlockNumber`
      
      * skeleton crate for runtime API subsystem
      
      * improve group_for_core
      
      * improve docs on availability cores runtime API
      
      * guide: freed -> free
      
      * add primitives for runtime APIs
      
      * create a v1 ParachainHost API trait
      
      * guide: make validation code return `Option`al.
      
      * skeleton runtime API helpers
      
      * make parachain-host runtime-generic
      
      * skeleton for most runtime API implementation functions
      
      * guide: add runtime API helper methods
      
      * implement new helpers of the inclusion module
      
      * guide: remove retries check, as it is unneeded
      
      * implement helpers for scheduler module for Runtime APIs
      
      * clean up `validator_groups` implementation
      
      * implement next_rotation_at and last_rotation_at
      
      * guide: more helpers on GroupRotationInfo
      
      * almost finish implementing runtime APIs
      
      * add explicit block parameter to runtime API fns
      
      * guide: generalize number parameter
      
      * guide: add group_responsible to occupied-core
      
      * update primitives due to guide changes
      
      * finishing touches on runtime API implementation; squash warnings
      
      * break out runtime API impl to separate file
      
      * add tests for next_up logic
      
      * test group rotation info
      
      * point to filed TODO
      
      * remove unused TODO [now]
      
      * indentation
      
      * guide: para -> para_id
      
      * rename para field to para_id for core meta
      
      * remove reference to outdated AvailabilityCores type
      
      * add an event in `inclusion` for candidates being included or timing out
      
      * guide: candidate events
      
      * guide: adjust language
      
      * Candidate events type from guide and adjust inclusion event
      
      * implement `candidate_events` runtime API
      
      * fix runtime test compilation
      
      * max -> min
      
      * fix typos
      
      * guide: add `RuntimeAPIRequest::CandidateEvents`
      5d7142f1
  17. Jul 10, 2020
    • asynchronous rob's avatar
      Refactor primitives (#1383) · 96af6ead
      asynchronous rob authored
      * create a v1 primitives module
      
      * Improve guide on availability types
      
      * punctuate
      
      * new parachains runtime uses new primitives
      
      * tests of new runtime now use new primitives
      
      * add ErasureChunk to guide
      
      * export erasure chunk from v1 primitives
      
      * subsystem crate uses v1 primitives
      
      * node-primitives uses new v1 primitives
      
      * port overseer to new primitives
      
      * new-proposer uses v1 primitives (no ParachainHost anymore)
      
      * fix no-std compilation for primitives
      
      * service-new uses v1 primitives
      
      * network-bridge uses new primitives
      
      * statement distribution uses v1 primitives
      
      * PoV distribution uses v1 primitives; add PoV::hash fn
      
      * move parachain to v0
      
      * remove inclusion_inherent module and place into v1
      
      * remove everything from primitives crate root
      
      * remove some unused old types from v0 primitives
      
      * point everything else at primitives::v0
      
      * squanch some warns up
      
      * add RuntimeDebug import to no-std as well
      
      * port over statement-table and validation
      
      * fix final errors in validation and node-primitives
      
      * add dummy Ord impl to committed candidate receipt
      
      * guide: update CandidateValidationMessage
      
      * add primitive for validationoutputs
      
      * expand CandidateValidationMessage further
      
      * bikeshed
      
      * add some impls to omitted-validation-data and available-data
      
      * expand CandidateValidationMessage
      
      * make erasure-coding generic over v1/v0
      
      * update usages of erasure-coding
      
      * implement commitments.hash()
      
      * use Arc<Pov> for CandidateValidation
      
      * improve new erasure-coding method names
      
      * fix up candidate backing
      
      * update docs a bit
      
      * fix most tests and add short-circuiting to make_pov_available
      
      * fix remainder of candidate backing tests
      
      * squanching warns
      
      * squanch it up
      
      * some fallout
      
      * overseer fallout
      
      * free from polkadot-test-service hell
      96af6ead
  18. Jul 09, 2020
    • Fedor Sakharov's avatar
      CandidateBackingSubsystem (#1312) · 6aa5bfba
      Fedor Sakharov authored
      * Updates guide for CandidateBacking
      
      * Move assignment types to primitives
      
      * Initial implementation.
      
      * More functionality
      
      * use assert_matches
      
      * Changes to report misbehaviors
      
      * Some fixes after a review
      
      * Remove a blank line
      
      * Update guide and some types
      
      * Adds run_job function
      
      * Some comments and refactorings
      
      * Fix review
      
      * Remove warnings
      
      * Use summary in kicking off validation
      
      * Parallelize requests
      
      * Validation provides local and global validation params
      
      * Test issued validity tracking
      
      * Nits from review
      6aa5bfba
  19. Jul 08, 2020
    • asynchronous rob's avatar
      Implement PoV Distribution Subsystem (#1344) · b651e4af
      asynchronous rob authored
      * introduce candidatedescriptor type
      
      * add PoVDistribution message type
      
      * loosen bound on PoV Distribution to account for equivocations
      
      * re-export some types from the messages module
      
      * begin PoV Distribution subsystem
      
      * remove redundant index from PoV distribution
      
      * define state machine for pov distribution
      
      * handle overseer signals
      
      * set up control flow
      
      * remove `ValidatorStatement` section
      
      * implement PoV fetching
      
      * implement distribution logic
      
      * add missing `
      
      * implement some network bridge event handlers
      
      * stub for message processing, handle our view change
      
      * control flow for handling messages
      
      * handle `awaiting` message
      
      * handle any incoming PoVs and redistribute
      
      * actually provide a subsystem implementation
      
      * remove set-builder notation
      
      * begin testing PoV distribution
      
      * test that we send awaiting messages only to peers with same view
      
      * ensure we distribute awaited PoVs to peers on view changes
      
      * test that peers can complete fetch and are rewarded
      
      * test some reporting logic
      
      * ensure peer is reported for flooding
      
      * test punishing peers diverging from awaited protocol
      
      * test that we eagerly complete peers' awaited PoVs based on what we receive
      
      * test that we prune the awaited set after receiving
      
      * expand pov-distribution in guide to match a change I made
      
      * remove unneeded import
      b651e4af
  20. Jul 07, 2020
  21. Jul 06, 2020
    • asynchronous rob's avatar
      Implement the Statement Distribution Subsystem (#1326) · 8348cc4c
      asynchronous rob authored
      * set up data types and control flow for statement distribution
      
      * add some set-like methods to View
      
      * implement sending to peers
      
      * start fixing equivocation handling
      
      * Add a section to the statement distribution subsystem on equivocations and flood protection
      
      * fix typo and amend wording
      
      * implement flood protection
      
      * have peer knowledge tracker follow when peer first learns about a candidate
      
      * send dependents after circulating
      
      * add another TODO
      
      * trigger send in one more place
      
      * refactors from review
      
      * send new statements to candidate backing
      
      * instantiate active head data with runtime API values
      
      * track our view changes and peer view changes
      
      * apply a benefit to peers who send us statements we want
      
      * remove unneeded TODO
      
      * add some comments and improve Hash implementation
      
      * start tests and fix `note_statement`
      
      * test active_head seconding logic
      
      * test that the per-peer tracking logic works
      
      * test per-peer knowledge tracker
      
      * test that peer view updates lead to messages being sent
      
      * test statement circulation
      
      * address review comments
      
      * have view set methods return references
      8348cc4c
  22. Jul 05, 2020
    • Peter Goodspeed-Niklaus's avatar
      implement custom proposer (#1320) · 69ce9ff3
      Peter Goodspeed-Niklaus authored
      
      
      * network bridge skeleton
      
      * move some primitives around and add debug impls
      
      * protocol registration glue & abstract network interface
      
      * add send_msgs to subsystemctx
      
      * select logic
      
      * transform different events into actions and handle
      
      * implement remaining network bridge state machine
      
      * start test skeleton
      
      * make network methods asynchronous
      
      * extract subsystem out to subsystem crate
      
      * port over overseer to subsystem context trait
      
      * fix minimal example
      
      * fix overseer doc test
      
      * update network-bridge crate
      
      * write a subsystem test-helpers crate
      
      * write a network test helper for network-bridge
      
      * set up (broken) view test
      
      * Revamp network to be more async-friendly and not require Sync
      
      * fix spacing
      
      * fix test compilation
      
      * insert side-channel for actions
      
      * Add some more message types to AllMessages
      
      * introduce a test harness
      
      * impl ProvideInherent for InclusionInherent
      
      * reduce import churn; correct expect message
      
      * move inclusion inherent identifier into primitives
      
      It's not clear precisely why this is desired, but it's a pattern
      I've seen in several places, so I'm going this to be on the
      safe side. Worst case, we can revert this commit pretty easily.
      
      * bump kusama spec_version to placate CI
      
      * copy sc_basic_authorship::{ProposerFactory, Proposer}
      
      We have from the problem description:
      
      > This Proposer will require an OverseerHandle to make requests via.
      
      That's next on the plate.
      
      * use polkadot custom proposer instead of basic-authorship one
      
      * add some tests
      
      * ensure service compiles and passes tests
      
      * fix typo
      
      * fix service-new compilation
      
      * Subsystem test helpers send messages synchronously
      
      * remove smelly action inspector
      
      * remove superfluous let binding
      
      * fix warnings
      
      * add license header
      
      * empty commit; maybe github will notice the one with changes
      
      * Update node/network/bridge/src/lib.rs
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * add sanity check to only include valid inherents
      
      * stub: encapsulate block production mechanics instead of copying them
      
      The goal is to end up with something like what's in
      validation::block_production::*, which encapsulates
      basic block production mechanics. This is a better idea than
      just straight-up copying those mechanics.
      
      * partial implementation of propose fn
      
      Doesn't actually compile yet; need to bring in some other
      commits to ensure ProvisionerMessage is a thing, and also
      figure out how to get the block hash given the current
      context.
      
      * fix compilation
      
      * clear a few more compile errors
      
      * finish fn propose
      
      * broken: add timeout to proposal
      
      * add timeout to proposal
      
      * guide: provisioner is responsible for selecting parachain candidates
      
      * implement ProvisionerMessage::RequestInherentData & update fn propose
      
      * impl CreateProposer::init; clean up
      
      * impl std::error::Error for Error
      
      * document error-handling rationale
      
      * cause polkadot-service-new to compile correctly
      
      * Move potentially-blocking call from fn init -> fn propose
      
      This means that we can wrap the delayed call into the same
      timeout check used elsewhere.
      
      * document struct Proposer
      
      * extract provisioner data fetch
      
      This satisfies two requirements:
      
      - only applies the timeout to actually fetching the provisioner data,
        not to constructing the block after
      - simplifies the problem of injecting default data if we could not
        get the real provisioner data in time.
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      69ce9ff3
  23. Jul 01, 2020
  24. Jun 30, 2020
    • Peter Goodspeed-Niklaus's avatar
      impl ProvideInherent for InclusionInherent (#1318) · 7aa95b19
      Peter Goodspeed-Niklaus authored
      * impl ProvideInherent for InclusionInherent
      
      * reduce import churn; correct expect message
      
      * move inclusion inherent identifier into primitives
      
      It's not clear precisely why this is desired, but it's a pattern
      I've seen in several places, so I'm going this to be on the
      safe side. Worst case, we can revert this commit pretty easily.
      
      * bump kusama spec_version to placate CI
      
      * add license header
      
      * empty commit; maybe github will notice the one with changes
      
      * add sanity check to only include valid inherents
      7aa95b19
  25. Jun 20, 2020
    • Peter Goodspeed-Niklaus's avatar
      signed wrapper (#1283) · 4f79b770
      Peter Goodspeed-Niklaus authored
      
      
      * add signed wrapper, typedef SignedStatement
      
      * typedef SignedAvailabilityBitfield
      
      * implement Signed wrapper
      
      This is strictly an addition as of this commit; nothing is yet
      changed in existing behavior.
      
      * inline getters, remove review comment
      
      * move EncodeAs, Signed from node::primitives to primitives::parachain
      
      * Refactor SignedAvailabilityBitfield to use Signed
      
      * don't double-encode real payload
      
      This isn't an ideal solution, because it depends on the
      implementation details of how SCALE encodes tuples, but OTOH
      that behavior seems unlikely to change anytime soon.
      
      * fix build errors
      
      * cause the runtime to build properly with the new changes
      
      Not sure why cargo check didn't catch this earlier; oh well.
      
      * fix runtime tests and separate SignedStatement from SignedFullStatement
      
      * better explain why CompactStatement exists
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      4f79b770
  26. Jun 18, 2020
    • asynchronous rob's avatar
      Inclusion Module (#1242) · 9d874fa5
      asynchronous rob authored
      * add availability bitfield types to primitives
      
      * begin inclusion module
      
      * use GitHub issue link for limitation
      
      * fix some compiler errors
      
      * integrate validators into initializer
      
      * add generic signing context
      
      * make signing-context more generic
      
      * fix issues with inclusion module
      
      * add TODO
      
      * guide: add validators and session index to inclusion
      
      * guide: add session index to change notification
      
      * implement session change logic
      
      * add BackedCandidate type
      
      * guide: refine inclusion pipeline
      
      * guide: rename group_on to group_validators
      
      * guide: add check about collator for parathread
      
      * guide: add last_code_upgrade to paras and use in inclusion
      
      * implement Paras::last_code_upgrade
      
      * implement most checks in process_candidates
      
      * make candidate receipt structs more generic
      
      * make BackedCandidate struct more generic
      
      * use hash param, not block number
      
      * check that candidate is in context of the parent block
      
      * include inclusion module in initializer
      
      * implement enact-candidate
      
      * check that only occupied cores have bits set
      
      * finish implementing bitfield processing
      
      * restructure consistency checks on candidates
      
      * make some more primitives generic
      
      * signature checking logic for backed candidates
      
      * finish implementing process_candidates
      
      * implement collect_pending
      
      * add some trait implementations to primitives
      
      * implement InclusionInherent and squash warnings
      
      * test bitfield signing checks
      
      * rename parachain head to para_head
      
      * fix note_new_head bug in paras
      
      * test bitfield enactment in inclusion
      
      * helpers for candidate checks
      
      * add test for most candidate checks
      
      * add test for backing setting storage
      
      * test session change logic
      
      * remove extraneous type parameter
      
      * remove some allow(unused)s
      
      * extract threshold computation to const fn
      
      * remove some more allow(unused)s
      
      * improve doc
      
      * add debug assertion
      
      * fix primitive test compilation
      
      * tag unanimous variant as unused
      9d874fa5
  27. Jun 17, 2020
  28. May 16, 2020
    • Gavin Wood's avatar
      Extra requirements for claimants (#1091) · d8328043
      Gavin Wood authored
      
      
      * Introduce mandatory statement signing into claims
      
      * Introduce SignedExtension
      
      * Tests passing
      
      * Bump runtime version
      
      * Bump version, fix test
      
      * Test for validate
      
      * Another couple of tests
      
      * Enable PrevalidateAttests on Polkadot
      
      * Enable PrevalidateAttests on Polkadot
      
      * Fix build
      
      * Fixes
      
      * More fixes
      
      * Fix bench tests
      
      * Fix & test Preclaim clobbering.
      
      * Fix for errant claim logic
      
      * Add test
      
      * Update tests, always use Vec as input
      
      * mint_claim can add signature, some_benchmarks
      
      * Add claim with statement test
      
      * finish benchmarks
      
      * put the correct number of claims with benchmarks
      
      * fix compiler warning
      
      * Update weights
      
      * Weight comments for validation
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      d8328043
  29. May 06, 2020
    • André Silva's avatar
      grandpa: report equivocations on all runtimes (#1000) · 872bd4fd
      André Silva authored
      * grandpa: report equivocations on all runtimes
      
      * runtime: fix test-runtime compilation
      
      * runtime: enable historical session manager on all runtimes
      
      * runtime: fix indentation
      
      * runtime: use strong key types in KeyOwnerProofSystem definitions
      
      * update substrate
      
      * bump spec_version of runtimes
      872bd4fd
  30. Apr 16, 2020
  31. Apr 14, 2020
    • ddorgan's avatar
      Westend Mark II (#983) · 20cb15d0
      ddorgan authored
      
      
      * Initial draft
      
      * More work
      
      * Build
      
      * Docs
      
      * Insert westend keys
      
      * Add badBlock to fork from old chain
      
      * Updated spec to reset westend
      
      * Use raw spec
      
      * Fix spec format and use westend2 for both id's
      
      * Correct public key for bootnode 3
      
      * Build
      
      * Extra space
      
      * Fix build
      
      * Lock
      
      * Update lock
      
      * Fixes
      
      * Fix for he startup text
      
      * Bump
      
      Co-authored-by: default avatarGav Wood <[email protected]>
      20cb15d0
  32. Apr 13, 2020
  33. Apr 06, 2020
    • asynchronous rob's avatar
      Upgradeable validation functions (#918) · ed2c4cab
      asynchronous rob authored
      * upgrade primitives to allow changing validation function
      
      * set up storage schema for old parachains code
      
      * fix compilation errors
      
      * fix test compilation
      
      * add some tests for past code meta
      
      * most of the runtime logic for code upgrades
      
      * implement old-code pruning
      
      * add a couple tests
      
      * clean up remaining TODOs
      
      * add a whole bunch of tests for runtime functionality
      
      * remove unused function
      
      * fix runtime compilation
      
      * extract some primitives to parachain crate
      
      * add validation-code upgrades to validation params and result
      
      * extend validation params with code upgrade fields
      
      * provide maximums to validation params
      
      * port test-parachains
      
      * add a code-upgrader test-parachain and tests
      
      * fix collator tests
      
      * move test-parachains to own folder to work around compilation errors
      
      * fix test compilation
      
      * update the Cargo.lock
      
      * fix parachains tests
      
      * remove dbg! invocation
      
      * use new pool in code-upgrader
      
      * bump lockfile
      
      * link TODO to issue
      ed2c4cab
  34. Apr 03, 2020
    • Bastian Köcher's avatar
      Ensure that table router is always built (#952) · ec11d7e6
      Bastian Köcher authored
      * Ensure that table router is always build
      
      This pr ensures that the table router is always build, aka the future is
      resolved. This is important, as the table router internally spawns tasks
      to handle gossip messages. Handling gossip messages is not only required
      on parachain validators, but also on relay chain validators to receive collations.
      
      Tests are added to ensure that the assumptions hold.
      
      * Fix compilation
      
      * Switch to closures
      
      * Remove empty line
      
      * Revert "Remove empty line"
      
      This reverts commit a6c19438.
      
      * Revert "Switch to closures"
      
      This reverts commit b989c303.
      
      * Hybrid approach
      
      * Rename test
      
      * Make trait crate local
      ec11d7e6
  35. Apr 01, 2020
    • Bastian Köcher's avatar
      Rework consensus instance communication with the network worker (#958) · 639dfd67
      Bastian Köcher authored
      Up to now consensus instances used the main channel to communicate with
      the background network worker. This lead to a race condition when
      sending a local collation and dropping the router before driving the
      send local collation future until it is finished. This pr changes the
      communication between worker and the instances to use their own
      channels. This has the advantage that we don't need an extra
      `DropConsensusNetworking` message as the network is dropped
      automatically when the last sender is dropped.
      639dfd67
  36. Mar 30, 2020