Page MenuHomePhabricator

[avalanche] Don't request orphaned proofs
ClosedPublic

Authored by Fabien on Thu, Jun 10, 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

Rebase

Fabien planned changes to this revision.Thu, Jun 10, 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.Thu, Jun 10, 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.