Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch node side to v2 candidate receipts #5679

Open
wants to merge 137 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
793142e
WIP primitives
sandreim Jul 17, 2024
3a29fdf
WIP
sandreim Aug 5, 2024
4a53577
Working version.
sandreim Aug 7, 2024
8285ae7
Better version
sandreim Aug 8, 2024
2831c5e
Add missing primitives and fix things
sandreim Aug 8, 2024
c767d60
Implement v2 receipts in polkadot-runtime-parachains
sandreim Aug 8, 2024
96999e3
add missing stuff
sandreim Aug 12, 2024
c5f2dc3
Switch parachains runtime to use new primitives
sandreim Aug 12, 2024
dbb0160
use vstaging primitives
sandreim Aug 12, 2024
5efab68
update rococo and westend
sandreim Aug 12, 2024
c2232e4
client keeps using the old primitives
sandreim Aug 12, 2024
87b079f
no unsafe pls
sandreim Aug 12, 2024
00e8c13
move async backing primtiives to own file
sandreim Aug 12, 2024
cd4d02f
fix
sandreim Aug 12, 2024
5509e33
fix test build
sandreim Aug 12, 2024
f8b86d2
fix test-runtime
sandreim Aug 12, 2024
fe2fbfb
self review feedback
sandreim Aug 13, 2024
975e13b
review feedback
sandreim Aug 13, 2024
1c7ac55
feedback
sandreim Aug 13, 2024
653873b
feedback
sandreim Aug 13, 2024
dc98149
clippy
sandreim Aug 13, 2024
0a6bce3
chores
sandreim Aug 13, 2024
5e4dac2
Filter v2 candidate descriptors
sandreim Aug 14, 2024
f12ca7a
fix
sandreim Aug 14, 2024
13734de
fix prospective parachains tests
sandreim Aug 14, 2024
effb1cc
fix fix
sandreim Aug 14, 2024
3f75cba
fmt
sandreim Aug 14, 2024
75a47bb
fix comment
sandreim Aug 14, 2024
12ed853
another one
sandreim Aug 14, 2024
f2c0882
fix build
sandreim Aug 15, 2024
768e034
.
sandreim Aug 15, 2024
4bf0706
improve test and add comment
sandreim Aug 15, 2024
0c83201
add log
sandreim Aug 15, 2024
4296942
simplify check()
sandreim Aug 19, 2024
e1a7509
Merge branch 'sandreim/rfc103-primitives' of github.com:paritytech/po…
sandreim Aug 20, 2024
6fb7790
impl<H>
sandreim Aug 20, 2024
e6add9c
Merge branch 'sandreim/rfc103-primitives' of github.com:paritytech/po…
sandreim Aug 20, 2024
d0b3961
comment
sandreim Aug 20, 2024
66f7a96
add some tests
sandreim Aug 20, 2024
5c0c919
update
sandreim Aug 20, 2024
38ce589
prdoc
sandreim Aug 21, 2024
9f1d611
can't be happy if CI is sad
sandreim Aug 21, 2024
a6a7329
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Aug 21, 2024
663817d
remove newlines
sandreim Aug 21, 2024
a1dacc1
match rfc 103 reserved field naming
sandreim Aug 21, 2024
33b80ea
remove default cq offset
sandreim Aug 21, 2024
d5b165f
Merge branch 'sandreim/rfc103-primitives' of github.com:paritytech/po…
sandreim Aug 21, 2024
29e4b47
Ignore UMP signals when checking and processing UMP queue
sandreim Aug 16, 2024
ab85fe3
wip
sandreim Aug 20, 2024
7d5636b
refactor a bit
sandreim Aug 20, 2024
2954bba
use descriptor core_index in `map_candidates_to_cores`
sandreim Aug 20, 2024
e7abe8b
nits
sandreim Aug 20, 2024
1db5eb0
Para Inherent: filter v2 candidate descriptors (#5362)
sandreim Aug 22, 2024
cdb49a6
increase test coverage
sandreim Aug 22, 2024
f6f714a
Merge branch 'sandreim/rfc103-primitives' of github.com:paritytech/po…
sandreim Aug 22, 2024
aa925cd
Improve usability of primitives
sandreim Aug 23, 2024
00d7c71
use committed core index if available in v1 receipts
sandreim Aug 23, 2024
af9f561
typo
sandreim Aug 23, 2024
fb2cefb
fix check
sandreim Aug 23, 2024
b53787d
typo
sandreim Aug 23, 2024
e2ef46e
add test for mixed v1 v2 scenario
sandreim Aug 26, 2024
2dfc542
comment
sandreim Aug 26, 2024
a38a243
add ump test
sandreim Aug 26, 2024
da381da
avoid one storage read
sandreim Aug 26, 2024
ca5c618
store claim queue snapshot in allowed relay parent info
sandreim Aug 27, 2024
4266665
check v2 receipts using claim queue snapshots
sandreim Aug 27, 2024
e93b983
typo
sandreim Aug 27, 2024
e01bf53
it was a bad idea to process commitments of v1 receipts
sandreim Aug 28, 2024
fb9fbe6
fmt
sandreim Aug 28, 2024
c507488
remove unused
sandreim Aug 28, 2024
178e201
Validate session index
sandreim Aug 28, 2024
984e8e1
add unknown version
sandreim Aug 29, 2024
fab215d
add check for unknown version and test
sandreim Aug 29, 2024
7300552
Merge branch 'sandreim/rfc103-primitives' of github.com:paritytech/po…
sandreim Aug 29, 2024
9bbe2cc
typo
sandreim Aug 29, 2024
4dda9df
adjust comments
sandreim Aug 29, 2024
cd3eb5f
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Aug 30, 2024
f8ef4ce
fix merge damage
sandreim Aug 30, 2024
04e31a1
unused
sandreim Aug 30, 2024
5fd1279
fix
sandreim Aug 30, 2024
19d6f32
fix benchmark build
sandreim Sep 2, 2024
552078a
Merge branch 'sandreim/rfc103-primitives' of github.com:paritytech/po…
sandreim Sep 2, 2024
4ec3fc8
typos
sandreim Sep 2, 2024
2ba0a27
fmt
sandreim Sep 2, 2024
e468d62
fix comment
sandreim Sep 2, 2024
3fe368f
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Sep 3, 2024
18a0496
mixed v1, v2, v2 without select core tests,
sandreim Sep 4, 2024
d320269
Add allowed relay parents storage migration
sandreim Sep 4, 2024
8490488
fix migration
sandreim Sep 5, 2024
db67486
fix
sandreim Sep 5, 2024
03cf8c1
clippy
sandreim Sep 5, 2024
43f6de7
feedback
sandreim Sep 5, 2024
70e48d2
sir, make it faster
sandreim Sep 5, 2024
1e26c73
fix
sandreim Sep 5, 2024
f4e3fb5
one last fix
sandreim Sep 5, 2024
2e87ad3
fixes
sandreim Sep 5, 2024
54432be
remove println
sandreim Sep 5, 2024
cfbecb0
add prdoc
sandreim Sep 6, 2024
3a518f2
fix comment
sandreim Sep 6, 2024
54106e2
refactor map_candidates_to_cores
sandreim Sep 6, 2024
b44a604
doc updates
sandreim Sep 9, 2024
4c5c707
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Sep 9, 2024
0cc2e6c
switch nodes to vstaging primitives
sandreim Sep 11, 2024
f9ddb15
test fixes
sandreim Sep 11, 2024
add4592
fmt
sandreim Sep 11, 2024
ef51144
extract test helpers in MutateDescriptorV2
sandreim Sep 12, 2024
3981425
fix tests
sandreim Sep 12, 2024
32af174
more fixes
sandreim Sep 12, 2024
9eba1ef
more wip
sandreim Sep 13, 2024
caff543
feedback
sandreim Sep 13, 2024
218f530
refactor
sandreim Sep 13, 2024
216937a
fix try-runtime
sandreim Sep 13, 2024
e169d0d
Finally all tests compile
sandreim Sep 16, 2024
ceac8b2
:facepalm:
sandreim Sep 16, 2024
c0aee8c
check ump signal count and test
sandreim Sep 16, 2024
1ef7952
remove unused
sandreim Sep 18, 2024
5790b8e
fix prdoc
sandreim Sep 19, 2024
ba9d3ff
more tests cases
sandreim Sep 19, 2024
888880f
Merge branch 'sandreim/runtime_v2_descriptor_support' into sandreim/n…
sandreim Sep 19, 2024
0dcf739
workaround #64
sandreim Sep 20, 2024
604273b
stricter UMP signal checks and tests
sandreim Sep 23, 2024
9c4e2ae
stricter UMP signal checks and tests
sandreim Sep 23, 2024
43bbb9d
type alias
sandreim Sep 24, 2024
64febf4
Merge branch 'sandreim/runtime_v2_descriptor_support' of github.com:p…
sandreim Sep 24, 2024
a493225
remove unused
sandreim Sep 24, 2024
d7e57fd
Merge branch 'master' into sandreim/runtime_v2_descriptor_support
sandreim Sep 24, 2024
7e3a943
Merge branch 'sandreim/runtime_v2_descriptor_support' of github.com:p…
sandreim Sep 24, 2024
7352577
add prdoc
sandreim Sep 24, 2024
c9e44d1
fix merge damage
sandreim Sep 24, 2024
bf948a7
fix
sandreim Sep 24, 2024
fd9dfee
fix some builds
sandreim Sep 26, 2024
5bd465b
fix the fix
sandreim Sep 26, 2024
53bb5b8
toml fixes
sandreim Sep 27, 2024
555c91b
remove bogus code
sandreim Oct 17, 2024
90932b3
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Oct 17, 2024
4b2c06f
fix build
sandreim Oct 17, 2024
320318a
fmt and feedback
sandreim Oct 17, 2024
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
2 changes: 1 addition & 1 deletion cumulus/client/consensus/common/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use async_trait::async_trait;
use codec::Encode;
use cumulus_client_pov_recovery::RecoveryKind;
use cumulus_primitives_core::{
relay_chain::{BlockId, BlockNumber, CoreState},
relay_chain::{vstaging::CoreState, BlockId, BlockNumber},
CumulusDigestItem, InboundDownwardMessage, InboundHrmpMessage,
};
use cumulus_relay_chain_interface::{
Expand Down
12 changes: 6 additions & 6 deletions cumulus/client/network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ use polkadot_node_primitives::{CollationSecondedSignal, Statement};
use polkadot_node_subsystem::messages::RuntimeApiRequest;
use polkadot_parachain_primitives::primitives::HeadData;
use polkadot_primitives::{
CandidateReceipt, CompactStatement, Hash as PHash, Id as ParaId, OccupiedCoreAssumption,
SigningContext, UncheckedSigned,
vstaging::CandidateReceiptV2 as CandidateReceipt, CompactStatement, Hash as PHash,
Id as ParaId, OccupiedCoreAssumption, SigningContext, UncheckedSigned,
};

use codec::{Decode, DecodeAll, Encode};
Expand Down Expand Up @@ -79,7 +79,7 @@ impl Decode for BlockAnnounceData {
let relay_parent = match PHash::decode(input) {
Ok(p) => p,
// For being backwards compatible, we support missing relay-chain parent.
Err(_) => receipt.descriptor.relay_parent,
Err(_) => receipt.descriptor.relay_parent(),
};

Ok(Self { receipt, statement, relay_parent })
Expand Down Expand Up @@ -108,7 +108,7 @@ impl BlockAnnounceData {
return Err(Validation::Failure { disconnect: true })
}

if HeadData(encoded_header).hash() != self.receipt.descriptor.para_head {
if HeadData(encoded_header).hash() != self.receipt.descriptor.para_head() {
tracing::debug!(
target: LOG_TARGET,
"Receipt para head hash doesn't match the hash of the header in the block announcement",
Expand Down Expand Up @@ -302,7 +302,7 @@ where
}
.map_err(|e| Box::new(BlockAnnounceError(format!("{:?}", e))) as Box<_>)?;

Ok(candidate_receipts.into_iter().map(|cr| cr.descriptor.para_head))
Ok(candidate_receipts.into_iter().map(|cr| cr.descriptor.para_head()))
}

/// Handle a block announcement with empty data (no statement) attached to it.
Expand Down Expand Up @@ -399,7 +399,7 @@ where
return Ok(e)
}

let relay_parent = block_announce_data.receipt.descriptor.relay_parent;
let relay_parent = block_announce_data.receipt.descriptor.relay_parent();

relay_chain_interface
.wait_for_block(relay_parent)
Expand Down
22 changes: 12 additions & 10 deletions cumulus/client/network/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ use futures::{executor::block_on, poll, task::Poll, FutureExt, Stream, StreamExt
use parking_lot::Mutex;
use polkadot_node_primitives::{SignedFullStatement, Statement};
use polkadot_primitives::{
vstaging::{CommittedCandidateReceiptV2, CoreState},
BlockNumber, CandidateCommitments, CandidateDescriptor, CollatorPair,
CommittedCandidateReceipt, CoreState, Hash as PHash, HeadData, InboundDownwardMessage,
InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, SessionIndex,
SigningContext, ValidationCodeHash, ValidatorId,
CommittedCandidateReceipt, Hash as PHash, HeadData, InboundDownwardMessage, InboundHrmpMessage,
OccupiedCoreAssumption, PersistedValidationData, SessionIndex, SigningContext,
ValidationCodeHash, ValidatorId,
};
use polkadot_test_client::{
Client as PClient, ClientBlockImportExt, DefaultTestClientBuilderExt, FullBackend as PBackend,
Expand Down Expand Up @@ -166,15 +167,15 @@ impl RelayChainInterface for DummyRelayChainInterface {
&self,
_: PHash,
_: ParaId,
) -> RelayChainResult<Option<CommittedCandidateReceipt>> {
) -> RelayChainResult<Option<CommittedCandidateReceiptV2>> {
if self.data.lock().runtime_version >=
RuntimeApiRequest::CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT
{
panic!("Should have used candidates_pending_availability instead");
}

if self.data.lock().has_pending_availability {
Ok(Some(dummy_candidate()))
Ok(Some(dummy_candidate().into()))
} else {
Ok(None)
}
Expand All @@ -184,15 +185,15 @@ impl RelayChainInterface for DummyRelayChainInterface {
&self,
_: PHash,
_: ParaId,
) -> RelayChainResult<Vec<CommittedCandidateReceipt>> {
) -> RelayChainResult<Vec<CommittedCandidateReceiptV2>> {
if self.data.lock().runtime_version <
RuntimeApiRequest::CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT
{
panic!("Should have used candidate_pending_availability instead");
}

if self.data.lock().has_pending_availability {
Ok(vec![dummy_candidate()])
Ok(vec![dummy_candidate().into()])
} else {
Ok(vec![])
}
Expand Down Expand Up @@ -412,7 +413,7 @@ async fn make_gossip_message_and_header(
validation_code_hash: ValidationCodeHash::from(PHash::random()),
},
};
let statement = Statement::Seconded(candidate_receipt);
let statement = Statement::Seconded(candidate_receipt.into());
let signed = SignedFullStatement::sign(
&keystore,
statement,
Expand Down Expand Up @@ -525,7 +526,7 @@ fn legacy_block_announce_data_handling() {

let block_data =
BlockAnnounceData::decode(&mut &data[..]).expect("Decoding works from legacy works");
assert_eq!(receipt.descriptor.relay_parent, block_data.relay_parent);
assert_eq!(receipt.descriptor.relay_parent(), block_data.relay_parent);

let data = block_data.encode();
LegacyBlockAnnounceData::decode(&mut &data[..]).expect("Decoding works");
Expand Down Expand Up @@ -600,7 +601,8 @@ async fn check_statement_seconded() {
erasure_root: PHash::random(),
signature: sp_core::sr25519::Signature::default().into(),
validation_code_hash: ValidationCodeHash::from(PHash::random()),
},
}
.into(),
},
statement: signed_statement.convert_payload().into(),
relay_parent,
Expand Down
6 changes: 5 additions & 1 deletion cumulus/client/pov-recovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ use polkadot_node_primitives::{PoV, POV_BOMB_LIMIT};
use polkadot_node_subsystem::messages::{AvailabilityRecoveryMessage, RuntimeApiRequest};
use polkadot_overseer::Handle as OverseerHandle;
use polkadot_primitives::{
CandidateReceipt, CommittedCandidateReceipt, Id as ParaId, SessionIndex,
vstaging::{
CandidateReceiptV2 as CandidateReceipt,
CommittedCandidateReceiptV2 as CommittedCandidateReceipt,
},
Id as ParaId, SessionIndex,
};

use cumulus_primitives_core::ParachainBlockData;
Expand Down
5 changes: 3 additions & 2 deletions cumulus/client/pov-recovery/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use super::*;
use assert_matches::assert_matches;
use codec::{Decode, Encode};
use cumulus_primitives_core::relay_chain::{
BlockId, CandidateCommitments, CandidateDescriptor, CoreIndex, CoreState,
vstaging::CoreState, BlockId, CandidateCommitments, CandidateDescriptor, CoreIndex,
};
use cumulus_relay_chain_interface::{
InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, PHash, PHeader,
Expand Down Expand Up @@ -532,7 +532,8 @@ fn make_candidate_chain(candidate_number_range: Range<u32>) -> Vec<CommittedCand
signature: collator.sign(&[0u8; 132]).into(),
para_head: PHash::zero(),
validation_code_hash: PHash::zero().into(),
},
}
.into(),
commitments: CandidateCommitments {
head_data: head_data.encode().into(),
upward_messages: vec![].try_into().expect("empty vec fits within bounds"),
Expand Down
5 changes: 3 additions & 2 deletions cumulus/client/relay-chain-inprocess-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ use std::{
use async_trait::async_trait;
use cumulus_primitives_core::{
relay_chain::{
runtime_api::ParachainHost, Block as PBlock, BlockId, BlockNumber,
CommittedCandidateReceipt, CoreIndex, CoreState, Hash as PHash, Header as PHeader,
runtime_api::ParachainHost,
vstaging::{CommittedCandidateReceiptV2 as CommittedCandidateReceipt, CoreState},
Block as PBlock, BlockId, BlockNumber, CoreIndex, Hash as PHash, Header as PHeader,
InboundHrmpMessage, OccupiedCoreAssumption, SessionIndex, ValidationCodeHash, ValidatorId,
},
InboundDownwardMessage, ParaId, PersistedValidationData,
Expand Down
6 changes: 3 additions & 3 deletions cumulus/client/relay-chain-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ use sp_api::ApiError;
use cumulus_primitives_core::relay_chain::{BlockId, Hash as RelayHash};
pub use cumulus_primitives_core::{
relay_chain::{
BlockNumber, CommittedCandidateReceipt, CoreIndex, CoreState, Hash as PHash,
Header as PHeader, InboundHrmpMessage, OccupiedCoreAssumption, SessionIndex,
ValidationCodeHash, ValidatorId,
vstaging::{CommittedCandidateReceiptV2 as CommittedCandidateReceipt, CoreState},
BlockNumber, CoreIndex, Hash as PHash, Header as PHeader, InboundHrmpMessage,
OccupiedCoreAssumption, SessionIndex, ValidationCodeHash, ValidatorId,
},
InboundDownwardMessage, ParaId, PersistedValidationData,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use futures::{Stream, StreamExt};
use polkadot_core_primitives::{Block, BlockNumber, Hash, Header};
use polkadot_overseer::{ChainApiBackend, RuntimeApiSubsystemClient};
use polkadot_primitives::{
async_backing::{AsyncBackingParams, BackingState},
slashing, ApprovalVotingParams, CoreIndex, NodeFeatures,
async_backing::AsyncBackingParams, slashing, vstaging::async_backing::BackingState,
ApprovalVotingParams, CoreIndex, NodeFeatures,
};
use sc_authority_discovery::{AuthorityDiscovery, Error as AuthorityDiscoveryError};
use sc_client_api::AuxStore;
Expand Down Expand Up @@ -143,7 +143,10 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
async fn availability_cores(
&self,
at: Hash,
) -> Result<Vec<polkadot_primitives::CoreState<Hash, BlockNumber>>, sp_api::ApiError> {
) -> Result<
Vec<polkadot_primitives::vstaging::CoreState<Hash, polkadot_core_primitives::BlockNumber>>,
sp_api::ApiError,
> {
Ok(self.rpc_client.parachain_host_availability_cores(at).await?)
}

Expand Down Expand Up @@ -212,8 +215,11 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
async fn candidate_pending_availability(
&self,
at: Hash,
para_id: ParaId,
) -> Result<Option<polkadot_primitives::CommittedCandidateReceipt<Hash>>, sp_api::ApiError> {
para_id: cumulus_primitives_core::ParaId,
) -> Result<
Option<polkadot_primitives::vstaging::CommittedCandidateReceiptV2<Hash>>,
sp_api::ApiError,
> {
Ok(self
.rpc_client
.parachain_host_candidate_pending_availability(at, para_id)
Expand All @@ -223,7 +229,7 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
async fn candidate_events(
&self,
at: Hash,
) -> Result<Vec<polkadot_primitives::CandidateEvent<Hash>>, sp_api::ApiError> {
) -> Result<Vec<polkadot_primitives::vstaging::CandidateEvent<Hash>>, sp_api::ApiError> {
Ok(self.rpc_client.parachain_host_candidate_events(at).await?)
}

Expand Down Expand Up @@ -266,7 +272,8 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
async fn on_chain_votes(
&self,
at: Hash,
) -> Result<Option<polkadot_primitives::ScrapedOnChainVotes<Hash>>, sp_api::ApiError> {
) -> Result<Option<polkadot_primitives::vstaging::ScrapedOnChainVotes<Hash>>, sp_api::ApiError>
{
Ok(self.rpc_client.parachain_host_on_chain_votes(at).await?)
}

Expand Down Expand Up @@ -437,8 +444,11 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
async fn candidates_pending_availability(
&self,
at: Hash,
para_id: ParaId,
) -> Result<Vec<polkadot_primitives::CommittedCandidateReceipt<Hash>>, sp_api::ApiError> {
para_id: cumulus_primitives_core::ParaId,
) -> Result<
Vec<polkadot_primitives::vstaging::CommittedCandidateReceiptV2<Hash>>,
sp_api::ApiError,
> {
Ok(self
.rpc_client
.parachain_host_candidates_pending_availability(at, para_id)
Expand Down
5 changes: 3 additions & 2 deletions cumulus/client/relay-chain-rpc-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ use async_trait::async_trait;
use core::time::Duration;
use cumulus_primitives_core::{
relay_chain::{
CommittedCandidateReceipt, Hash as RelayHash, Header as RelayHeader, InboundHrmpMessage,
OccupiedCoreAssumption, SessionIndex, ValidationCodeHash, ValidatorId,
vstaging::CommittedCandidateReceiptV2 as CommittedCandidateReceipt, Hash as RelayHash,
Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption, SessionIndex,
ValidationCodeHash, ValidatorId,
},
InboundDownwardMessage, ParaId, PersistedValidationData,
};
Expand Down
19 changes: 12 additions & 7 deletions cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ use codec::{Decode, Encode};

use cumulus_primitives_core::{
relay_chain::{
async_backing::{AsyncBackingParams, BackingState},
slashing, ApprovalVotingParams, BlockNumber, CandidateCommitments, CandidateEvent,
CandidateHash, CommittedCandidateReceipt, CoreIndex, CoreState, DisputeState,
ExecutorParams, GroupRotationInfo, Hash as RelayHash, Header as RelayHeader,
InboundHrmpMessage, NodeFeatures, OccupiedCoreAssumption, PvfCheckStatement,
ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash,
ValidatorId, ValidatorIndex, ValidatorSignature,
async_backing::AsyncBackingParams,
slashing,
vstaging::{
async_backing::BackingState, CandidateEvent,
CommittedCandidateReceiptV2 as CommittedCandidateReceipt, CoreState,
ScrapedOnChainVotes,
},
ApprovalVotingParams, BlockNumber, CandidateCommitments, CandidateHash, CoreIndex,
DisputeState, ExecutorParams, GroupRotationInfo, Hash as RelayHash, Header as RelayHeader,
InboundHrmpMessage, NodeFeatures, OccupiedCoreAssumption, PvfCheckStatement, SessionIndex,
SessionInfo, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex,
ValidatorSignature,
},
InboundDownwardMessage, ParaId, PersistedValidationData,
};
Expand Down
1 change: 1 addition & 0 deletions polkadot/node/collation-generation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ polkadot-primitives-test-helpers = { workspace = true }
assert_matches = { workspace = true }
rstest = { workspace = true }
sp-keyring = { workspace = true, default-features = true }
polkadot-primitives = { workspace = true, features = ["test"] }
10 changes: 6 additions & 4 deletions polkadot/node/collation-generation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ use polkadot_node_subsystem_util::{
request_validators, runtime::fetch_claim_queue,
};
use polkadot_primitives::{
collator_signature_payload, CandidateCommitments, CandidateDescriptor, CandidateReceipt,
CollatorPair, CoreIndex, CoreState, Hash, Id as ParaId, OccupiedCoreAssumption,
PersistedValidationData, ScheduledCore, ValidationCodeHash,
collator_signature_payload,
vstaging::{CandidateReceiptV2 as CandidateReceipt, CoreState},
CandidateCommitments, CandidateDescriptor, CollatorPair, CoreIndex, Hash, Id as ParaId,
OccupiedCoreAssumption, PersistedValidationData, ScheduledCore, ValidationCodeHash,
};
use sp_core::crypto::Pair;
use std::sync::Arc;
Expand Down Expand Up @@ -607,7 +608,8 @@ async fn construct_and_distribute_receipt(
erasure_root,
para_head: commitments.head_data.hash(),
validation_code_hash,
},
}
.into(),
};

gum::debug!(
Expand Down
Loading
Loading