Page MenuHomePhabricator

[avalanche] implement a proof relay struct
AbandonedPublic

Authored by PiRK on Apr 6 2021, 16:29.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

A peer has a set of proofs that we queue to share them with him and a filter of known proofs.
This struct is similar to the one used for transactions.

We initialize it for all node except block-relay nodes.

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Apr 6 2021, 16:29
PiRK planned changes to this revision.

rebase.
Simplify initialization of struct: the plan is to relay proof inventories to everyone, so the struct can be initialized in the constructor, we don't need to wait for service flags.

The approach looks sensible, but there are no test for anything. It seems like this does too little to constitute a unit.

src/net.cpp
3007

That doesn't sound like something you want to do unconditionally on all nodes.

deadalnix requested changes to this revision.Apr 29 2021, 11:57

I conclude from the lack of answer that there is actually no reason to initialize the struct where it is.

This revision now requires changes to proceed.Apr 29 2021, 11:57
src/net.cpp
3007

That doesn't sound like something you want to do unconditionally on all nodes.

The way I see the problem, we either need to make nodes signal with a service flag that they are willing to relay proofs, or we need to relay proofs to all nodes unconditionally.