Page MenuHomePhabricator

[avalanche] Add a conflicting proof registration method
AbandonedPublic

Authored by Fabien on Oct 8 2021, 14:15.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

This will remove all the conflicting peers, then create a new one from the conflicting proof.

Ret T1854.

Test Plan
ninja ninja check-avalanche-peermanager_tests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_register_conflicting_proof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16942
Build 33721: Build Difflint-circular-dependencies · build-without-wallet · build-clang-tidy · build-clang · build-diff · build-debug
Build 33720: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Oct 8 2021, 14:16

I don't think this really make sense. What happens to the previous proof?

src/avalanche/peermanager.cpp
154 ↗(On Diff #30448)

Why?

deadalnix requested changes to this revision.Oct 12 2021, 11:15
This revision now requires changes to proceed.Oct 12 2021, 11:15
Fabien requested review of this revision.Oct 12 2021, 12:15

This function is intended to be called after a vote on a conflicting proof has been finalized, and the conflicting proof accepted. Since this proof is the valid one, all the proofs with conflicting utxos need to be removed so we have no conflict in our pool. We don't keep the previous proofs since they are no longer relevant.
The function name is probably not the best, I spent some time trying to figure out how to call it and was never 100% satisfied, so I picked the best I came to; suggestions are welcome.

deadalnix requested changes to this revision.Oct 12 2021, 12:29
deadalnix added inline comments.
src/avalanche/peermanager.cpp
154 ↗(On Diff #30448)

This is still wrong, isn't it?

This revision now requires changes to proceed.Oct 12 2021, 12:29
Fabien requested review of this revision.Feb 9 2022, 13:27