- 31 Oct, 2020 1 commit
-
-
asynchronous rob authored
* add storage for approvals module * basics of approval logic * fix links * Session info module * create an approvals_inherent module * integrate approvals module with inclusion * Remove approvals runtime * tweak mentions of on-chain logic * add note on finality-grandpa voting rule * elaborate on node-side components * stub for availability recovery * add another note on voting rule * Beginnings of approval subsystems * flesh out approval voting now * logic for checking assignment certs * initial scheduler logic * scheduler logic * adjst tranche taking logic * approval voting import * approval work (voting side) * amend some TODOs * mark some TODOs * describe `ApprovedAncestor` * reference protocol-approval.md * clarity on bitfield * remove approvals_inherent * tweak session_info module according to review * formatting & nits Co-authored-by:
Robert Habermeier <robert@Roberts-MacBook-Pro.local>
-
- 28 Oct, 2020 1 commit
-
-
Sergey Pepyakin authored
-
- 24 Oct, 2020 1 commit
-
-
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.
-
- 07 Oct, 2020 1 commit
-
-
Bastian Köcher authored
-
- 06 Oct, 2020 4 commits
-
-
Bastian Köcher authored
This pr changes the collation function to also pass the current relay parent the parachain block should be build on.
-
Andronik Ordian authored
* chain-api subsystem: implement BlockHeader messsage * update the guide
-
Andronik 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:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * 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:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * 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:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * handle multiple in-flight connection requests * handle cancelled requests * Update node/core/runtime-api/src/lib.rs Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io> * 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:
Fedor Sakharov <fedor.sakharov@gmail.com> * 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:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by:
Fedor Sakharov <fedor.sakharov@gmail.com> Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io>
-
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.
-
- 25 Sep, 2020 1 commit
-
-
Sergey Pepyakin authored
* Guide: Change for {Global,Local}ValidationData to ValidationData Seems like that was missed during the transition from notions of global and local validation data to persistent and transient * collation-generation: a small drive-by fix of line length * collation-generation: extract an error module this allows us to avoid piling Error and Result types from different contexts, specifically std vs. module-local * collation-generation: extract LOG_TARGET from log statements
-
- 08 Sep, 2020 1 commit
-
-
Peter Goodspeed-Niklaus authored
* choose the straightforward candidate selection algorithm for now * add draft implementation of candidate selection * fix typo in summary * more properly report misbehaving collators * describe how CandidateSelection subsystem becomes aware of candidates * revise candidate selection / collator protocol interaction pattern * implement rest of candidate selection per the guide * review: resolve nits * start writing test suite, harness * implement first test * add second test * implement third test Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io>
-
- 31 Aug, 2020 1 commit
-
-
asynchronous rob authored
* move validity module to disputes module * prepare a section on approvals * extract approval/assignments text to an overview section * Apply suggestions from code review Spelling Co-authored-by:
Fedor Sakharov <fedor.sakharov@gmail.com>
-
- 18 Aug, 2020 2 commits
-
-
Jeff Burdges authored
* Initial guide modifications for approvals * Split approval assignments keys and approval votes keys This should avoid the political problems with validator operators wnting everything to be a remote signer. * Update roadmap/implementers-guide/src/runtime/validity.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/assignments.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Update roadmap/implementers-guide/src/node/validity/approvals.md Co-authored-by:
hndnklnc <handankilinc1@gmail.com> * Update roadmap/implementers-guide/src/node/validity/approvals.md Co-authored-by:
hndnklnc <handankilinc1@gmail.com> * Update roadmap/implementers-guide/src/runtime/validity.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Not sure where these go.. * Update roadmap/implementers-guide/src/node/validity/approvals.md Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * Local clock leniency * Explain HSM blabla * double word * Clarify okasing things on-chain * Assignments integration with relative time * minor tweaks * Clarify structure and work savings * Use included more * Cleanup and paramaters See https://github.com/w3f/research-internal/issues/515 * More on GRANDPA * Explain relay equivocation relevance * Address postponement and on-chain verification somewhat * small bit more explination * just use ed25519 here: could -> should * spelling Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> Co-authored-by:
hndnklnc <handankilinc1@gmail.com>
-
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:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
-
- 17 Aug, 2020 1 commit
-
-
Peter Goodspeed-Niklaus authored
* start sketching out a collation generation subsystem * invent a basic strategy for double initialization * clean up warnings * impl util requests from runtime assuming a context instead of a FromJob sender * implement collation generation algorithm from guide * update AllMessages in tests * fix trivial review comments * remove another redundant declaration from merge * filter availability cores by para_id * handle new activations each in their own async task * update guide according to the actual current implementation * add initialization to guide * add general-purpose subsystem_test_harness helper * write first handle_new_activations test * add test that handle_new_activations filters local_validation_data requests * add (failing) test of collation distribution message sending * rustfmt * broken: work on fixing sender test Unfortunately, for reasons that are not yet clear, despite the public key and checked data being identical, the signer is not producing an identical signature. This commit produces this output (among more): signing with Public(c4733ab0bbe3ba4c096685d1737a7f498cdbdd167a767d04a21dc7df12b8c858 (5GWHUNm5...)) checking with Public(c4733ab0bbe3ba4c096685d1737a7f498cdbdd167a767d04a21dc7df12b8c858 (5GWHUNm5...)) signed payload: [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 0, 0, 0, c7, e5, c0, 64, 7a, db, fe, 44, 81, e5, 51, 11, 79, 9f, a5, 63, 93, 94, 3c, c4, 36, c6, 30, 36, c2, c5, 44, a2, 1b, db, b7, 82, 3, 17, a, 2e, 75, 97, b7, b7, e3, d8, 4c, 5, 39, 1d, 13, 9a, 62, b1, 57, e7, 87, 86, d8, c0, 82, f2, 9d, cf, 4c, 11, 13, 14] checked payload: [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 0, 0, 0, c7, e5, c0, 64, 7a, db, fe, 44, 81, e5, 51, 11, 79, 9f, a5, 63, 93, 94, 3c, c4, 36, c6, 30, 36, c2, c5, 44, a2, 1b, db, b7, 82, 3, 17, a, 2e, 75, 97, b7, b7, e3, d8, 4c, 5, 39, 1d, 13, 9a, 62, b1, 57, e7, 87, 86, d8, c0, 82, f2, 9d, cf, 4c, 11, 13, 14] * fix broken test * collation function returns commitments hash It doesn't look like we use the actual commitments data anywhere, and it's not obvious if there are any fields of `CandidateCommitments` not available to the collator, so this commit just assigns them the entire responsibility of generating the hash. * add missing overseer impls * calculating erasure coding is polkadot's responsibility, not cumulus * concurrentize per-relay_parent requests
-
- 13 Aug, 2020 1 commit
-
-
asynchronous rob authored
* guide: validation data refactoring * address grumbles from review * Update roadmap/implementers-guide/src/types/candidate.md Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io> * last comments from review Co-authored-by:
Sergei Shulepov <sergei@parity.io> Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io>
-
- 10 Aug, 2020 1 commit
-
-
Bernhard Schuster authored
Closes #1237
-
- 06 Aug, 2020 1 commit
-
-
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
-
- 05 Aug, 2020 1 commit
-
-
asynchronous rob authored
* rename protocol ID to network capability * guide: `ProtocolId` -> `NetworkCapability` * guide: remove `RegisterEventProducer` * capabilities and expand on underlying network assumptions * guide: create network.md types file * guide: network bridge is aware of network messages * revert changes in code * Update roadmap/implementers-guide/src/SUMMARY.md Co-authored-by:
Pierre Krieger <pierre.krieger1708@gmail.com> * remove references to NetworkCapability * Update roadmap/implementers-guide/src/types/network.md Co-authored-by:
Sergei Shulepov <sergei@parity.io> Co-authored-by:
Pierre Krieger <pierre.krieger1708@gmail.com> Co-authored-by:
Sergei Shulepov <sergei@parity.io>
-
- 31 Jul, 2020 2 commits
-
-
Andronik Ordian authored
* chain-api subsystem skeleton * chain-api subsystem: draft impl * chain-api subsystem: mock testclient * chain-api subsystem: impl HeaderBacked for TestClient * chain-api subsystem: impl basic tests * chain-api subsystem: tiny guide * chain-api subsystem: rename ChainApiRequestMessage to ChainApiMessage * chain-api subsystem: add the page to the ToC * chain-api subsystem: proper error type * chain-api subsystem: impl ancestors request * chain-api subsystem: tests for ancestors request * guide: fix ancestor return type * runtime-api subsystem: remove unused dep * fix fmt * fix outdated comment * chain-api subsystem: s/format/to_string * lower-case subsystem names * chain-api subsystem: resolve Finalized todo * chain-api subsystem: remove TODO * extract request errors into a module * remove caching TODO * fix imports
-
asynchronous rob authored
* Do a small write-up on collation-generation * preamble to collator protocol * notes on protocol * collation-generation: point to collator protocol * fix missing bracket * expand on collator protocol wire protocol * add a couple more sentences * expand on requests some more * go higher level * network bridge: note peerset * note peer-set = validation for protocols * add `ConnectToValidators` message * use ConnectToValidators in collator protocol * typo * remove references to sentry nodes
-
- 30 Jul, 2020 1 commit
-
-
asynchronous rob authored
* skeleton for candidate-validation * add to workspace * implement candidate validation logic * guide: note occupied-core assumption for candidate validation * adjust message doc * wire together `run` asynchronously * add a Subsystem implementation * clean up a couple warnings * fix compilation errors due to merge * improve candidate-validation.md * remove old reference to subsystem-test helpers crate * update Cargo.lock * add a couple new Runtime API methods * add a candidate validation message * fetch validation data from the chain state * some tests for assumption checking * make spawn_validate_exhaustive mockable * more tests on the error handling side * fix all other grumbles except for wasm validation API change * wrap a SpawnNamed in candidate-validation * warn * amend guide * squanch warning * remove duplicate after merge
-
- 27 Jul, 2020 1 commit
-
-
Fedor Sakharov authored
* Improve AVStore and Scheduler docs * Update roadmap/implementers-guide/src/node/utility/availability-store.md Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Bug in linking to README.md * Update against new runtime apis Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
-
- 23 Jul, 2020 2 commits
-
-
Peter Goodspeed-Niklaus authored
* update guide to reduce confusion and TODOs * work from previous bitfield signing effort There were large merge issues with the old bitfield signing PR, so we're just copying all the work from that onto this and restarting. Much of the existing work will be discarded because we now have better tools available, but that's fine. * start rewriting bitfield signing in terms of the util module * implement construct_availability_bitvec It's not an ideal implementation--we can make it much more concurrent-- but at least it compiles. * implement the unimplemented portions of bitfield signing * get core availability concurrently, not sequentially * use sp-std instead of std for a parachain item * resolve type inference failure caused by multiple From impls * handle bitfield signing subsystem & Allmessages variant in overseer * fix more multi-From inference issues * more concisely handle overflow Co-authored-by:
Andronik Ordian <write@reusable.software> * Revert "resolve type inference failure caused by multiple From impls" This reverts commit 7fc77805. * Revert "fix more multi-From inference issues" This reverts commit f14ffe58 . * impl From<i32> for ParaId * handle another instance of AllSubsystems * improve consistency when returning existing options Co-authored-by:
Andronik Ordian <write@reusable.software>
-
Bernhard Schuster authored
* feat bitfield distribution * feat bitfield distribution part 2 * pair programming with rustc & cargo * lets go * move bitfield-distribution to the node/network folder * shape shifting * lunchtime * ignore the two fn recursion for now * step by step * triplesteps * bandaid commit * unordered futures magic * chore * reword markdown * clarify * lacks abortable processing impl details * slimify * fix: warnings and avoid ctx.clone() improve comments * review comments * fix details * make sure outgoing messages are tracked * fix name * fix subsystem * partial test impl * relax context bounds * test * X * X * initial test * fix relay_message not tracked when origin is self * fix/guide: grammar Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> * work around missing Eq+PartialEq * fix: add missing message to provisioner * unify per_job to job_data * fix/review: part one * fix/review: more grumbles * fix/review: track incoming messages per peer * fix/review: extract fn, avoid nested matches * fix/review: more tests, simplify test * fix/review: extend tests to cover more cases * chore/rename: Tracker -> ProtocolState * chore check and comment rewording * feat test: invalid peer message * remove ignored test cases and unused macros * fix master merge fallout + warnings Co-authored-by:
Robert Habermeier <rphmeier@gmail.com>
-
- 22 Jul, 2020 1 commit
-
-
asynchronous rob authored
-
- 16 Jul, 2020 1 commit
-
-
asynchronous rob authored
* add assumptions made by the Node-side * Update roadmap/implementers-guide/src/node/README.md Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Update roadmap/implementers-guide/src/node/README.md Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Update roadmap/implementers-guide/src/node/README.md Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io> * more refinements Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io>
-
- 10 Jul, 2020 1 commit
- 09 Jul, 2020 1 commit
-
-
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
-
- 08 Jul, 2020 1 commit
-
-
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
-
- 07 Jul, 2020 1 commit
-
-
asynchronous rob authored
* rename implementor's guide to implementer's guide * fix typos in more places
-