[go: up one dir, main page]

Signer: fix tz4 highwatermark

What

Fix the highwatermark values for tz4 keys in the signer. The level and round werer incorrectly reed since the signer expected slot (2Bytes) in the data to sign but there is no more slot to sign for tz4 keys.

Why

Because the value were wrong

How

By moving the offset to -2 when reading tz4 consensus operation payload

Manually testing the MR

Run the new test without the fix with dune exec tezt/tests/main.exe -- --file signer_test.ml highwatermark --verbose you should observe something like

[10:24:22.274] [error] Highwatermark Level expected was 9, got 589824

And with the patch the test should succeed.

For manual testing:

On master: Run a sandboxed node and 2 sandboxed clients.

  • In the second client create tz4 keys and launch the signer
  • In the first client, import theses keys and set them as consensus key for bootstrap accounts
  • Run a baker until the consensus keys has rights.
  • Observe the value in tmp/tezos-tmp-client.xxxxxxxx/preattestation_high_watermarks the level and round should be wrong

Kill the baker, Swith to this MR, make, remove the watermarks, run the baker again, the watermark should make more sense.

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 Albin Coquereau

Merge request reports

Loading