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

Update to SDK stable2409-1 #490

Open
wants to merge 64 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8066fc1
chore(Cargo): update SDK to `stable2409`
pandres95 Oct 19, 2024
0450dd2
wip(workspace): disable Encointer
pandres95 Oct 19, 2024
dc1f07d
feat(relay): Configure Polkadot
pandres95 Oct 19, 2024
3f5d163
feat(relay): Configure Kusama
pandres95 Oct 20, 2024
cec40cb
feat(system-parachains/asset-hubs): Configure AH Kusama
pandres95 Oct 20, 2024
271ca20
feat(system-parachains/asset-hubs): Configure AH Polkadot
pandres95 Oct 20, 2024
33b18d4
feat(system-parachains/bridge-hubs): Configure BH Polkadot
pandres95 Oct 20, 2024
6f42f23
feat(system-parachains/bridge-hubs): Configure BH Kusama
pandres95 Oct 21, 2024
161bfaf
feat(system-parachains/collectives): Configure Collectives Polkadot
pandres95 Oct 21, 2024
4ec6e3a
feat(system-parachains/coretime): Configure Coretime Kusama
pandres95 Oct 21, 2024
44d41a9
feat(system-parachains/coretime): Configure Coretime Polkadot
pandres95 Oct 21, 2024
1e0e946
feat(system-parachains/people): Configure People Kusama
pandres95 Oct 21, 2024
62af401
feat(system-parachains/people): Configure People Polkadot
pandres95 Oct 21, 2024
e0760ad
change(integration-tests/emulated): Configure Penpal
pandres95 Oct 21, 2024
715531f
change(system-parachains): adjust tests + minor fixes
pandres95 Oct 21, 2024
457dab3
change(integration-tests): minor adjustments
pandres95 Oct 21, 2024
f2a3fce
fix(relay): missing `BenchmarkHelper` for `pallet_mmr`
pandres95 Oct 21, 2024
fd15642
fix(relay/kusama): missing feature propagation
pandres95 Oct 21, 2024
358e23e
fix(relay): lint Cargo.toml + features propagation
pandres95 Oct 21, 2024
9bf828f
fix(system-parachains/bridge-hubs): missing structures used in benchm…
pandres95 Oct 22, 2024
632b7a2
Merge branch 'main' into upgrade-polkadot-stable2409
pandres95 Oct 23, 2024
446b803
change(system-parachain/bridge-hubs): make clippy happy
pandres95 Oct 23, 2024
4142150
change(system-parachains): address changes suggested by @bkontur
pandres95 Oct 23, 2024
f2a9042
feat(system-parachains/asset-hubs): Add primitive const values for AH…
pandres95 Oct 23, 2024
4b340e0
feat(system-parachains/bridge-hubs): migration to add lanes to storage
pandres95 Oct 23, 2024
5338f1f
change(system-parachains/coretime): address changes suggested by @sze…
pandres95 Oct 23, 2024
ff1416d
fix(system-parachains/bridge-hub-polkadot): `XcmOverBridgeHubPolkadot…
pandres95 Oct 23, 2024
f7003d1
fix(system-parachains/bridge-hub-kusama): typo
pandres95 Oct 23, 2024
b574665
fix(system-parachains/bridge-hub-kusama): missing imports
pandres95 Oct 23, 2024
e71f52c
change: address suggestion from @seadanda
pandres95 Oct 23, 2024
88453df
Re-enable encointer in workspace and bump encointer to stable-202409-…
clangenb Oct 23, 2024
f53bb89
Merge branch 'main' into upgrade-polkadot-stable2409
pandres95 Oct 24, 2024
efeb06f
fix(integration-tests/asset): ensure para-to-para foreign assets thro…
pandres95 Oct 24, 2024
f1baf1c
change(integration-tests): fix lanes configurations and test setup co…
pandres95 Oct 24, 2024
a7e4821
fix(integration-tests): lint cargo.toml files
pandres95 Oct 24, 2024
497e724
wip(CHANGELOG): add from changed introduced in #490
pandres95 Oct 24, 2024
97596b5
change: move runners and workflows to use polkadot-stable2409
pandres95 Oct 24, 2024
cc5b8cf
fix(integration-tests): make clippy happy
pandres95 Oct 24, 2024
1faeb30
fix-wip(system-parachains/bridge-hubs): fulfill values on mock weight…
pandres95 Oct 25, 2024
f8adb35
fix(system-parachains/asset-hub-kusama): allow incoming assets from E…
pandres95 Oct 25, 2024
4e59b21
revert(system-parachains/bridge-hub-polkadot): remove `StorageWeight…
pandres95 Oct 25, 2024
524efc9
wip(bridge-hubs/bridge-hub-polkadot): decrease `refTime` in `snowbrid…
pandres95 Oct 26, 2024
595ce90
Snowbridge - Transfer native token to Ethereum tests (#2)
claravanstaden Oct 28, 2024
93fb88b
change(integration-tests/asset-hub-kusama): remove test references to…
pandres95 Oct 28, 2024
ae42f9c
fix: make clippy happy
pandres95 Oct 28, 2024
f5e70b0
Fix Snowbridge test resulting in overweight block (#3)
claravanstaden Oct 28, 2024
62cfc40
fix pna tests (#4)
claravanstaden Oct 29, 2024
6e1bf6d
make clippy happy 1/4
pandres95 Oct 29, 2024
f42fd5b
make clippy happy 2/4
pandres95 Oct 29, 2024
5f494c5
make clippy happy 3/4
pandres95 Oct 29, 2024
6e50ffa
make clippy happy 4/6
pandres95 Oct 29, 2024
8d8a2d9
make clippy happy 5/6
pandres95 Oct 29, 2024
e9b5c24
make clippy happy 6/6
pandres95 Oct 29, 2024
597f748
fix(system-parachains/bridge-hub-polkadot): make ci happy
pandres95 Oct 31, 2024
fc2b098
fix(system-parachains/bridge-hub-polkadot): missing feature propagation
pandres95 Oct 31, 2024
267a863
fix(system-parachains/bridge-hub-kusama): fix benchmarking configurat…
pandres95 Nov 1, 2024
a6ee868
chore(Cargo): update to `stable2409-1`
pandres95 Nov 4, 2024
90313b0
Merge branch 'main' into upgrade-polkadot-stable2409
pandres95 Nov 4, 2024
f54a026
chore(CHANGELOG): set changes from this PR to the "Unreleased" sectio…
pandres95 Nov 7, 2024
cf05416
Switch to using Delegation Staking for pools (#5)
Ank4n Nov 9, 2024
5767f90
Merge branch 'main' into upgrade-polkadot-stable2409
pandres95 Nov 17, 2024
adc262e
Mitigate coretime auto-renew benchmarked weights issues (#6)
seadanda Nov 20, 2024
0cc2571
Revert changes in Kusama runtime causing bench test failure (#8)
Ank4n Nov 22, 2024
ac46d87
Bridge fixes for stable2409 (#7)
bkontur Dec 3, 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,454 changes: 958 additions & 1,496 deletions Cargo.lock

Large diffs are not rendered by default.

354 changes: 177 additions & 177 deletions Cargo.toml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions chain-spec-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ asset-hub-kusama-runtime = { workspace = true }
collectives-polkadot-runtime = { workspace = true }
bridge-hub-polkadot-runtime = { workspace = true }
bridge-hub-kusama-runtime = { workspace = true }
encointer-kusama-runtime = { workspace = true }
# encointer-kusama-runtime = { workspace = true }
glutton-kusama-runtime = { workspace = true }
coretime-kusama-runtime = { workspace = true }
coretime-polkadot-runtime = { workspace = true }
Expand All @@ -39,7 +39,7 @@ runtime-benchmarks = [
"collectives-polkadot-runtime/runtime-benchmarks",
"coretime-kusama-runtime/runtime-benchmarks",
"coretime-polkadot-runtime/runtime-benchmarks",
"encointer-kusama-runtime/runtime-benchmarks",
# "encointer-kusama-runtime/runtime-benchmarks",
"glutton-kusama-runtime/runtime-benchmarks",
"kusama-runtime/runtime-benchmarks",
"people-kusama-runtime/runtime-benchmarks",
Expand All @@ -55,7 +55,7 @@ on-chain-release-build = [
"collectives-polkadot-runtime/on-chain-release-build",
"coretime-kusama-runtime/on-chain-release-build",
"coretime-polkadot-runtime/on-chain-release-build",
"encointer-kusama-runtime/on-chain-release-build",
# "encointer-kusama-runtime/on-chain-release-build",
"glutton-kusama-runtime/on-chain-release-build",
"kusama-runtime/on-chain-release-build",
"people-kusama-runtime/on-chain-release-build",
Expand Down
6 changes: 3 additions & 3 deletions chain-spec-generator/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
system_parachains_specs::{
AssetHubKusamaChainSpec, AssetHubPolkadotChainSpec, BridgeHubKusamaChainSpec,
BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, CoretimeKusamaChainSpec,
EncointerKusamaChainSpec, GluttonKusamaChainSpec, PeopleKusamaChainSpec,
/* EncointerKusamaChainSpec, */ GluttonKusamaChainSpec, PeopleKusamaChainSpec,
PeoplePolkadotChainSpec,
},
ChainSpec,
Expand Down Expand Up @@ -58,8 +58,8 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result<Box<dyn Chain
Ok(Box::new(CoretimeKusamaChainSpec::from_json_file(path)?)),
x if x.starts_with("glutton-kusama") =>
Ok(Box::new(GluttonKusamaChainSpec::from_json_file(path)?)),
x if x.starts_with("encointer-kusama") =>
Ok(Box::new(EncointerKusamaChainSpec::from_json_file(path)?)),
// x if x.starts_with("encointer-kusama") =>
// Ok(Box::new(EncointerKusamaChainSpec::from_json_file(path)?)),
x if x.starts_with("people-kusama") =>
Ok(Box::new(PeopleKusamaChainSpec::from_json_file(path)?)),
x if x.starts_with("people-polkadot") =>
Expand Down
8 changes: 4 additions & 4 deletions chain-spec-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ fn main() -> Result<(), String> {
"glutton-kusama-local",
Box::new(system_parachains_specs::glutton_kusama_local_testnet_config) as Box<_>,
),
(
"encointer-kusama-local",
Box::new(system_parachains_specs::encointer_kusama_local_testnet_config) as Box<_>,
),
// (
// "encointer-kusama-local",
// Box::new(system_parachains_specs::encointer_kusama_local_testnet_config) as Box<_>,
// ),
(
"coretime-kusama",
Box::new(system_parachains_specs::coretime_kusama_config) as Box<_>,
Expand Down
6 changes: 3 additions & 3 deletions chain-spec-generator/src/system_parachains_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<Extensions>;

pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<Extensions>;

pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec<Extensions>;
// pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec<Extensions>;

pub type CoretimeKusamaChainSpec = sc_chain_spec::GenericChainSpec<Extensions>;

Expand Down Expand Up @@ -172,7 +172,7 @@ pub fn glutton_kusama_local_testnet_config() -> Result<Box<dyn ChainSpec>, Strin
))
}

pub fn encointer_kusama_local_testnet_config() -> Result<Box<dyn ChainSpec>, String> {
/* pub fn encointer_kusama_local_testnet_config() -> Result<Box<dyn ChainSpec>, String> {
let mut properties = sc_chain_spec::Properties::new();
properties.insert("ss58Format".into(), 2.into());
properties.insert("tokenSymbol".into(), "KSM".into());
Expand All @@ -190,7 +190,7 @@ pub fn encointer_kusama_local_testnet_config() -> Result<Box<dyn ChainSpec>, Str
.with_properties(properties)
.build(),
))
}
} */

pub fn coretime_kusama_local_testnet_config() -> Result<Box<dyn ChainSpec>, String> {
let mut properties = sc_chain_spec::Properties::new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: coretime_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: coretime_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: people_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ pub fn genesis() -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: people_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ pub fn genesis(para_id: u32) -> Storage {
)
})
.collect(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
polkadot_xcm: penpal_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ pub fn genesis() -> Storage {
)
})
.collect::<Vec<_>>(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
babe: kusama_runtime::BabeConfig {
authorities: Default::default(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ pub fn genesis() -> Storage {
)
})
.collect::<Vec<_>>(),
// TODO: Any keys to add here?
non_authority_keys: vec![],
pandres95 marked this conversation as resolved.
Show resolved Hide resolved
},
staking: polkadot_runtime::StakingConfig {
validator_count: validators::initial_authorities().len() as u32,
Expand Down
2 changes: 1 addition & 1 deletion relay/kusama/src/genesis_config_presets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn default_parachains_host_configuration() -> HostConfiguration<polkadot_primiti
relay_vrf_modulo_samples: 2,
zeroth_delay_tranche_width: 0,
minimum_validation_upgrade_delay: 5,
scheduler_params: polkadot_primitives::vstaging::SchedulerParams {
scheduler_params: polkadot_primitives::SchedulerParams {
group_rotation_frequency: 20,
paras_availability_period: 4,
..Default::default()
Expand Down
71 changes: 55 additions & 16 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ use sp_std::{
};

use runtime_parachains::{
assigner_coretime as parachains_assigner_coretime,
assigner_on_demand as parachains_assigner_on_demand, configuration as parachains_configuration,
assigner_coretime as parachains_assigner_coretime, configuration as parachains_configuration,
configuration::ActiveConfigHrmpChannelSizeAndCapacityRatio,
coretime, disputes as parachains_disputes,
disputes::slashing as parachains_slashing,
dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion,
inclusion::{AggregateMessageOrigin, UmpQueueId},
initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras,
initializer as parachains_initializer, on_demand as parachains_on_demand,
origin as parachains_origin, paras as parachains_paras,
paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points,
runtime_api_impl::{
v10 as parachains_runtime_api_impl, vstaging as parachains_vstaging_api_impl,
Expand All @@ -77,6 +77,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::{
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
mmr::{BeefyDataProvider, MmrLeafVersion},
OpaqueKeyOwnershipProof,
};
use frame_election_provider_support::{
bounds::ElectionBoundsBuilder, generate_solution_type, onchain, NposSolution,
Expand Down Expand Up @@ -108,7 +109,8 @@ use sp_runtime::{
Verify,
},
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug,
ApplyExtrinsicResult, FixedU128, KeyTypeId, OpaqueValue, Perbill, Percent, Permill,
RuntimeDebug,
};
use sp_staking::SessionIndex;
#[cfg(any(feature = "std", test))]
Expand Down Expand Up @@ -367,6 +369,7 @@ impl pallet_beefy::Config for Runtime {
type MaxNominators = MaxNominators;
type MaxSetIdSessionEntries = BeefySetIdSessionEntries;
type OnNewValidatorSet = BeefyMmrLeaf;
type AncestryHelper = BeefyMmrLeaf;
type WeightInfo = ();
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, BeefyId)>>::Proof;
type EquivocationReportSystem =
Expand Down Expand Up @@ -432,6 +435,7 @@ impl pallet_beefy_mmr::Config for Runtime {
type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum;
type LeafExtra = H256;
type BeefyDataProvider = ParaHeadsRootProvider;
type WeightInfo = weights::pallet_beefy_mmr::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -1425,11 +1429,11 @@ parameter_types! {
pub const OnDemandPalletId: PalletId = PalletId(*b"py/ondmd");
}

impl parachains_assigner_on_demand::Config for Runtime {
impl parachains_on_demand::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type TrafficDefaultValue = OnDemandTrafficDefaultValue;
type WeightInfo = weights::runtime_parachains_assigner_on_demand::WeightInfo<Runtime>;
type WeightInfo = weights::runtime_parachains_on_demand::WeightInfo<Runtime>;
type MaxHistoricalRevenue = MaxHistoricalRevenue;
type PalletId = OnDemandPalletId;
}
Expand Down Expand Up @@ -1745,7 +1749,7 @@ construct_runtime! {
ParaSessionInfo: parachains_session_info = 61,
ParasDisputes: parachains_disputes = 62,
ParasSlashing: parachains_slashing = 63,
OnDemandAssignmentProvider: parachains_assigner_on_demand = 64,
OnDemandAssignmentProvider: parachains_on_demand = 64,
CoretimeAssignmentProvider: parachains_assigner_coretime = 65,

// Parachain Onboarding Pallets. Start indices at 70 to leave room.
Expand Down Expand Up @@ -1819,7 +1823,7 @@ pub mod migrations {
parachains_configuration::migration::v12::MigrateToV12<Runtime>,
pallet_staking::migrations::v15::MigrateV14ToV15<Runtime>,
parachains_inclusion::migration::MigrateToV1<Runtime>,
parachains_assigner_on_demand::migration::MigrateV0ToV1<Runtime>,
parachains_on_demand::migration::MigrateV0ToV1<Runtime>,
restore_corrupted_ledgers::Migrate<Runtime>,
);

Expand Down Expand Up @@ -2325,22 +2329,39 @@ sp_api::impl_runtime_apis! {
Beefy::validator_set()
}

fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: beefy_primitives::DoubleVotingProof<
BlockNumber,
BeefyId,
BeefySignature,
>,
key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof,
fn submit_report_double_voting_unsigned_extrinsic(
equivocation_proof:
beefy_primitives::DoubleVotingProof<BlockNumber, BeefyId, BeefySignature>,
key_owner_proof: OpaqueKeyOwnershipProof,
) -> Option<()> {
let key_owner_proof = key_owner_proof.decode()?;

Beefy::submit_unsigned_equivocation_report(
Beefy::submit_unsigned_double_voting_report(
equivocation_proof,
key_owner_proof,
)
}

fn submit_report_fork_voting_unsigned_extrinsic(
equivocation_proof: beefy_primitives::ForkVotingProof<Header, BeefyId, OpaqueValue>,
key_owner_proof: OpaqueKeyOwnershipProof,
) -> Option<()> {
Beefy::submit_unsigned_fork_voting_report(
equivocation_proof.try_into()?,
key_owner_proof.decode()?,
)
}

fn submit_report_future_block_voting_unsigned_extrinsic(
equivocation_proof: beefy_primitives::FutureBlockVotingProof<BlockNumber,BeefyId> ,
key_owner_proof: OpaqueKeyOwnershipProof,
) -> Option<()> {
Beefy::submit_unsigned_future_block_voting_report(
equivocation_proof,
key_owner_proof.decode()?,
)
}

fn generate_key_ownership_proof(
_set_id: beefy_primitives::ValidatorSetId,
authority_id: BeefyId,
Expand All @@ -2351,6 +2372,16 @@ sp_api::impl_runtime_apis! {
.map(|p| p.encode())
.map(beefy_primitives::OpaqueKeyOwnershipProof::new)
}

fn generate_ancestry_proof(
prev_block_number: BlockNumber,
best_known_block_number: Option<BlockNumber>,
) -> Option<sp_runtime::OpaqueValue> {
Mmr::generate_ancestry_proof(prev_block_number, best_known_block_number)
.map(|p| p.encode())
.map(OpaqueKeyOwnershipProof::new)
.ok()
}
}

impl mmr::MmrApi<Block, Hash, BlockNumber> for Runtime {
Expand Down Expand Up @@ -2639,6 +2670,14 @@ sp_api::impl_runtime_apis! {
fn member_needs_delegate_migration(member: AccountId) -> bool {
NominationPools::api_member_needs_delegate_migration(member)
}

fn member_total_balance(who: AccountId) -> Balance {
NominationPools::api_member_total_balance(who)
}

fn pool_balance(pool_id: pallet_nomination_pools::PoolId) -> Balance {
NominationPools::api_pool_balance(pool_id)
}
}

impl pallet_staking_runtime_api::StakingApi<Block, Balance, AccountId> for Runtime {
Expand Down
3 changes: 2 additions & 1 deletion relay/kusama/src/weights/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading