Encointer runtime upgrade v12

0 Comments

Encointer has a new code upgrade which

  • allows participants to unregister from ceremony cycles. This will help us decrease noshows and increase security by doing so
  • allows reputables to endorse newbies. This is a massive improvement for growth. Before, only bootstrappers could endorse a one-off amount of newbies. Now, everybody that has recently proven their personhood can endorse a small number (~2-5, TBD) of newbies with every cycle. This is very much in line with the "word of mouth" growth strategy
  • upgrades our dependencies to polkadot-0.9.28

Detailed changes to our runtime and to our pallets

runtime release v12 in our GH repository

OpenGov Theory

We would like our runtime upgrade to be whitelisted by the fellowship. As a common good parachain we can't upgrade ourselves and the runtime upgrade needs a knowledgeable review which the fellowship is able to provide. It would be possible to submit to the root track directly, but that is expected to take too long to be practical (~28d) because of very restricitive support thresholds.

The gov2 process in pseudocode for sending a whitelisted XCM with Superuser origin is as follows:

// The actual proposal to enact. (no need to note this as a preimage)
let proposal = xcmPallet.send(...);

// Whitelist the `proposal` for dispatch from `WhitelistedCaller`.
let whitelistProposal = whitelist.whitelistCall(hash: hash(proposal));
let preimageWL = preimage.notePreimage(whitelistProposal);

// Whitelists the `proposal` from the Fellowship. 
// This has to be submitted by any member of felllowship (No matter the rank)
let fellowshipReferendum = fellowshipReferenda.submit(
  proposalOrigin: Origins.Fellowship3Dan,
  proposal: Lookup {
    hash: preimageWL.hash, 
    len: preimageWL.len
  },
  ...
);

// Now the fellowship has to vote.....

// The following public referendum can already start. However, the proposal must be whitelisted before the public referendum is enacted

// Dispatch the `proposal` from `WhitelistedCaller`.
let dispatchProposal = dispatchWhitelistedCallWithPreimage(
  call: proposal,
);
let preimageD = preimage.notePreimage(dispatchProposal)

// Dispatches the proposal as long as it has been whitelisted before enacted.
let publicReferendum = referenda.submit(
  proposalOrigin: Origins.WhitelistedCaller,
  proposal: Lookup {
    hash: preimageD.hash,
    len: preimageD.len
  },
  ...
);

Practise

The call to be executed on the Encointer parachain with root privilege

authorizeUpgrade call on Encointer

the proposal

proposal call xcmPallet.send to be executed on Kusama yields hash 0x7776194086d1496a812cb61670080157d2f511cbcbaafddd44ff248a753788e7

whitelisting by fellowship

whitelistProposal encodes to 0x2c007776194086d1496a812cb61670080157d2f511cbcbaafddd44ff248a753788e7

note preimageWL

preimageWL hash = 0xb98f987a58c1cda0cb8b8fd07d441e2e5b67a809742e6eb3bd2ec5f2976cb29c len = 34
has been noted

Now, propose to fellowship

submit fellowship referendum (must be submitted by member of fellowship. decision deposit is 0.333 KSM)

The decision period for the fellowship whitelist referendum is 7 days

public referendum

propose to dispatch the whitelisted call

dispatchProposal encodes to 0x2c03630001000100a50f0204060202286bee880102ccdfc804e0482f951ef7ad15fda0d38ead81c42e93a8276e60a45c663b8a3b91

note preimageD

hash = 0xd394967583efb9b8fe1dd4ad84d3bcb7c5382cae19319b2cfc1682e227ce76d3 len = 53

not yet executed:

publicReferendum submission (may be submitted by proposer. Must have submission deposit of 100KSM)

Then, the decision deposit of 33.333 k KSM :lol: must be provided (can be a different party providing it)

Up
Comments
No comments here