Page MenuHomePhabricator

[avalanche] Don't request orphaned proofs
ClosedPublic

Authored by Fabien on Jun 10 2021, 12:50.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC645e9ffb0fa9: [avalanche] Don't request orphaned proofs
Summary

If a proof is orphaned we know about it already.

Ref T1611.

Test Plan
./test/functional/test_runner.py p2p_inv_download

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_dont_request_orphans
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15963
Build 31825: Build Diffbuild-debug · build-without-wallet · build-clang · lint-circular-dependencies · build-diff · build-clang-tidy
Build 31824: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Jun 10 2021, 12:50
Fabien edited the summary of this revision. (Show Details)

Rebase

Fabien planned changes to this revision.Jun 10 2021, 14:42
Fabien added inline comments.
test/functional/p2p_inv_download.py
393 ↗(On Diff #28847)

This might not work as expected due to how rpc exceptions are handled, will update

Introduce wait_for_proof to deal with RPC exception when a proof is not found

This revision is now accepted and ready to land.Jun 10 2021, 17:44
deadalnix added inline comments.
src/net_processing.cpp
1764 ↗(On Diff #28848)

Shouldn't getProof do that for you?

src/net_processing.cpp
1764 ↗(On Diff #28848)

I considered it but it was less convenient. There are more places where we don't want to deal with orphans that places where we do. Since an isOrphan method would also do a lookup that would mean 3 lookups vs 2 for most of the callsites + more code in more places.
If this is proven confusing I can rename getProof to getValidProof or something like that.

This revision was automatically updated to reflect the committed changes.