From 5432748a8b7dc91b44944837fc67cee583b552f8 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Wed, 17 Jul 2024 07:22:18 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Hernando Castano --- CHANGELOG.md | 5 ++++- pallets/parameters/src/benchmarking.rs | 2 +- pallets/parameters/src/lib.rs | 2 +- pallets/staking/src/tests.rs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 492a7ce5e..1f14b580f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,10 @@ At the moment this project **does not** adhere to - Add Signer groups and rotation ([#938](https://github.com/entropyxyz/entropy-core/pull/938)) ### Breaking Changes -- In [#938](https://github.com/entropyxyz/entropy-core/pull/938) As the network readys for signer subgroups `Signers` are added to the chain config, currently the creation of the config file should select and assign them +- In [#938](https://github.com/entropyxyz/entropy-core/pull/938), the chainspec got a couple of new + fields, `pallet_staking_extension::initial_signers`, `pallet_parameters::total_signers`, and + `pallet_parameters::threshold`, which are used to set up the initial threshold signing + configuration for the network. ## [0.2.0](https://github.com/entropyxyz/entropy-core/compare/release/v0.1.0...release/v0.2.0) - 2024-07-11 diff --git a/pallets/parameters/src/benchmarking.rs b/pallets/parameters/src/benchmarking.rs index c91c3e686..957bcff89 100644 --- a/pallets/parameters/src/benchmarking.rs +++ b/pallets/parameters/src/benchmarking.rs @@ -54,7 +54,7 @@ benchmarks! { change_signers_info { let origin = T::UpdateOrigin::try_successful_origin().unwrap(); - let signer_info = SignersSize { total_signers: 5, threshold: 3 }; + let signer_info = SignersSize { total_signers: TOTAL_SIGNERS, threshold: SIGNER_THRESHOLD }; }: { assert_ok!( >::change_signers_info(origin, signer_info.total_signers, signer_info.threshold) diff --git a/pallets/parameters/src/lib.rs b/pallets/parameters/src/lib.rs index bd0993732..9e74d0ba9 100644 --- a/pallets/parameters/src/lib.rs +++ b/pallets/parameters/src/lib.rs @@ -159,7 +159,7 @@ pub mod module { Ok(()) } - /// Changes the signer info + /// Changes the threshold related parameters for signing. #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::change_signers_info())] pub fn change_signers_info( diff --git a/pallets/staking/src/tests.rs b/pallets/staking/src/tests.rs index fa0db5306..68259366a 100644 --- a/pallets/staking/src/tests.rs +++ b/pallets/staking/src/tests.rs @@ -327,7 +327,7 @@ fn it_declares_synced() { #[test] fn it_tests_new_session_handler() { new_test_ext().execute_with(|| { - // start with current validators as 6 and 5 + // Start with current validators as 5 and 6 based off the Mock `GenesisConfig`. // no next signers at start assert_eq!(Staking::next_signers().len(), 0);