Motion #2, #3, #4: Khala Mining Genesis Launch

Overview

Motion2: Configure pRuntime & genesis hash

:white_check_mark: Executed

Register the hash of our signed pRuntime release, and the hash of the Kusama starting block.

Motion3: Register the genesis Gatekeeper, update tokenomic parameter, and schedule the mining start time

:warning: Amended - Changes

The three operations will be packed in a utility.BatchAll call:

  • We will register a SGX worker on the blockchain (run by the Phala team), and assign it as the genesis Gatekeeper. The worker should be validated by its Remote Attestation report and the genesis block info.
  • We will slightly tune the tokenomic parameters, extending the worker heartbeat from 10 blocks to 20 blocks.
  • We will create a scheduler to enable "PhalaStakePool.start_mining` at 414189, as announced.

Motion4: Register the second Gatekeeper

:hourglass_flowing_sand: Pending

This is for redundancy.

Execution

We have created a script to generate the transactions to create the motion. The script is heavily documented, including what the parameters are, and how we create the motion proposal to execute it. The councillors should carefully examine the parameters and the code in the script to make sure it matches the exact proposal written in the above section.

The Script

Generated transactions

  • :white_check_mark: Motion 2:

    0x5502043e020c03020c560711012099244f418ee770f71173f99956c23873f25f65c874082040010dff0a027a8300000000815f42f11cf64430c30bab7816ba596a1da0130c3b028b673133a66cf9a3e0e65609b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe5609ff93a4a903207ad45af110a3e15f8b66c903a0045f886c528c23fe7064532b087102
    
  • :warning: Motion 3:

    0x3104043e020c03020c560460067697c486c809737e50d30a67480c5f0cede44be181b96f7d59bc2116a8505706e17a14ae47e17ad40000000000000000fd7eb4062f0b000001000000000000005255555555555555080000000000000000000000000000003075000000000000a5ffacd6510000000000000000000000cdc46a636da9020000000000000000006d5ec28eec3700000000000000000000333333333333333300000000000000001400000025bcd1d4f9b5875c0000000000000000000000000000000000000000000000000000000000000080010000000000000000000000000000003200000000000000000000000000000001000000000000000700ed5106000000580b014d04
    
  • Motion 4:

    0x9c043e020c5604aa37d91141bb1c0d77467ac66066e3927ece5708eded765e9090a7e1dcef5b2fb8
    

To decode the generated transactions, go to Polkadot.js UI Extrinsic Tag and paste the encoded transaction.

2 Likes

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkhala-api.phala.network%2Fws#/council/motions

Timeline

  • UTC 16:28: Proposing Motion 4
  • UTC 16:26: Motion 3 was passed and got executed. The genesis Gatekeeper is online now.
  • UTC 15:43: Two Gatekeepers are in sync. Starting to propose Motion 3.
  • UTC 11:37: Councillor Hang Yin suggested to change the tokenomic parameter to set the slash value to 0
  • UTC 11:23: Motion 2 was passed and got executed.
  • UTC 8:31: Motion 2 was up for vote!

Amendment to Motion 3

I suggest to change the tokenomic parameter in Motion 3 to set zero to the slash rate.

Rationale

The reason to have a slash mechanism is to punish malicious miners or the miner with very poor network condition. Given the majority of the miners are still trying to get the setup stabilized, the slash mechanism will just be a barrier for new miners to join the network in the early days.

We can set the slash rate to 0 for the first a few days. The offline miners will still be shown on the blockchain, but they will not be punished. Then we can observe the network condition and make further decisions.

:white_check_mark: Execution

We amend the original Motion 3, adjust the slash rate in the tokenomic parameters to zero. For easier audition, we generate the proposal transactions by a script. The script has been changed in this commit to reflect the amendment.

The amended generated transaction of Motion 3 is:

0x3104043e020c03020c560460067697c486c809737e50d30a67480c5f0cede44be181b96f7d59bc2116a8505706e17a14ae47e17ad40000000000000000fd7eb4062f0b000001000000000000005255555555555555080000000000000000000000000000003075000000000000a5ffacd6510000000000000000000000cdc46a636da90200000000000000000000000000000000000000000000000000333333333333333300000000000000001400000025bcd1d4f9b5875c0000000000000000000000000000000000000000000000000000000000000080010000000000000000000000000000003200000000000000000000000000000001000000000000000700ed5106000000580b014d04

We have got two Gatekeepers in sync. They are registered on the Khala blockchain PhalaRegistry pallet:

[
  [
    [
      0xaa37d91141bb1c0d77467ac66066e3927ece5708eded765e9090a7e1dcef5b2f
    ],
    {
      pubkey: 0xaa37d91141bb1c0d77467ac66066e3927ece5708eded765e9090a7e1dcef5b2f,
      ecdhPubkey: 0xaa37d91141bb1c0d77467ac66066e3927ece5708eded765e9090a7e1dcef5b2f,
      runtimeVersion: 1,
      lastUpdated: 1,631,893,008,340,
      operator: null,
      confidenceLevel: 2,
      initialScore: 0,
      features: [
        4,
        2
      ]
    }
  ],
  [
    [
      0x60067697c486c809737e50d30a67480c5f0cede44be181b96f7d59bc2116a850
    ],
    {
      pubkey: 0x60067697c486c809737e50d30a67480c5f0cede44be181b96f7d59bc2116a850,
      ecdhPubkey: 0x60067697c486c809737e50d30a67480c5f0cede44be181b96f7d59bc2116a850,
      runtimeVersion: 1,
      lastUpdated: 1,631,887,350,312,
      operator: null,
      confidenceLevel: 2,
      initialScore: 0,
      features: [
        4,
        2
      ]
    }
  ]
]