Page MenuHomePhabricator

[avalanche] Keep track of the peer creation time
ClosedPublic

Authored by Fabien on Jun 7 2021, 14:43.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC963d2d852a3a: [avalanche] Keep track of the peer creation time
Summary

Similar to what is done for the transactions, this will be used to filter which proof a peer can request, by only allowing for download the proofs which are in our pool for long enough.
The intent is to improve privacy by preventing peers from being able to guess our proof pool. It is a complementary feature to be used in conjunction with D9642.

There is no change in behavior at this stage.

Ref T1611.

Test Plan
ninja all check-avalanche

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Jun 7 2021, 14:43

Added the rational in the diff summary

src/avalanche/test/processor_tests.cpp
987 ↗(On Diff #28792)

Note to reviewers: I couldn't figure out how to implement operator<< for TimePoint without bloating the test with a dedicated class that re-implements a lot of things.
This is the reason why I used BOOST_CHECK instead of BOOST_CHECK_EQUAL and co for TimePoints

Fabien planned changes to this revision.Jun 7 2021, 19:50

Use the right clock for the job

This revision is now accepted and ready to land.Jun 8 2021, 12:38