-
Notifications
You must be signed in to change notification settings - Fork 379
The Ambassador Program #2002
base: master
Are you sure you want to change the base?
The Ambassador Program #2002
Conversation
{ | ||
fn on_unbalanced(amount: NegativeImbalanceOf<T, I>) { | ||
let temp_account: AccountIdOf<T> = TempAcc::get(); | ||
let treasury_acc: AccountIdOf<T> = TreasuryAcc::get(); | ||
let amount = match amount.drop_zero() { |
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.
submission deposit for ambassador referendum is zero, we do not teleport 0 amount
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.
the rest changes of the impl just simplification
|
||
/// IPFS compatible CID. | ||
// worst case 2 bytes base and codec, 2 bytes hash type and size, 64 bytes hash digest. | ||
pub type Cid = BoundedVec<u8, ConstU32<68>>; |
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.
Ive seen few implementations of the CID in or repos (at least two).
Here I keep it simple instead introducing new. I believe we need to agree first on one type for it, and keep it consistent.
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.
Storing CID as a bounded vec sounds good to me
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.
We already have a type for cid, maybe we should push it down to a more common place:
https://github.com/paritytech/substrate/blob/8cfe326e4e33c5077fc67f197d6a13dd871881c7/frame/alliance/src/types.rs#L69
We shouldn't have multiple different types for cids.
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.
The alternative is we could call this type an OpaqueCid maybe?
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.
renaming to OpaqueCid
#[pallet::pallet] | ||
#[pallet::generate_store(pub (super) trait Store)] | ||
#[pallet::storage_version(STORAGE_VERSION)] | ||
pub struct Pallet<T, I = ()>(PhantomData<(T, I)>); |
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.
if this setup works well for the Ambassador program, we might translate the Alliance into the similar setup, this is why the pallet generic over instance
parachains/runtimes/collectives/collectives-polkadot/src/lib.rs
Outdated
Show resolved
Hide resolved
bot fmt |
@muharem |
bot cancel |
@muharem Command |
bot fmt |
@muharem https://gitlab.parity.io/parity/mirrors/cumulus/-/jobs/3413699 was started for your command Comment |
@muharem Command |
parachains/runtimes/collectives/collectives-polkadot/src/ambassador/tracks.rs
Outdated
Show resolved
Hide resolved
parachains/runtimes/collectives/collectives-polkadot/src/ambassador/mod.rs
Outdated
Show resolved
Hide resolved
bot rebase |
Rebased |
bot rebase |
Rebased |
The CI pipeline was cancelled due to failure one of the required jobs. |
The Ambassador Program on Polkadot Collectives Parachain
The Polkadot Ambassador Program has existed for a while; more information can be found here.
In this PR, the program is being brought on chain.
On Chain Structure
The on-chain program consists of nine ranks, divided into four categories (full list):
Each rank has a corresponding
Origin
(e.g.,HeadAmbassadorTier5
- full list), which represents the collective voice of members of that rank and above.Referendum
The
AmbassadorReferenda
instance of referenda pallet consists of nine tracks, each corresponding to anOrigin
. A referendum taken onsenior ambassador tier 4
track invites all members from rank 4 or above to vote and commandsSeniorAmbassadorTier4
Origin. Every member gets one vote plus an additional vote for every excess rank. The referendum proposal can be submitted by any member of a senior rank or above.Membership Management
Initial members will be brought on chain via migration, with subsequent member management handled through the
AmbassadorCollective
instance of ranked collective pallet. BothRoot
andFellowshipAdmin
Origins
, commanded via public Polkadot referendum, can promote or demote members to and from any rank. Members themselves also have the power to promote or demote via its referendum, with a senior member vote by the rank two above the new / current rank - full configuration.Content Management
The program's on-chain content is managed via the collectives content pallet, allowing for setting its charter and making announcements. The voice of head ambassadors have the authority to set the charter, while announcements can be made by any senior rank member or through a referendum among all members.
Additional Functionality
The
AmbassadorCore
instance of core fellowship pallet decorates the ranked collectives pallet with features like salary determination, activity/passivity registration, and the handling of promotion and demotion periods. While the usage of this pallet is optional in the first version, future updates will make it the exclusive method for induction/promotion.Periodic salaries in USDt, payable on Asset Hub, are introduced through the salary pallet. This requires induction into the ambassador core pallet.
Please for more information on the pallets' functionality refer to their documentations.
References:
Next Steps: