Page MenuHomePhabricator

[avalanche] Deduplicate proof id computation
AbandonedPublic

Authored by Fabien on Sep 22 2021, 08:25.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Summary

Both the proof and the proof builder can compute the proof id. This is because the proof id is required for signing the stakes.

This diff makes the proof builder build a first proof with no signature (a "proof template") so it can get the proof id from it as needed. This is less efficient but it is never called on a time critical path so the performance drop is not an issue.

Ref T1676.

Depends on D10140.

Test Plan
ninja all check-all

Diff Detail

Event Timeline

Fabien requested review of this revision.Sep 22 2021, 08:26
deadalnix requested changes to this revision.Sep 22 2021, 18:31
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/avalanche/proofbuilder.cpp
44

That really doesn't seems to be the best idea. I don't really see what's wrong with the previous design, it's not duplicated as it doesn't do the same thing.

This revision now requires changes to proceed.Sep 22 2021, 18:31