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 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
  7. 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
  8. Aug 17, 2020
  9. 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
  10. Aug 10, 2020
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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