Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Integrate prospective parachains subsystem into backing: Part 1 #5557

Merged
merged 57 commits into from
Jul 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
62184b4
BEGIN ASYNC candidate-backing CHANGES
rphmeier Apr 28, 2022
821ed42
rename & document modes
rphmeier Apr 29, 2022
1fc4928
answer prospective validation data requests
rphmeier May 18, 2022
39f2076
GetMinimumRelayParents request is now plural
rphmeier May 19, 2022
80af4be
implement an implicit view utility for backing subsystems
rphmeier May 19, 2022
7c58f7a
implicit-view: get allowed relay parents
rphmeier May 23, 2022
fbcedac
refactorings and improvements to implicit view
rphmeier May 23, 2022
126ed91
add some TODOs for tests
rphmeier May 23, 2022
a5994a7
split implicit view updates into 2 functions
rphmeier May 25, 2022
8944760
backing: define State to prepare for functional refactor
rphmeier May 25, 2022
c34d0e6
add some docs
rphmeier May 25, 2022
20cd422
backing: implement bones of new leaf activation logic
rphmeier May 25, 2022
2b7d883
backing: create per-relay-parent-states
rphmeier May 25, 2022
923b28a
use new handle_active_leaves_update
rphmeier May 25, 2022
b9280d1
begin extracting logic from CandidateBackingJob
rphmeier May 27, 2022
967156e
mostly extract statement import from job logic
rphmeier May 27, 2022
b25acb7
handle statement imports outside of job logic
rphmeier May 27, 2022
df95962
do some TODO planning for prospective parachains integration
rphmeier May 27, 2022
458d24d
finish rewriting backing subsystem in functional style
rphmeier May 27, 2022
22a9d5e
add prospective parachains mode to relay parent entries
rphmeier May 27, 2022
fc0c4e4
fmt
rphmeier May 27, 2022
a4df277
add a RejectedByProspectiveParachains error
rphmeier May 27, 2022
2f202d0
notify prospective parachains of seconded and backed candidates
rphmeier May 28, 2022
910b997
always validate candidates exhaustively in backing.
rphmeier May 28, 2022
19d7a43
return persisted_validation_data from validation
rphmeier May 28, 2022
7f24629
handle rejections by prospective parachains
rphmeier May 28, 2022
22ead26
implement seconding sanity check
rphmeier May 28, 2022
6738ee9
invoke validate_and_second
rphmeier May 28, 2022
c54e1ca
Alter statement table to allow multiple seconded messages per validator
rphmeier May 28, 2022
e855b6c
refactor backing to have statements carry PVD
rphmeier May 30, 2022
eb0ee29
clean up all warnings
rphmeier May 30, 2022
d80c190
Add tests for implicit view
slumber May 31, 2022
f9cb5a8
Improve doc comments
slumber Jun 2, 2022
5104079
Prospective parachains mode based on Runtime API version
slumber Jun 2, 2022
b89b605
Add a TODO
slumber Jun 2, 2022
05b9818
Rework seconding_sanity_check
slumber Jun 2, 2022
4fbc65b
Iterate over responses
slumber Jun 6, 2022
ddc0d4d
Update backing tests
slumber Jun 6, 2022
d878c89
collator-protocol: load PVD from runtime
rphmeier May 31, 2022
39c194e
Fix validator side tests
slumber Jun 6, 2022
ac7a67e
Update statement-distribution to fetch PVD
slumber Jun 7, 2022
e7bfac8
Fix statement-distribution tests
slumber Jun 9, 2022
45deab2
Backing tests with prospective paras #1
slumber Jun 10, 2022
59e31b4
fix per_relay_parent pruning in backing
rphmeier May 31, 2022
23b4b3c
Test multiple leaves
slumber Jun 11, 2022
48d53cd
Test seconding sanity check
slumber Jun 11, 2022
13e0962
Import statement order
slumber Jun 13, 2022
b8b6ca0
Add a test for correct state updates
slumber Jun 13, 2022
b601bbc
Second multiple candidates per relay parent test
slumber Jun 13, 2022
21fb1ec
Add backing tests with prospective paras
slumber Jun 14, 2022
14da4f9
Second more than one test without prospective paras
slumber Jun 14, 2022
505852d
Add a test for prospective para blocks
slumber Jun 15, 2022
cb21c13
Update malus
slumber Jun 22, 2022
d831417
typos
slumber Jun 22, 2022
2983e53
Merge remote-tracking branch 'origin/master' into rh-async-backing-fe…
slumber Jun 22, 2022
4403e37
Merge branch 'rh-async-backing-feature' into rh-async-backing-integra…
slumber Jun 22, 2022
8205a85
Merge branch 'rh-async-backing-feature' into rh-async-backing-integra…
slumber Jun 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions node/core/backing/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
use fatality::Nested;
use futures::channel::{mpsc, oneshot};

use polkadot_node_subsystem::{messages::ValidationFailed, SubsystemError};
use polkadot_node_subsystem::{messages::ValidationFailed, RuntimeApiError, SubsystemError};
use polkadot_node_subsystem_util::Error as UtilError;
use polkadot_primitives::v2::BackedCandidate;
use polkadot_primitives::v2::{BackedCandidate, ValidationCodeHash};

use crate::LOG_TARGET;

Expand All @@ -42,16 +42,31 @@ pub enum Error {
#[error("FetchPoV failed")]
FetchPoV,

#[error("Fetching validation code by hash failed {0:?}, {1:?}")]
FetchValidationCode(ValidationCodeHash, RuntimeApiError),

#[error("Fetching Runtime API version failed {0:?}")]
FetchRuntimeApiVersion(RuntimeApiError),

#[error("No validation code {0:?}")]
NoValidationCode(ValidationCodeHash),

#[error("Candidate rejected by prospective parachains subsystem")]
RejectedByProspectiveParachains,

#[fatal]
#[error("Failed to spawn background task")]
FailedToSpawnBackgroundTask,

#[error("ValidateFromChainState channel closed before receipt")]
ValidateFromChainState(#[source] oneshot::Canceled),
#[error("ValidateFromExhaustive channel closed before receipt")]
ValidateFromExhaustive(#[source] oneshot::Canceled),

#[error("StoreAvailableData channel closed before receipt")]
StoreAvailableData(#[source] oneshot::Canceled),

#[error("RuntimeAPISubsystem channel closed before receipt")]
RuntimeApiUnavailable(#[source] oneshot::Canceled),

#[error("a channel was closed before receipt in try_join!")]
JoinMultiple(#[source] oneshot::Canceled),

Expand Down
Loading