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

Bump Substrate, Polkadot and Cumulus #2223

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
958 changes: 487 additions & 471 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions bin/millau/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

use millau_runtime::{
AccountId, AuraConfig, BalancesConfig, BeefyConfig, BridgeRialtoMessagesConfig,
BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GenesisConfig, GrandpaConfig,
SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GrandpaConfig,
RuntimeGenesisConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig,
WASM_BINARY,
};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_consensus_beefy::crypto::AuthorityId as BeefyId;
Expand All @@ -41,7 +42,7 @@ const RIALTO_MESSAGES_PALLET_OWNER: &str = "Rialto.MessagesOwner";
const RIALTO_PARACHAIN_MESSAGES_PALLET_OWNER: &str = "RialtoParachain.MessagesOwner";

/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>;
pub type ChainSpec = sc_service::GenericChainSpec<RuntimeGenesisConfig>;

/// The chain specification option. This is expected to come in from the CLI and
/// is little more than one of a number of alternatives which can easily be converted
Expand Down Expand Up @@ -193,8 +194,8 @@ fn testnet_genesis(
root_key: AccountId,
endowed_accounts: Vec<AccountId>,
_enable_println: bool,
) -> GenesisConfig {
GenesisConfig {
) -> RuntimeGenesisConfig {
RuntimeGenesisConfig {
system: SystemConfig {
code: WASM_BINARY.expect("Millau development WASM not available").to_vec(),
},
Expand Down
3 changes: 2 additions & 1 deletion bin/millau/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_consensus_beefy::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion, ValidatorSet};
use sp_core::OpaqueMetadata;
use sp_core::{ConstBool, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{Block as BlockT, IdentityLookup, Keccak256, NumberFor, OpaqueKeys},
Expand Down Expand Up @@ -229,6 +229,7 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type MaxAuthorities = ConstU32<10>;
type DisabledValidators = ();
type AllowMultipleBlocksPerSlot = ConstBool<false>;
}

impl pallet_beefy::Config for Runtime {
Expand Down
1 change: 1 addition & 0 deletions bin/millau/runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
}

/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior
Expand Down
6 changes: 3 additions & 3 deletions bin/rialto-parachain/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const MILLAU_MESSAGES_PALLET_OWNER: &str = "Millau.MessagesOwner";

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec =
sc_service::GenericChainSpec<rialto_parachain_runtime::GenesisConfig, Extensions>;
sc_service::GenericChainSpec<rialto_parachain_runtime::RuntimeGenesisConfig, Extensions>;

/// Helper function to generate a crypto pair from seed
pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
Expand Down Expand Up @@ -176,8 +176,8 @@ fn testnet_genesis(
initial_authorities: Vec<AuraId>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> rialto_parachain_runtime::GenesisConfig {
rialto_parachain_runtime::GenesisConfig {
) -> rialto_parachain_runtime::RuntimeGenesisConfig {
rialto_parachain_runtime::RuntimeGenesisConfig {
system: rialto_parachain_runtime::SystemConfig {
code: rialto_parachain_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
Expand Down
2 changes: 1 addition & 1 deletion bin/rialto-parachain/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ pub fn run() -> Result<()> {
let id = ParaId::from(cli.parachain_id.or(para_id).expect("Missing ParaId"));

let parachain_account =
AccountIdConversion::<polkadot_primitives::v4::AccountId>::into_account_truncating(&id);
AccountIdConversion::<polkadot_primitives::v5::AccountId>::into_account_truncating(&id);

let state_version =
RelayChainCli::native_runtime_version(&config.chain_spec).state_version();
Expand Down
4 changes: 3 additions & 1 deletion bin/rialto-parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use codec::{Decode, Encode};
use cumulus_pallet_parachain_system::AnyRelayNumber;
use scale_info::TypeInfo;
use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_core::{crypto::KeyTypeId, ConstBool, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{AccountIdLookup, Block as BlockT, DispatchInfoOf, SignedExtension},
Expand Down Expand Up @@ -461,6 +461,7 @@ impl Config for XcmConfig {
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
}

/// No local origins on this chain are allowed to dispatch XCM sends/executions.
Expand Down Expand Up @@ -529,6 +530,7 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = MaxAuthorities;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
}

impl pallet_bridge_relayers::Config for Runtime {
Expand Down
16 changes: 8 additions & 8 deletions bin/rialto/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.

use polkadot_primitives::v4::{AssignmentId, ValidatorId};
use polkadot_primitives::v5::{AssignmentId, ValidatorId};
use rialto_runtime::{
AccountId, BabeConfig, BalancesConfig, BeefyConfig, BridgeMillauMessagesConfig,
ConfigurationConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature,
SudoConfig, SystemConfig, WASM_BINARY,
ConfigurationConfig, GrandpaConfig, RuntimeGenesisConfig, SessionConfig, SessionKeys,
Signature, SudoConfig, SystemConfig, WASM_BINARY,
};
use serde_json::json;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
Expand All @@ -41,7 +41,7 @@ const MILLAU_MESSAGES_PALLET_OWNER: &str = "Millau.MessagesOwner";

/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec =
sc_service::GenericChainSpec<GenesisConfig, polkadot_service::chain_spec::Extensions>;
sc_service::GenericChainSpec<RuntimeGenesisConfig, polkadot_service::chain_spec::Extensions>;

/// The chain specification option. This is expected to come in from the CLI and
/// is little more than one of a number of alternatives which can easily be converted
Expand Down Expand Up @@ -200,8 +200,8 @@ fn testnet_genesis(
root_key: AccountId,
endowed_accounts: Vec<AccountId>,
_enable_println: bool,
) -> GenesisConfig {
GenesisConfig {
) -> RuntimeGenesisConfig {
RuntimeGenesisConfig {
system: SystemConfig {
code: WASM_BINARY.expect("Rialto development WASM not available").to_vec(),
},
Expand Down Expand Up @@ -243,8 +243,8 @@ fn testnet_genesis(
validation_upgrade_cooldown: 2u32,
validation_upgrade_delay: 2,
code_retention_period: 1200,
max_code_size: polkadot_primitives::v4::MAX_CODE_SIZE,
max_pov_size: polkadot_primitives::v4::MAX_POV_SIZE,
max_code_size: polkadot_primitives::v5::MAX_CODE_SIZE,
max_pov_size: polkadot_primitives::v5::MAX_POV_SIZE,
max_head_data_size: 32 * 1024,
group_rotation_frequency: 20,
chain_availability_period: 4,
Expand Down
115 changes: 68 additions & 47 deletions bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,55 +752,55 @@ impl_runtime_apis! {
}

impl polkadot_primitives::runtime_api::ParachainHost<Block, Hash, BlockNumber> for Runtime {
fn validators() -> Vec<polkadot_primitives::v4::ValidatorId> {
polkadot_runtime_parachains::runtime_api_impl::v4::validators::<Runtime>()
fn validators() -> Vec<polkadot_primitives::v5::ValidatorId> {
polkadot_runtime_parachains::runtime_api_impl::v5::validators::<Runtime>()
}

fn validator_groups() -> (Vec<Vec<polkadot_primitives::v4::ValidatorIndex>>, polkadot_primitives::v4::GroupRotationInfo<BlockNumber>) {
polkadot_runtime_parachains::runtime_api_impl::v4::validator_groups::<Runtime>()
fn validator_groups() -> (Vec<Vec<polkadot_primitives::v5::ValidatorIndex>>, polkadot_primitives::v5::GroupRotationInfo<BlockNumber>) {
polkadot_runtime_parachains::runtime_api_impl::v5::validator_groups::<Runtime>()
}

fn availability_cores() -> Vec<polkadot_primitives::v4::CoreState<Hash, BlockNumber>> {
polkadot_runtime_parachains::runtime_api_impl::v4::availability_cores::<Runtime>()
fn availability_cores() -> Vec<polkadot_primitives::v5::CoreState<Hash, BlockNumber>> {
polkadot_runtime_parachains::runtime_api_impl::v5::availability_cores::<Runtime>()
}

fn persisted_validation_data(para_id: polkadot_primitives::v4::Id, assumption: polkadot_primitives::v4::OccupiedCoreAssumption)
-> Option<polkadot_primitives::v4::PersistedValidationData<Hash, BlockNumber>> {
polkadot_runtime_parachains::runtime_api_impl::v4::persisted_validation_data::<Runtime>(para_id, assumption)
fn persisted_validation_data(para_id: polkadot_primitives::v5::Id, assumption: polkadot_primitives::v5::OccupiedCoreAssumption)
-> Option<polkadot_primitives::v5::PersistedValidationData<Hash, BlockNumber>> {
polkadot_runtime_parachains::runtime_api_impl::v5::persisted_validation_data::<Runtime>(para_id, assumption)
}

fn assumed_validation_data(
para_id: polkadot_primitives::v4::Id,
para_id: polkadot_primitives::v5::Id,
expected_persisted_validation_data_hash: Hash,
) -> Option<(polkadot_primitives::v4::PersistedValidationData<Hash, BlockNumber>, polkadot_primitives::v4::ValidationCodeHash)> {
polkadot_runtime_parachains::runtime_api_impl::v4::assumed_validation_data::<Runtime>(
) -> Option<(polkadot_primitives::v5::PersistedValidationData<Hash, BlockNumber>, polkadot_primitives::v5::ValidationCodeHash)> {
polkadot_runtime_parachains::runtime_api_impl::v5::assumed_validation_data::<Runtime>(
para_id,
expected_persisted_validation_data_hash,
)
}

fn check_validation_outputs(
para_id: polkadot_primitives::v4::Id,
outputs: polkadot_primitives::v4::CandidateCommitments,
para_id: polkadot_primitives::v5::Id,
outputs: polkadot_primitives::v5::CandidateCommitments,
) -> bool {
polkadot_runtime_parachains::runtime_api_impl::v4::check_validation_outputs::<Runtime>(para_id, outputs)
polkadot_runtime_parachains::runtime_api_impl::v5::check_validation_outputs::<Runtime>(para_id, outputs)
}

fn session_index_for_child() -> polkadot_primitives::v4::SessionIndex {
polkadot_runtime_parachains::runtime_api_impl::v4::session_index_for_child::<Runtime>()
fn session_index_for_child() -> polkadot_primitives::v5::SessionIndex {
polkadot_runtime_parachains::runtime_api_impl::v5::session_index_for_child::<Runtime>()
}

fn validation_code(para_id: polkadot_primitives::v4::Id, assumption: polkadot_primitives::v4::OccupiedCoreAssumption)
-> Option<polkadot_primitives::v4::ValidationCode> {
polkadot_runtime_parachains::runtime_api_impl::v4::validation_code::<Runtime>(para_id, assumption)
fn validation_code(para_id: polkadot_primitives::v5::Id, assumption: polkadot_primitives::v5::OccupiedCoreAssumption)
-> Option<polkadot_primitives::v5::ValidationCode> {
polkadot_runtime_parachains::runtime_api_impl::v5::validation_code::<Runtime>(para_id, assumption)
}

fn candidate_pending_availability(para_id: polkadot_primitives::v4::Id) -> Option<polkadot_primitives::v4::CommittedCandidateReceipt<Hash>> {
polkadot_runtime_parachains::runtime_api_impl::v4::candidate_pending_availability::<Runtime>(para_id)
fn candidate_pending_availability(para_id: polkadot_primitives::v5::Id) -> Option<polkadot_primitives::v5::CommittedCandidateReceipt<Hash>> {
polkadot_runtime_parachains::runtime_api_impl::v5::candidate_pending_availability::<Runtime>(para_id)
}

fn candidate_events() -> Vec<polkadot_primitives::v4::CandidateEvent<Hash>> {
polkadot_runtime_parachains::runtime_api_impl::v4::candidate_events::<Runtime, _>(|ev| {
fn candidate_events() -> Vec<polkadot_primitives::v5::CandidateEvent<Hash>> {
polkadot_runtime_parachains::runtime_api_impl::v5::candidate_events::<Runtime, _>(|ev| {
match ev {
RuntimeEvent::Inclusion(ev) => {
Some(ev)
Expand All @@ -810,54 +810,75 @@ impl_runtime_apis! {
})
}

fn session_info(index: polkadot_primitives::v4::SessionIndex) -> Option<polkadot_primitives::v4::SessionInfo> {
polkadot_runtime_parachains::runtime_api_impl::v4::session_info::<Runtime>(index)
fn session_info(index: polkadot_primitives::v5::SessionIndex) -> Option<polkadot_primitives::v5::SessionInfo> {
polkadot_runtime_parachains::runtime_api_impl::v5::session_info::<Runtime>(index)
}

fn dmq_contents(recipient: polkadot_primitives::v4::Id) -> Vec<polkadot_primitives::v4::InboundDownwardMessage<BlockNumber>> {
polkadot_runtime_parachains::runtime_api_impl::v4::dmq_contents::<Runtime>(recipient)
fn dmq_contents(recipient: polkadot_primitives::v5::Id) -> Vec<polkadot_primitives::v5::InboundDownwardMessage<BlockNumber>> {
polkadot_runtime_parachains::runtime_api_impl::v5::dmq_contents::<Runtime>(recipient)
}

fn inbound_hrmp_channels_contents(
recipient: polkadot_primitives::v4::Id
) -> BTreeMap<polkadot_primitives::v4::Id, Vec<polkadot_primitives::v4::InboundHrmpMessage<BlockNumber>>> {
polkadot_runtime_parachains::runtime_api_impl::v4::inbound_hrmp_channels_contents::<Runtime>(recipient)
recipient: polkadot_primitives::v5::Id
) -> BTreeMap<polkadot_primitives::v5::Id, Vec<polkadot_primitives::v5::InboundHrmpMessage<BlockNumber>>> {
polkadot_runtime_parachains::runtime_api_impl::v5::inbound_hrmp_channels_contents::<Runtime>(recipient)
}

fn validation_code_by_hash(hash: polkadot_primitives::v4::ValidationCodeHash) -> Option<polkadot_primitives::v4::ValidationCode> {
polkadot_runtime_parachains::runtime_api_impl::v4::validation_code_by_hash::<Runtime>(hash)
fn validation_code_by_hash(hash: polkadot_primitives::v5::ValidationCodeHash) -> Option<polkadot_primitives::v5::ValidationCode> {
polkadot_runtime_parachains::runtime_api_impl::v5::validation_code_by_hash::<Runtime>(hash)
}

fn on_chain_votes() -> Option<polkadot_primitives::v4::ScrapedOnChainVotes<Hash>> {
polkadot_runtime_parachains::runtime_api_impl::v4::on_chain_votes::<Runtime>()
fn on_chain_votes() -> Option<polkadot_primitives::v5::ScrapedOnChainVotes<Hash>> {
polkadot_runtime_parachains::runtime_api_impl::v5::on_chain_votes::<Runtime>()
}

fn submit_pvf_check_statement(stmt: polkadot_primitives::v4::PvfCheckStatement, signature: polkadot_primitives::v4::ValidatorSignature) {
polkadot_runtime_parachains::runtime_api_impl::v4::submit_pvf_check_statement::<Runtime>(stmt, signature)
fn submit_pvf_check_statement(stmt: polkadot_primitives::v5::PvfCheckStatement, signature: polkadot_primitives::v5::ValidatorSignature) {
polkadot_runtime_parachains::runtime_api_impl::v5::submit_pvf_check_statement::<Runtime>(stmt, signature)
}

fn pvfs_require_precheck() -> Vec<polkadot_primitives::v4::ValidationCodeHash> {
polkadot_runtime_parachains::runtime_api_impl::v4::pvfs_require_precheck::<Runtime>()
fn pvfs_require_precheck() -> Vec<polkadot_primitives::v5::ValidationCodeHash> {
polkadot_runtime_parachains::runtime_api_impl::v5::pvfs_require_precheck::<Runtime>()
}

fn validation_code_hash(para_id: polkadot_primitives::v4::Id, assumption: polkadot_primitives::v4::OccupiedCoreAssumption)
-> Option<polkadot_primitives::v4::ValidationCodeHash>
fn validation_code_hash(para_id: polkadot_primitives::v5::Id, assumption: polkadot_primitives::v5::OccupiedCoreAssumption)
-> Option<polkadot_primitives::v5::ValidationCodeHash>
{
polkadot_runtime_parachains::runtime_api_impl::v4::validation_code_hash::<Runtime>(para_id, assumption)
polkadot_runtime_parachains::runtime_api_impl::v5::validation_code_hash::<Runtime>(para_id, assumption)
}

fn disputes() -> Vec<(polkadot_primitives::v4::SessionIndex, polkadot_primitives::v4::CandidateHash, polkadot_primitives::v4::DisputeState<BlockNumber>)> {
polkadot_runtime_parachains::runtime_api_impl::v4::get_session_disputes::<Runtime>()
fn disputes() -> Vec<(polkadot_primitives::v5::SessionIndex, polkadot_primitives::v5::CandidateHash, polkadot_primitives::v5::DisputeState<BlockNumber>)> {
polkadot_runtime_parachains::runtime_api_impl::v5::get_session_disputes::<Runtime>()
}

fn session_executor_params(session_index: polkadot_primitives::v4::SessionIndex) -> Option<polkadot_primitives::v4::ExecutorParams> {
polkadot_runtime_parachains::runtime_api_impl::v4::session_executor_params::<Runtime>(session_index)
fn session_executor_params(session_index: polkadot_primitives::v5::SessionIndex) -> Option<polkadot_primitives::v5::ExecutorParams> {
polkadot_runtime_parachains::runtime_api_impl::v5::session_executor_params::<Runtime>(session_index)
}

fn unapplied_slashes(
) -> Vec<(polkadot_primitives::v5::SessionIndex, polkadot_primitives::v5::CandidateHash, polkadot_primitives::v5::slashing::PendingSlashes)> {
polkadot_runtime_parachains::runtime_api_impl::v5::unapplied_slashes::<Runtime>()
}

fn key_ownership_proof(
_validator_id: polkadot_primitives::v5::ValidatorId,
) -> Option<polkadot_primitives::v5::slashing::OpaqueKeyOwnershipProof> {
unimplemented!("Not used at Rialto")
}

fn submit_report_dispute_lost(
dispute_proof: polkadot_primitives::v5::slashing::DisputeProof,
key_ownership_proof: polkadot_primitives::v5::slashing::OpaqueKeyOwnershipProof,
) -> Option<()> {
polkadot_runtime_parachains::runtime_api_impl::v5::submit_unsigned_slashing_report::<Runtime>(
dispute_proof,
key_ownership_proof,
)
}
}

impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
fn authorities() -> Vec<AuthorityDiscoveryId> {
polkadot_runtime_parachains::runtime_api_impl::v4::relevant_authority_ids::<Runtime>()
polkadot_runtime_parachains::runtime_api_impl::v5::relevant_authority_ids::<Runtime>()
}
}

Expand Down
2 changes: 1 addition & 1 deletion bin/rialto/runtime/src/parachains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use frame_support::{
weights::{Weight, WeightMeter},
};
use frame_system::EnsureRoot;
use polkadot_primitives::v4::{ValidatorId, ValidatorIndex};
use polkadot_primitives::v5::{ValidatorId, ValidatorIndex};
use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots};
use polkadot_runtime_parachains::{
configuration as parachains_configuration, disputes as parachains_disputes,
Expand Down
1 change: 1 addition & 0 deletions bin/rialto/runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
}

/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior
Expand Down
6 changes: 3 additions & 3 deletions primitives/beefy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "bit-vec"] }
scale-info = { version = "2.6.0", default-features = false, features = ["bit-vec", "derive"] }
serde = { version = "1.0", optional = true }
scale-info = { version = "2.6.0", default-features = false, features = ["bit-vec", "derive", "serde"] }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }

# Bridge Dependencies

Expand All @@ -34,7 +34,7 @@ std = [
"pallet-beefy-mmr/std",
"pallet-mmr/std",
"scale-info/std",
"serde",
"serde/std",
"sp-consensus-beefy/std",
"sp-runtime/std",
"sp-std/std"
Expand Down
4 changes: 2 additions & 2 deletions primitives/beefy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use bp_runtime::{BasicOperatingMode, BlockNumberOf, Chain, HashOf};
use codec::{Decode, Encode};
use frame_support::Parameter;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use sp_runtime::{
traits::{Convert, MaybeSerializeDeserialize},
RuntimeAppPublic, RuntimeDebug,
Expand Down Expand Up @@ -127,8 +128,7 @@ pub type BeefyMmrLeafOf<C> = sp_consensus_beefy::mmr::MmrLeaf<
///
/// Provides the initial context that the bridge needs in order to know
/// where to start the sync process from.
#[derive(Encode, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
#[derive(Encode, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo, Serialize, Deserialize)]
pub struct InitializationData<BlockNumber, Hash> {
/// Pallet operating mode.
pub operating_mode: BasicOperatingMode,
Expand Down
Loading