Skip to content

Commit

Permalink
revert paritytech/polkadot#6577 & related changes (#3108)
Browse files Browse the repository at this point in the history
Moves `pallet_mmr` back behind `pallet_session` to address
polkadot-fellows/runtimes#160.

Opening draft for CI - should be merged or closed depending on outcome
of w3f/polkadot-spec#718.

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
  • Loading branch information
Lederstrumpf and acatangiu committed Jan 30, 2024
1 parent a190e0e commit e5bb11b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 19 deletions.
14 changes: 7 additions & 7 deletions polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,13 +1331,6 @@ construct_runtime! {
Offences: pallet_offences = 7,
Historical: session_historical = 34,

// BEEFY Bridges support.
Beefy: pallet_beefy = 240,
// MMR leaf construction must be before session in order to have leaf contents
// refer to block<N-1> consistently. see substrate issue #11797 for details.
Mmr: pallet_mmr = 241,
MmrLeaf: pallet_beefy_mmr = 242,

Session: pallet_session = 8,
Grandpa: pallet_grandpa = 10,
AuthorityDiscovery: pallet_authority_discovery = 12,
Expand Down Expand Up @@ -1423,6 +1416,13 @@ construct_runtime! {
// Pallet for sending XCM.
XcmPallet: pallet_xcm = 99,

// BEEFY Bridges support.
Beefy: pallet_beefy = 240,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue polkadot-fellows/runtimes#160 for details.
Mmr: pallet_mmr = 241,
MmrLeaf: pallet_beefy_mmr = 242,

// Pallet for migrating Identity to a parachain. To be removed post-migration.
IdentityMigrator: identity_migrator = 248,

Expand Down
14 changes: 7 additions & 7 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1413,13 +1413,6 @@ construct_runtime! {
Offences: pallet_offences = 7,
Historical: session_historical = 27,

// BEEFY Bridges support.
Beefy: pallet_beefy = 200,
// MMR leaf construction must be before session in order to have leaf contents refer to
// block<N-1> consistently. see substrate issue #11797 for details.
Mmr: pallet_mmr = 201,
BeefyMmrLeaf: pallet_beefy_mmr = 202,

Session: pallet_session = 8,
Grandpa: pallet_grandpa = 10,
AuthorityDiscovery: pallet_authority_discovery = 12,
Expand Down Expand Up @@ -1509,6 +1502,13 @@ construct_runtime! {
// Root testing pallet.
RootTesting: pallet_root_testing = 102,

// BEEFY Bridges support.
Beefy: pallet_beefy = 200,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue polkadot-fellows/runtimes#160 for details.
Mmr: pallet_mmr = 201,
BeefyMmrLeaf: pallet_beefy_mmr = 202,

// Pallet for migrating Identity to a parachain. To be removed post-migration.
IdentityMigrator: identity_migrator = 248,
}
Expand Down
18 changes: 18 additions & 0 deletions prdoc/pr_3108.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: revert paritytech/polkadot#6577 & related changes

doc:
- audience: Node Dev
description: |
Moves BEEFY related pallets behind `session_pallet` for Rococo and Westend runtimes.
Effects that each `MmrLeaf` in the MMR generated by `mmr_pallet` for `block<N>` references the `next_auth_set` of `block<N>` and not `block<N-1>`.
Breaking change for proofs generated by `mmr_generateProof`
- audience: Runtime Dev
description: |
Moves BEEFY related pallets behind `session_pallet` for Rococo and Westend runtimes.
Effects that each `MmrLeaf` in the MMR generated by `mmr_pallet` for `block<N>` references the `next_auth_set` of `block<N>` and not `block<N-1>`.


crates: []
10 changes: 5 additions & 5 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2099,11 +2099,6 @@ construct_runtime!(
AssetConversionTxPayment: pallet_asset_conversion_tx_payment,
ElectionProviderMultiPhase: pallet_election_provider_multi_phase,
Staking: pallet_staking,
Beefy: pallet_beefy,
// MMR leaf construction must be before session in order to have leaf contents
// refer to block<N-1> consistently. see substrate issue #11797 for details.
Mmr: pallet_mmr,
MmrLeaf: pallet_beefy_mmr,
Session: pallet_session,
Democracy: pallet_democracy,
Council: pallet_collective::<Instance1>,
Expand Down Expand Up @@ -2133,6 +2128,11 @@ construct_runtime!(
Tips: pallet_tips,
Assets: pallet_assets::<Instance1>,
PoolAssets: pallet_assets::<Instance2>,
Beefy: pallet_beefy,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue polkadot-fellows/runtimes#160 for details.
Mmr: pallet_mmr,
MmrLeaf: pallet_beefy_mmr,
Lottery: pallet_lottery,
Nis: pallet_nis,
Uniques: pallet_uniques,
Expand Down

0 comments on commit e5bb11b

Please sign in to comment.