Unverified Commit 4382d2f4 authored by Tomasz Drwięga's avatar Tomasz Drwięga
Browse files

Update beefy repo.

parent dd5425a1
Pipeline #122966 passed with stages
in 23 minutes and 9 seconds
This diff is collapsed.
......@@ -839,9 +839,6 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
pallet_beefy: Some(Default::default()),
// TODO [ToDr] Beefy authorities
authorities: vec![],
pallet_indices: Some(rococo_runtime::IndicesConfig {
indices: vec![],
......@@ -19,16 +19,16 @@
use beefy_primitives::ValidatorSetId;
use sp_core::H256;
use sp_std::prelude::*;
use frame_support::{decl_error, decl_module, decl_storage, RuntimeDebug,};
use frame_support::{decl_module, decl_storage, RuntimeDebug,};
use pallet_mmr::primitives::LeafDataProvider;
use parity_scale_codec::{Encode, Decode};
use runtime_parachains::paras;
/// A leaf that gets added every block to the MMR constructed by [pallet_mmr].
#[derive(RuntimeDebug, PartialEq, Eq, Clone, Encode, Decode)]
pub struct MmrLeaf<Hash, MerkleRoot> {
/// Current block parent hash.
pub parent_hash: Hash,
pub struct MmrLeaf<BlockNumber, Hash, MerkleRoot> {
/// Current block parent number and hash.
pub parent_number_and_hash: (BlockNumber, Hash),
/// A merkle root of all registered parachain heads.
pub parachain_heads: MerkleRoot,
/// A merkle root of the next BEEFY authority set.
......@@ -62,13 +62,14 @@ impl<T: Config> LeafDataProvider for Module<T> where
MerkleRootOf<T>: From<H256>,
type LeafData = MmrLeaf<
<T as frame_system::Config>::BlockNumber,
<T as frame_system::Config>::Hash,
fn leaf_data() -> Self::LeafData {
MmrLeaf {
parent_hash: frame_system::Module::<T>::leaf_data(),
parent_number_and_hash: frame_system::Module::<T>::leaf_data(),
parachain_heads: Module::<T>::parachain_heads_merkle_root(),
beefy_next_authority_set: (
......@@ -129,7 +130,7 @@ impl<T: Config> sp_runtime::BoundToRuntimeAppPublic for Module<T> {
type Public = <T as pallet_beefy::Config>::AuthorityId;
impl<T: Config> pallet_session::OneSessionHandler<T::AccountId> for Module<T> where
impl<T: Config> frame_support::traits::OneSessionHandler<T::AccountId> for Module<T> where
T: pallet_session::Config,
MerkleRootOf<T>: From<H256>,
......@@ -48,7 +48,7 @@ use sp_runtime::{
transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority},
self, BlakeTwo256, Block as BlockT, OpaqueKeys, AccountIdLookup,
self, Keccak256, BlakeTwo256, Block as BlockT, OpaqueKeys, AccountIdLookup,
Extrinsic as ExtrinsicT, SaturatedConversion, Verify,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment