-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
… into gav-core-fellowship
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
… into gav-core-fellowship
params.offboard_timeout | ||
} else { | ||
let rank_index = Self::rank_to_index(rank).ok_or(Error::<T, I>::InvalidRank)?; | ||
params.demotion_period[rank_index] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just scrolling through, but feels like this should be using get
api, which handles if the index does not exist, rather than panic. could happen if bad migrations or something else, idk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rank_to_index
guarantees the bound is respected.
Small thing is missing in dependency , causing CI break https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2513783 |
Yea the dev dependencies should be stripped before publishing. Dont know if anyone is working on that. |
* More drafting * Paymaster pallet * Fix build * More tests * Rename * Rename * Renaming * Revert old changes * Multi-phase payouts to avoid bank-runs * Tests * Tests * Allow payment to be targeted elsewhere * Proper ssync payment failure handling * Test for repayment * Docs * Impl RankedMembers for RankedCollective * Implement Pay for Pot (i.e. basic account). * Benchmarks * Weights * Introduce Salary benchmark into node * Fix warning * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_salary * Update primitives/arithmetic/src/traits.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Update frame/salary/src/lib.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Update lib.rs * Update frame/salary/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Docs * Update frame/salary/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/salary/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Fix * Fixes * Fixes * Move some salary traits stuff to a shared location * Initial draft * Comment out bits * Fix * First couple of tests * One more test * Update frame/salary/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/salary/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Mul floor * Tests * Mul floor * Fix warnings * Fix test * Tests * Last tests * Docs * Fix warnings * Benchmarks * Weights * Integrate benchmark * Fixes * Fix * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_core_fellowship * Better process flow * Fix benchmarks & tests * Docs * Fixes * Fixes * docs * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_core_fellowship * Docs and allow custom evidence size * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_core_fellowship * Update frame/core-fellowship/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/core-fellowship/src/tests.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/core-fellowship/src/benchmarking.rs * Update frame/core-fellowship/src/benchmarking.rs * Apply suggestions from code review * Rename * Update primitives/arithmetic/src/traits.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Reduce magic numbers * Update frame/core-fellowship/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/core-fellowship/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Benchmark result * Remove dependency * set_params should pay * induct should pay * Remove some other free calls --------- Co-authored-by: command-bot <> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* More drafting * Paymaster pallet * Fix build * More tests * Rename * Rename * Renaming * Revert old changes * Multi-phase payouts to avoid bank-runs * Tests * Tests * Allow payment to be targeted elsewhere * Proper ssync payment failure handling * Test for repayment * Docs * Impl RankedMembers for RankedCollective * Implement Pay for Pot (i.e. basic account). * Benchmarks * Weights * Introduce Salary benchmark into node * Fix warning * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_salary * Update primitives/arithmetic/src/traits.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Update frame/salary/src/lib.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Update lib.rs * Update frame/salary/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Docs * Update frame/salary/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/salary/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Fix * Fixes * Fixes * Move some salary traits stuff to a shared location * Initial draft * Comment out bits * Fix * First couple of tests * One more test * Update frame/salary/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/salary/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Mul floor * Tests * Mul floor * Fix warnings * Fix test * Tests * Last tests * Docs * Fix warnings * Benchmarks * Weights * Integrate benchmark * Fixes * Fix * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_core_fellowship * Better process flow * Fix benchmarks & tests * Docs * Fixes * Fixes * docs * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_core_fellowship * Docs and allow custom evidence size * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_core_fellowship * Update frame/core-fellowship/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/core-fellowship/src/tests.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/core-fellowship/src/benchmarking.rs * Update frame/core-fellowship/src/benchmarking.rs * Apply suggestions from code review * Rename * Update primitives/arithmetic/src/traits.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Reduce magic numbers * Update frame/core-fellowship/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/core-fellowship/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Benchmark result * Remove dependency * set_params should pay * induct should pay * Remove some other free calls --------- Co-authored-by: command-bot <> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Closes #13480.
Based on #13378.
Introduces the new Core-Fellowship pallet, which contains logic specific to the (Core) Fellowship, but which could be used in other fellowships also.
Doesn't touch live code so can be merged, but should not be used in Polkadot until after an audit.
TODO
fn request_proof(info: [u8; 32])
function to record information concerning a proof, and perhaps a similar one for promotion.