Page MenuHomePhabricator

[avalanche] Answer proof invs with getdata proof requests
ClosedPublic

Authored by Fabien on May 25 2021, 15:41.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Restricted Maniphest Task
Commits
rABCcef8cbca39d8: [avalanche] Answer proof invs with getdata proof requests
Summary

This makes use of the InvRequestTracker for tracking proof inventories.
This is similar to what is done for the transactions as demonstrated by
running the same functional tests.

This is missing the peer disconnection and the notfound management which
will be in their own diff.

Depends on D9598 and D9608.

Test Plan
ninja all check-all
./test/functional/test_runner.py p2p_inv_download
../contrib/teamcity/build-configurations.py build-tsan

Also run p2p_inv_download under TSAN.

Diff Detail

Event Timeline

Fabien requested review of this revision.May 25 2021, 15:41

Comment on the tsan exception so we don't forget

Mengerian added a task: Restricted Maniphest Task.May 26 2021, 15:35
deadalnix requested changes to this revision.May 26 2021, 15:37
deadalnix added a subscriber: deadalnix.

This is too big. You are touching a ton of thing everywhere here. I'm sure you can extract many refactoring from there. It doesn't matter if they are trivial, in fact that's the point, they can be landed right away and non trivial things aren't drowned into noise.

src/avalanche/peermanager.h
178 ↗(On Diff #28602)

You should send patch for these independently. Mixing them only make these fix land later at best, at worse create horrible merge conflicts.

This revision now requires changes to proceed.May 26 2021, 15:37

Rebase, split out the disconnection and notfound management to keep it as tiny as possible

deadalnix requested changes to this revision.May 28 2021, 13:11
deadalnix added inline comments.
src/init.cpp
1240

Why?

src/net_processing.cpp
953

This where this breaks down, doesn't it?

I pointed it in the other patch, so why do I have to point it again here?

This revision now requires changes to proceed.May 28 2021, 13:11
Mengerian added a task: Restricted Maniphest Task.May 28 2021, 16:31

Remove the no longer used flag and rebase on top of D9608 to fix the permission inconsistency

Also download the proofs during IBD. They will likely end up in the orphan pool but that should not be an issue.

deadalnix requested changes to this revision.Jun 3 2021, 15:42
deadalnix added inline comments.
src/init.cpp
1240 ↗(On Diff #28735)

???

test/functional/p2p_inv_download.py
271 ↗(On Diff #28735)

Why are these skipped?

This revision now requires changes to proceed.Jun 3 2021, 15:42

Revert the empty line change in init.cpp

src/init.cpp
1240 ↗(On Diff #28735)

oversight from my self review after removing the flag that used to be here

test/functional/p2p_inv_download.py
271 ↗(On Diff #28735)

These skipped tests are the parts I splitted out in D9599 and D9600 which enable them back.

deadalnix requested changes to this revision.Jun 4 2021, 10:01
deadalnix added inline comments.
test/functional/p2p_inv_download.py
271 ↗(On Diff #28735)

That doesn't explain why. Disabling tests in this way is suspicious, there needs to be a good reason.

This revision now requires changes to proceed.Jun 4 2021, 10:01
Fabien requested review of this revision.Jun 4 2021, 11:54
Fabien added inline comments.
test/functional/p2p_inv_download.py
271 ↗(On Diff #28735)

They are not disabled, but not enabled yet. This does not remove any coverage since the tests did not run on proofs before this diff.
The reason I split the diff in 3 is solely to make the review easier (because it was pretty large otherwise). You greened the 2 other parts already but I can always squash if you prefer.

This revision is now accepted and ready to land.Jun 4 2021, 16:50