From 503e481615e23d6ff30e21d799f8abc3146dc1e5 Mon Sep 17 00:00:00 2001 From: brenzi Date: Fri, 15 Mar 2024 18:24:32 +0100 Subject: [PATCH] bump encointer protocol pallets to 6.1 (#236) Upgrade Encointer protocol to the latest enhancements: noteworthy changes * tolerate noshows without loss of reputation (https://github.com/encointer/pallets/pull/373) * protect bootstrapper reputation (https://github.com/encointer/pallets/pull/375) * bootstrappers can no longer use their ProofOfAttendance to register a fresh account as this is a vulnerability * upon unregistering, reputation is restored for bootstrappers too now * increase meetup size target from 10 to 15 to be more resilient to noshows (https://github.com/encointer/pallets/pull/372) this change requires a state migration for the ceremonies pallet --- CHANGELOG.md | 1 + Cargo.lock | 60 +++++++++++++------------- system-parachains/encointer/Cargo.toml | 26 +++++------ system-parachains/encointer/src/lib.rs | 3 +- 4 files changed, 46 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f2a48bfc0..1742a2daab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Refund any leases that are not migrated to Coretime (have holes in them/have not yet started) ([polkadot-fellows/runtimes#206](https://github.com/polkadot-fellows/runtimes/pull/206)) - Enable Elastic Scaling node side feature for Kusama ([polkadot-fellows/runtimes#205](https://github.com/polkadot-fellows/runtimes/pull/205)) - Cancel Parachain Auctions ([polkadot-fellows/runtimes#215](https://github.com/polkadot-fellows/runtimes/pull/215)) +- Upgrade encointer protocol to 6.1.0 ([polkadot-fellows/runtimes#236](https://github.com/polkadot-fellows/runtimes/pull/236)) - Update NFT deposits according to RFC-45 ([polkadot-fellows/runtimes#237](https://github.com/polkadot-fellows/runtimes/pull/237)) ### Changed diff --git a/Cargo.lock b/Cargo.lock index 0198c078b7..3de19219e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3119,9 +3119,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encointer-balances-tx-payment" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bab150ba5131d8e59e861d21b900d123cc55604160c118fb8b2293af5a40d3a" +checksum = "be09b48ab6e4cdf6316cd3faf036940c4517d149499f07c9e3ddfb70dcc71488" dependencies = [ "encointer-primitives", "frame-support", @@ -3136,9 +3136,9 @@ dependencies = [ [[package]] name = "encointer-balances-tx-payment-rpc-runtime-api" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1086972f2ea49903c0f7051ec6ad0180e81df47c2b6699f1ff279afba749bba6" +checksum = "817560882892e4527f08b152a300772057317725a335e15ce654a07adb60d9d8" dependencies = [ "encointer-primitives", "frame-support", @@ -3150,9 +3150,9 @@ dependencies = [ [[package]] name = "encointer-ceremonies-assignment" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ebd5dc49f5f6fb321b2e7315bf29e26f3d5f38a1e344f36213137e58fbd54ea" +checksum = "06fb1e51610f1aedf130a9909977943e75de4d44218c60fc73f78b8b410ef872" dependencies = [ "encointer-primitives", "sp-runtime", @@ -3238,9 +3238,9 @@ dependencies = [ [[package]] name = "encointer-meetup-validation" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8b43179179d387317d14bd69335aafb7663f49b77203950fe4deadf1439ed7" +checksum = "4f7840e8d6e88ac1f2393f6cf5003471663585f8c43d94b26c2e3d4376248148" dependencies = [ "encointer-primitives", "parity-scale-codec", @@ -3252,9 +3252,9 @@ dependencies = [ [[package]] name = "encointer-primitives" -version = "6.0.2" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d3adcceca350eed739e9677fae4e1bea6c7ad526eee456ca30037cbcfe9b9a" +checksum = "bf4b67ace89f88af02b70f36c8668222bcfc3ac0cac48ac92007ed1218a7643e" dependencies = [ "bs58 0.5.0", "crc", @@ -7022,9 +7022,9 @@ dependencies = [ [[package]] name = "pallet-encointer-balances" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e315674885628d9255be6ef76d3a50ef5dbaeaa377955d683754d5b6552a49" +checksum = "fb968c2b87c3ef3ef67e5da9237b6c9b32218762b9e69bf523ddea4f55a5f260" dependencies = [ "approx", "encointer-primitives", @@ -7042,9 +7042,9 @@ dependencies = [ [[package]] name = "pallet-encointer-bazaar" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ef596e3cd3ef64c238452dbed148a6f021a1861ad9917183099b9ed59c2e55" +checksum = "c1a4f6a43dce9ec7470ce65716b7009e86eda70f18e3f7690a4841a05d471f10" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -7060,9 +7060,9 @@ dependencies = [ [[package]] name = "pallet-encointer-bazaar-rpc-runtime-api" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef7ad75291b1b151855c615a5cf4036f1468e22d635585f412d10e0453a94948" +checksum = "430c3a5bcaa9d2fd7ab314b8e50222c8645699b3157448eabed64b65ad4cf801" dependencies = [ "encointer-primitives", "frame-support", @@ -7073,9 +7073,9 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d55a3cd08fdce58f6a92b373decc3709e5908f490a6e2e59aee7036776a64b" +checksum = "87c965513d515c8b74d1d526f999d58aad713462887e290c5295ae2ca13f4b97" dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", @@ -7099,9 +7099,9 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies-rpc-runtime-api" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a7655dd964c160eef8af3cc90a8acb235a4695530ff8e81df5176fd34107b84" +checksum = "562c6c756d356318dead2e90710b1c7cee12a6e2ff9aa555e6782ba5202fcde0" dependencies = [ "encointer-primitives", "frame-support", @@ -7112,9 +7112,9 @@ dependencies = [ [[package]] name = "pallet-encointer-communities" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4163b2b572515e0424d80deef6582e0b8663f75de2058394700ff0a1f7f5dd2f" +checksum = "efdbb9bac32cd764992ced4055e76c6d09907f5ac3863d1d19f14edda7eaa3ac" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -7132,9 +7132,9 @@ dependencies = [ [[package]] name = "pallet-encointer-communities-rpc-runtime-api" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc071c9227da132fe57ad496e615695ebcd6a892cc5d2a66d79eb4c3fac5902a" +checksum = "c10de1b47024c9c7a957521eb29edcf7c9cf31d8c70eee7e991d11f43d137606" dependencies = [ "encointer-primitives", "parity-scale-codec", @@ -7144,9 +7144,9 @@ dependencies = [ [[package]] name = "pallet-encointer-faucet" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e8faead921402e8ebd73272054a0974af2526e30e74bfb43fccb077aa93149" +checksum = "ef912a2cdd0f586054d5df1078037ef324fd64515671d6630cfbd1787c4ebe2a" dependencies = [ "approx", "encointer-primitives", @@ -7166,9 +7166,9 @@ dependencies = [ [[package]] name = "pallet-encointer-reputation-commitments" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5777f365c18c93579880107b08299e77c85254076501130891a71b9be018690a" +checksum = "9029fcdd0cd76e41d067bcf7f09860b4018de9c5382ab1b8006823e2fa148ac5" dependencies = [ "approx", "encointer-primitives", @@ -7189,9 +7189,9 @@ dependencies = [ [[package]] name = "pallet-encointer-scheduler" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26dc40684ab501ad233e5e6da4215a546392b503837a004d97153c482aaa561c" +checksum = "a13047a59df28111d0e6bd64ca45fa95fe1b97021ba244fe3f7fe3a2edbf2e2c" dependencies = [ "encointer-primitives", "frame-benchmarking", diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index cb97fdbdb7..65f9785d19 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -29,19 +29,19 @@ smallvec = "1.13.1" # * encointer-* 6.1.x (must not be automatically updated from 6.0.x) # * patch: ad-lib # -encointer-balances-tx-payment = { default-features = false, version = "~6.0.0" } -encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "~6.0.0" } -encointer-primitives = { default-features = false, version = "~6.0.2" } -pallet-encointer-balances = { default-features = false, version = "~6.0.0" } -pallet-encointer-bazaar = { default-features = false, version = "~6.0.0" } -pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "~6.0.0" } -pallet-encointer-ceremonies = { default-features = false, version = "~6.0.0" } -pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "~6.0.0" } -pallet-encointer-communities = { default-features = false, version = "~6.0.0" } -pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "~6.0.0" } -pallet-encointer-faucet = { default-features = false, version = "~6.0.0" } -pallet-encointer-reputation-commitments = { default-features = false, version = "~6.0.0" } -pallet-encointer-scheduler = { default-features = false, version = "~6.0.0" } +encointer-balances-tx-payment = { default-features = false, version = "~6.1.0" } +encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "~6.1.0" } +encointer-primitives = { default-features = false, version = "~6.1.0" } +pallet-encointer-balances = { default-features = false, version = "~6.1.0" } +pallet-encointer-bazaar = { default-features = false, version = "~6.1.0" } +pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "~6.1.0" } +pallet-encointer-ceremonies = { default-features = false, version = "~6.1.0" } +pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "~6.1.0" } +pallet-encointer-communities = { default-features = false, version = "~6.1.0" } +pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "~6.1.0" } +pallet-encointer-faucet = { default-features = false, version = "~6.1.0" } +pallet-encointer-reputation-commitments = { default-features = false, version = "~6.1.0" } +pallet-encointer-scheduler = { default-features = false, version = "~6.1.0" } # Substrate diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index bf340854b3..e3c393b480 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -510,7 +510,7 @@ parameter_types! { pub const MomentsPerDay: Moment = 86_400_000; // [ms/d] pub const DefaultDemurrage: Demurrage = Demurrage::from_bits(0x0000000000000000000001E3F0A8A973_i128); pub const EncointerExistentialDeposit: BalanceType = BalanceType::from_bits(0x0000000000000000000053e2d6238da4_u128); - pub const MeetupSizeTarget: u64 = 10; + pub const MeetupSizeTarget: u64 = 15; pub const MeetupMinSize: u64 = 3; pub const MeetupNewbieLimitDivider: u64 = 2; // 2 means 1/3 of participants may be newbies pub const FaucetPalletId: PalletId = PalletId(*b"ectrfct0"); @@ -717,6 +717,7 @@ pub type Migrations = ( //then apply the proper migration as we should have done earlier pallet_balances::migration::MigrateToTrackInactive, cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + pallet_encointer_ceremonies::migrations::v2::MigrateToV2, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, );