From 6c7790757d7688c786ceec5f7adeb271a795c000 Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Mon, 29 Jan 2024 14:13:08 +0100 Subject: [PATCH 1/4] revert paritytech/polkadot#6577 & related changes Moves `pallet_mmr` back behind `pallet_session` to address polkadot-fellows/runtimes#160. --- polkadot/runtime/rococo/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 69261b2b03f38..673a5d7eb1d6e 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -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 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, @@ -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. See issue #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, From 0e2ff1a5781c90d749d153f4902380854aacbe1c Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Tue, 30 Jan 2024 04:42:50 +0100 Subject: [PATCH 2/4] add prdoc --- prdoc/pr_3108.prdoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 prdoc/pr_3108.prdoc diff --git a/prdoc/pr_3108.prdoc b/prdoc/pr_3108.prdoc new file mode 100644 index 0000000000000..2281b89c6b9b4 --- /dev/null +++ b/prdoc/pr_3108.prdoc @@ -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`. + Effects that each `MmrLeaf` in the MMR generated by `mmr_pallet` for `block` references the `next_auth_set` of `block` and not `block`. + Breaking change for proofs generated by `mmr_generateProof` + - audience: Runtime Dev + description: | + Moves BEEFY related pallets behind `session_pallet`. + Effects that each `MmrLeaf` in the MMR generated by `mmr_pallet` for `block` references the `next_auth_set` of `block` and not `block`. + + +crates: [] From 18061f7ab35fa698f39c2edcc75252f8ad53dccf Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Tue, 30 Jan 2024 05:12:34 +0100 Subject: [PATCH 3/4] add to Westend runtime & update prdoc --- polkadot/runtime/rococo/src/lib.rs | 2 +- polkadot/runtime/westend/src/lib.rs | 14 +++++++------- prdoc/pr_3108.prdoc | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 673a5d7eb1d6e..7a39cb082f4bf 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1419,7 +1419,7 @@ construct_runtime! { // 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. See issue #160 for details. + // refer to block. See issue polkadot-fellows/runtimes#160 for details. Mmr: pallet_mmr = 241, MmrLeaf: pallet_beefy_mmr = 242, diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 67cb9e3ccb832..6d8ba63f26991 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -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 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, @@ -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. 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, } diff --git a/prdoc/pr_3108.prdoc b/prdoc/pr_3108.prdoc index 2281b89c6b9b4..3f3259b1004f7 100644 --- a/prdoc/pr_3108.prdoc +++ b/prdoc/pr_3108.prdoc @@ -6,12 +6,12 @@ title: revert paritytech/polkadot#6577 & related changes doc: - audience: Node Dev description: | - Moves BEEFY related pallets behind `session_pallet`. + 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` references the `next_auth_set` of `block` and not `block`. Breaking change for proofs generated by `mmr_generateProof` - audience: Runtime Dev description: | - Moves BEEFY related pallets behind `session_pallet`. + 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` references the `next_auth_set` of `block` and not `block`. From 56765f77baa7c6ce40e1c68838c9f0430db3a6e1 Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Tue, 30 Jan 2024 16:24:19 +0100 Subject: [PATCH 4/4] add kitchensink runtime --- substrate/bin/node/runtime/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/substrate/bin/node/runtime/src/lib.rs b/substrate/bin/node/runtime/src/lib.rs index 37b0d93de2961..92c08fb311a99 100644 --- a/substrate/bin/node/runtime/src/lib.rs +++ b/substrate/bin/node/runtime/src/lib.rs @@ -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 consistently. see substrate issue #11797 for details. - Mmr: pallet_mmr, - MmrLeaf: pallet_beefy_mmr, Session: pallet_session, Democracy: pallet_democracy, Council: pallet_collective::, @@ -2133,6 +2128,11 @@ construct_runtime!( Tips: pallet_tips, Assets: pallet_assets::, PoolAssets: pallet_assets::, + Beefy: pallet_beefy, + // MMR leaf construction must be after session in order to have a leaf's next_auth_set + // refer to block. See issue polkadot-fellows/runtimes#160 for details. + Mmr: pallet_mmr, + MmrLeaf: pallet_beefy_mmr, Lottery: pallet_lottery, Nis: pallet_nis, Uniques: pallet_uniques,