25 releases (major breaking)

22.0.0 Sep 26, 2024
21.0.0 Jul 18, 2024
20.0.0 Jul 12, 2024
19.0.0 Jun 24, 2024
0.0.0 Mar 3, 2023

#11 in #period

Download history 418/week @ 2024-08-02 338/week @ 2024-08-09 388/week @ 2024-08-16 502/week @ 2024-08-23 161/week @ 2024-08-30 81/week @ 2024-09-06 145/week @ 2024-09-13 283/week @ 2024-09-20 288/week @ 2024-09-27 391/week @ 2024-10-04 529/week @ 2024-10-11 829/week @ 2024-10-18 672/week @ 2024-10-25 556/week @ 2024-11-01 14761/week @ 2024-11-08 21047/week @ 2024-11-15

37,198 downloads per month
Used in 12 crates (4 directly)

Apache-2.0

2.5MB
50K SLoC

Core Fellowship

Logic specific to the core Polkadot Fellowship.

Release

Polkadot SDK stable2409


lib.rs:

Additional logic for the Core Fellowship. This determines salary, registers activity/passivity and handles promotion and demotion periods.

This only handles members of non-zero rank.

Process Flow

  • Begin with a call to induct, where some privileged origin (perhaps a pre-existing member of rank > 1) is able to make a candidate from an account and introduce it to be tracked in this pallet in order to allow evidence to be submitted and promotion voted on.
  • The candidate then calls submit_evidence to apply for their promotion to rank 1.
  • A PromoteOrigin of at least rank 1 calls promote on the candidate to elevate it to rank 1.
  • Some time later but before rank 1's demotion_period elapses, candidate calls submit_evidence with evidence of their efforts to apply for approval to stay at rank 1.
  • An ApproveOrigin of at least rank 1 calls approve on the candidate to avoid imminent demotion and keep it at rank 1.
  • These last two steps continue until the candidate is ready to apply for a promotion, at which point the previous two steps are repeated with a higher rank.
  • If the member fails to get an approval within the demotion_period then anyone may call bump to demote the candidate by one rank.
  • If a candidate fails to be promoted to a member within the offboard_timeout period, then anyone may call bump to remove the account's candidacy.
  • Pre-existing members may call import to have their rank recognised and be inducted into this pallet (to gain a salary and allow for eventual promotion).
  • If, externally to this pallet, a member or candidate has their rank removed completely, then offboard may be called to remove them entirely from this pallet.

Note there is a difference between having a rank of 0 (whereby the account is a candidate) and having no rank at all (whereby we consider it unranked). An account can be demoted from rank 0 to become unranked. This process is called being offboarded and there is an extrinsic to do this explicitly when external factors to this pallet have caused the tracked account to become unranked. At rank 0, there is not a "demotion" period after which the account may be bumped to become offboarded but rather an "offboard timeout".

Candidates may be introduced (i.e. an account to go from unranked to rank of 0) by an origin of a different privilege to that for promotion. This allows the possibility for even a single existing member to introduce a new candidate without payment.

Only tracked/ranked accounts may submit evidence for their proof and promotion. Candidates cannot be approved - they must proceed only to promotion prior to the offboard timeout elapsing.

Dependencies

~17–32MB
~520K SLoC