mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 15:21:05 +00:00
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:
committed by
Bastian Köcher
parent
98ee19cb7d
commit
2c26640ac3
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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: (),
|
||||
};
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user