polkadot-staging branch: Use polkadot-sdk dependencies (#2524)

* Use polkadot-sdk dependencies

* Fix ring-proof ref

* Fix Beefy

* Fix imports

* Simple runtimes fixes

* Fix substrate-relay

* Add ParaAssignmentProvider for Rialto

* Rialto chain_spec fix

* Fix Rialto build

* Fix Rialto pvf workers

* Allow rialto-parachain deprecated features warnings
This commit is contained in:
Serban Iorga
2023-09-04 10:14:39 +03:00
committed by Bastian Köcher
parent 98ee19cb7d
commit 2c26640ac3
87 changed files with 622 additions and 592 deletions
+10 -2
View File
@@ -441,7 +441,11 @@ mod tests {
InitializationData {
operating_mode: BasicOperatingMode::Normal,
best_block_number: 0,
authority_set: BeefyAuthoritySet { id: 0, len: 1, root: [0u8; 32].into() }
authority_set: BeefyAuthoritySet {
id: 0,
len: 1,
keyset_commitment: [0u8; 32].into()
}
}
),
Error::<TestRuntime, ()>::AlreadyInitialized,
@@ -458,7 +462,11 @@ mod tests {
InitializationData {
operating_mode: BasicOperatingMode::Normal,
best_block_number: 0,
authority_set: BeefyAuthoritySet { id: 0, len: 0, root: [0u8; 32].into() }
authority_set: BeefyAuthoritySet {
id: 0,
len: 0,
keyset_commitment: [0u8; 32].into()
}
}
),
Error::<TestRuntime, ()>::InvalidInitialAuthoritySet,
+2 -2
View File
@@ -32,7 +32,7 @@ use sp_runtime::{
Perbill,
};
pub use sp_consensus_beefy::crypto::{AuthorityId as BeefyId, Pair as BeefyPair};
pub use sp_consensus_beefy::ecdsa_crypto::{AuthorityId as BeefyId, Pair as BeefyPair};
use sp_core::crypto::Wraps;
use sp_runtime::traits::Keccak256;
@@ -194,7 +194,7 @@ pub fn validator_ids(index: u32, count: u32) -> Vec<BeefyId> {
pub fn authority_set_info(id: u64, validators: &Vec<BeefyId>) -> TestBridgedAuthoritySetInfo {
let merkle_root = get_authorities_mmr_root::<TestRuntime, (), _>(validators.iter());
TestBridgedAuthoritySetInfo { id, len: validators.len() as u32, root: merkle_root }
TestBridgedAuthoritySetInfo { id, len: validators.len() as u32, keyset_commitment: merkle_root }
}
/// Sign BEEFY commitment.
+1 -1
View File
@@ -194,7 +194,7 @@ impl HeaderBuilder {
beefy_next_authority_set: BeefyNextAuthoritySet {
id: next_validator_set_id,
len: next_validators.len() as u32,
root: next_validators_mmr_root,
keyset_commitment: next_validators_mmr_root,
},
leaf_extra: (),
};
+1 -1
View File
@@ -42,7 +42,7 @@ fn verify_authority_set<T: Config<I>, I: 'static>(
// Ensure that the authority set that signed the commitment is the expected one.
let root = get_authorities_mmr_root::<T, I, _>(authority_set.validators().iter());
ensure!(root == authority_set_info.root, Error::<T, I>::InvalidValidatorSetRoot);
ensure!(root == authority_set_info.keyset_commitment, Error::<T, I>::InvalidValidatorSetRoot);
Ok(())
}