HomePhabricator

[avalanche] Pass a CKey to the proof builder

Description

[avalanche] Pass a CKey to the proof builder

Summary:
The proof builder currently takes a CPubKey because it only needs to move it into the proof it is building.

In order to improve the proof format so that it is possible to update some of it's parameters (and mostly the list of stakes) without having the stakers to got through the signing process again, the stakes signature will be updated to no longer sign every parameter of the proof. This also mean that we need to the proof owner to sign these parameters to prevent anybody from updating any proof. Since we need the private key for the signature, this diff supplies it to the proof builder instead of the public key. As a consequence the buildavalancheproof RPC needs to be updated as well.

This diff is a preliminary diff and does not update the proof format.

Ref T1676.

Depends on D10077.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Maniphest Tasks: T1676

Differential Revision: https://reviews.bitcoinabc.org/D10092

Details

Provenance
FabienAuthored on Sep 13 2021, 12:29
FabienPushed on Sep 13 2021, 19:13
Reviewer
Restricted Project
Differential Revision
D10092: [avalanche] Pass a CKey to the proof builder
Parents
rABC0258b059fbfa: [avalanche] Add an error message for duplicated stakes in buildavalancheproof
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task