Skip to content

Instantly share code, notes, and snippets.

@k26dr
Last active September 24, 2018 12:45
Show Gist options
  • Save k26dr/f9a271ebc30f9041a5fb8b37b14216fd to your computer and use it in GitHub Desktop.
Save k26dr/f9a271ebc30f9041a5fb8b37b14216fd to your computer and use it in GitHub Desktop.
Validate Sudo Multisig Proposals

Sudo Validation

Implementing sudo requires 15/21 BPs to approve two separate proposals. One to create the eosio.sudo account, another to deploy the eosio.sudo contract. The first transation has to be executed before the second can be proposed.

Create Sudo Account

You can review the first createsudo transaction with:

cleos multisig review libertyblock createsudo

This transaction contains 4 actions:

  1. eosio::newaccount: Create the eosio.sudo account
  2. eosio::buyrambytes: Buy 50 kB worth of RAM for the account. The EOS for the RAM purchase comes from the eosio account, which currently has an adequate balance of 12 EOS.
  3. eosio::delegatebw: Stake 1 EOS for NET and 1 EOS for CPU for eosio.sudo. This isn't very important because we can always delegate more resources to the account later if needed.
  4. eosio::setpriv: Make eosio.sudo a privileged account.

Deploy Sudo Contract

The second transaction can be proposed once the first has been approved. If you want to preview what it will look like, it is available here.

This transaction sets the code and ABI for the eosio.sudo account.

The code was compiled using eosio.cdt v1.2.1 and the source is available here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment