Page MenuHomePhabricator

[avalanche] Aggressively request compact proofs
ClosedPublic

Authored by Fabien on Jun 24 2022, 13:12.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABC054a0dd9f4d2: [avalanche] Aggressively request compact proofs
Summary

This diff makes the node request for the compact proofs more aggressively on a periodic manner:

  • While no compact proofs has been received yet, request up to 3 peers randomly
  • After a first compact proofs has been received, request all the peers
Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jun 24 2022, 13:12
sdulfari requested changes to this revision.Jun 24 2022, 16:37
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
src/net_processing.cpp
1773 ↗(On Diff #34123)

Due to this interval, if the 3 randomly selected peers didn't give good compact proofs, the node will sit for many minutes until requesting again. Does it make sense to shorten this interval much shorter until getAvaproofsNodeCounter() > 0?

test/functional/abc_p2p_compactproofs.py
140 ↗(On Diff #34123)

nit: responding_outbound_avapeer (drop the plural)

This revision now requires changes to proceed.Jun 24 2022, 16:37
src/net_processing.cpp
1773 ↗(On Diff #34123)

If you had no answer within the interval from any of the 3 peers, which is unlikely, it's probably best to wait a bit before retrying:

  • Maybe you just didn't had 3 peers to begin with (unlikely)
  • If they don't answer, spamming them is probably not going to help

I don't think lowering the interval will really help, and it's only a few minutes.

This revision is now accepted and ready to land.Jun 24 2022, 20:52