* Make it possible for the adder collator to calculate any state
This is very useful for when wanting to have multiple running or when
wanting to restart the collator.
* Update parachain/test-parachains/adder/collator/src/lib.rs
Co-authored-by: Sergei Shulepov <sergei@parity.io>
* refactor some functions to not rely on `self`
* factor out common elements of seconding and attesting
* Add Spawn to backing FromJob
* do candidate validation in background
* tests
* address grumbles
* Simplify subsystem jobs
This pr simplifies the subsystem jobs interface. Instead of requiring an
extra message that is used to signal that a job should be ended, a job
now ends when the receiver returns `None`. Besides that it changes the
interface to enforce that messages to a job provide a relay parent.
* Drop ToJobTrait
* Remove FromJob
We always convert this message to FromJobCommand anyway.
This pr changes how the runtime api subsystem processes runtime api
requests. Instead of answering all of them in the subsystem task and
thus, making all requests sequential, we now answer them in a background
task. This enables us to serve multiple requests at once.
* Commit a fuzzer for the erase coding
* Replace tabs with spaces for the erase coding fuzzer
* Apply suggestions from code review
Co-authored-by: Andronik Ordian <write@reusable.software>
* guide: fix formatting for SessionInfo module
* primitives: SessionInfo type
* punt on approval keys
* ah, revert the type alias
* session info runtime module skeleton
* update the guide
* runtime/configuration: sync with the guide
* runtime/configuration: setters for newly added fields
* runtime/configuration: set codec indexes
* runtime/configuration: update test
* primitives: fix SessionInfo definition
* runtime/session_info: initial impl
* runtime/session_info: use initializer for session handling (wip)
* runtime/session_info: mock authority discovery trait
* guide: update the initializer's order
* runtime/session_info: tests skeleton
* runtime/session_info: store n_delay_tranches in Configuration
* runtime/session_info: punt on approval keys
* runtime/session_info: add some basic tests
* Update primitives/src/v1.rs
* small fixes
* remove codec index annotation on structs
* fix off-by-one error
* validator_discovery: accept a session index
* runtime: replace validator_discovery api with session_info
* Update runtime/parachains/src/session_info.rs
Co-authored-by: Sergei Shulepov <sergei@parity.io>
* runtime/session_info: add a comment about missing entries
* runtime/session_info: define the keys
* util: expose connect_to_past_session_validators
* util: allow session_info requests for jobs
* runtime-api: add mock test for session_info
* collator-protocol: add session_index to test state
* util: fix error message for runtime error
* fix compilation
* fix tests after merge with master
Co-authored-by: Sergei Shulepov <sergei@parity.io>
* Some code cleanup in overseer
- Switches to select! in the overseer run loop to be more fair about
message processing between the different sources.
- Added a check to only send `ActiveLeaves` if the update actually
contains any data.
* Move the check
* Restore old behavior
* Simplify message sending and signal sending to subsystems
* Update node/subsystem/src/lib.rs
* Initial commit
* Remove unnecessary struct
* Some review nits
* Update node/network/pov-distribution/src/lib.rs
* Update parachain/test-parachains/adder/collator/tests/integration.rs
* Review nits
* notify_all_we_are_awaiting
* Both ways of peers connections should work the same
* Add mod-level docs to error.rs
* Avoid multiple connection requests at same parent
* Dont bail on errors
* FusedStream for ConnectionRequests
* Fix build after merge
* Improve error handling
* Remove whitespace formatting
* skeleton flow control
* tweaks & rename to approvals distribution
* Update roadmap/implementers-guide/src/node/approval/approval-distribution.md
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* Update roadmap/implementers-guide/src/node/approval/approval-distribution.md
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* add a `NewBlocks` message and dispatch
* new data format for approval distribution
* guide: update view to include finalized block number
* approvals: document view updating
* pruning when peers disconnect
* add remaining message types
* fix link
* network message type
* handle incoming assignments
* import_and_circulate_approval
* handle new blocks
* address review comments
* address review comments and use nifty VRFProof
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* elaborate on runtime API
* clarify what to do if the runtime API calls fail
* Update roadmap/implementers-guide/src/node/approval/approval-voting.md
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* Update roadmap/implementers-guide/src/node/approval/approval-voting.md
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Do not send messages twice in bitfield distribution
This removes a bug which resulted in sending bitfield messages multiple
times by not checking if we already relayed them. Besides that it also
adds an optimization to not relay a message to a peer that send us
this message.
* Review comments
* Break some lines
* *: Update authority discovery and remove WorkerConfig
With https://github.com/paritytech/substrate/pull/7545 the authority
discovery module queries and publishes addresses on an exponentially
increasing interval. Doing so should make custom configurations
obsolete, as operations are retried in a timely fashion in the first
minutes.
* */Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing
* Revert "*/Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing"
This reverts commit 0785943a1e377454f088814ef20f4432de09da7a.
* "Update Substrate"
* Revert ""Update Substrate""
This reverts commit 377b221e1853b2c383f0c416d686535b545796cb.
* Cargo.lock: Manual Substrate update
* node/test/service/src/lib: Remove unused import
* parachain/test-parachains/adder: Remove unused import
Co-authored-by: parity-processbot <>
* Improve collator side of the collator-protocol
This pr improves the collator-protocol implementation of the collator
side. Besides cleaning up code and rewriting it, the following changed:
- Before on `PeerViewChange` we send an advertisment to every peer, now
this only happens for validators.
- It also adds a check that we send an advertisment message only once
for a connected peer.
- If the same validator was part of the current and next group, we
requested to be connected to this validator two times. This is also
fixed now.
- Instead of having only one connection request, we now are being able
to store multiple of them. This is required as we can have multiple
active leafs at any point of time.
* Switch to common `ConnectionRequests`
* Update node/network/collator-protocol/src/collator_side.rs