[go: up one dir, main page]

alpha: add a proof of possession in update consensus key operation for BLS addresses

What

Add a proof of possession in update consensus key operation for BLS addresses

Why

A proof of possession will be necessary to aggregate BLS attestation in the future.

How

Add a new optional field proof in Update_consensus_key operation.

Manually testing the MR

Run the newly added test with

dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe -- --file test_consensus_key.ml

Or run a manual sandbox test with the following commands:

  • Start a sandbox node
./src/bin_node/octez-sandboxed-node.sh 1 --connections 0
  • Start a sandbox client
eval `./src/bin_client/octez-init-sandboxed-client.sh 1`
  • Activate Alpha
octez-activate-alpha
  • Gen 3 accounts with
octez-client gen keys alice
octez-client gen keys bob
octez-client gen keys charlie -s bls
octez-client gen keys donald -s bls
  • fund accounts with
octez-client --wait none transfer 1000 from bootstrap1 to alice --burn-cap 0.07
octez-client bake for --minimal-timestamp
octez-client --wait none transfer 1000 from bootstrap1 to bob --burn-cap 0.07
octez-client bake for --minimal-timestamp
  • Set charlie as the consensus key of alice when registering as delegate
octez-client --wait none register key alice as delegate with consensus key charlie
  • In the operation receipt you should have something like:
   Update_consensus_key:
      Public key hash: tz4V2n4CNaV8DUiajEBSno3qh8CSYR5WFDdo with proof: BLsig9kjXRfu3xgGqUeebKGixU4oNX9rGs5LPLB9dbwhprcDyu1jcsXso5dVTRdhMScEETgBa4z7aQpoEEyEcHmerK6oZ3gwFcufiwNmkf3Dp77AqL9xKos7gdNRdmSycrGxebsW6u99NE
      This consensus key update was successfully applied
  • Register bob as delegate
octez-client --wait none register key bob as delegate
octez-client bake for --minimal-timestamp
  • Set donald as the consensus key of bob
octez-client --wait none set consensus key for bob to donald
  • In the operation receipt you should have something like:
   Update_consensus_key:
      Public key hash: tz4NrowjncPpTtEWBnyn1yXfabFNcAKyKnCY with proof: BLsigAovDzbWEnqz3oHpgjjQXddEBiV65SMuHmRgZ7Tsf6gJe7PwhBHcsrTLRXoQnQvSeM7NWsQ6FEtRxEeXVuLikoxXSPBu9DM8dJ2yXsZHmmMgiRJ2EEKdBgDETTQE76VZuanYaHfUo1
      This consensus key update was successfully applied

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Marina Polubelova

Merge request reports

Loading