Page MenuHomePhabricator

[avalanche] Use a consistent and well known proof master in proof tests
ClosedPublic

Authored by Fabien on Oct 11 2021, 12:59.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC4cbb93880201: [avalanche] Use a consistent and well known proof master in proof tests
Summary

The private key associated with the proof master for some test vectors is unknown. This makes it impossible to introduce the proof signature without having to change this key, which this diff does. This makes it easier to review the changes when the proof signature is introduced.

Since changing the proof master will change the proof id, the vectors where the verification result is expected to be valid needs to update the stake signature as well.

The review may show a lot of changes for some vectors because they were using an uncompressed pubkey, and the new one is compressed causing the hex to get unaligned.

Ref T1676.

Test Plan
ninja check-avalanche-proof_tests

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Oct 11 2021, 12:59

Reviewed by concatenating multiline proofs to a single one-line string:

arc patch D10300
git checkout 5fcbf32ac0223dc742ef744dc36378cba736ef3e     # previous commit
cat src/avalanche/test/proof_tests.cpp  | tr '\n' '@' | sed 's/"@ *"//g' | tr '@' '\n' >  before.cpp
git checkout arcpatch-D10300
cat src/avalanche/test/proof_tests.cpp  | tr '\n' '@' | sed 's/"@ *"//g' | tr '@' '\n' >  after.cpp
gvimdiff before.cpp after.cpp
This revision is now accepted and ready to land.Oct 11 2021, 19:41