Page MenuHomePhabricator

[avalanche] Add a sendavalancheproof RPC shell
ClosedPublic

Authored by Fabien on May 10 2021, 13:35.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC2e4bc27105b7: [avalanche] Add a sendavalancheproof RPC shell
Summary

This adds a new sendavalancheproof RPC which takes a proof, validates
it, adds it to the pool if not known already and announces it via a
proof inventory message.

Sending the inventory message needs some code in the network layer,
which itself cannot be tested without a RPC to trigger it. This is the
reason why this RPC does not send the proof yet. This will be added in a
follow up diff for ease of review.

This diff contains all the tooling and tests to make it very easy to
complete the RPC once done.

Depends on D9648.

Ref T1611.

Test Plan
./test/functional/test_runner.py abc_rpc_avalancheproof

Diff Detail

Event Timeline

Fabien requested review of this revision.May 10 2021, 13:35
Fabien planned changes to this revision.May 10 2021, 14:46

Fix the build with no wallet

deadalnix requested changes to this revision.May 10 2021, 15:54
deadalnix added a subscriber: deadalnix.

This is doing several thing at once. What about starting with a validateproof RPC?

src/net_processing.cpp
1784

IIRC, this send only thing to outbound peers, no? Is that the set of peer that is desired? Maybe that is fine for now.

src/net_processing.h
19

I don't think the semicolon is needed.

This revision now requires changes to proceed.May 10 2021, 15:54
Mengerian added a task: Restricted Maniphest Task.May 21 2021, 15:58
Fabien planned changes to this revision.Jun 4 2021, 19:58
Fabien retitled this revision from [avalanche] Add a sendavalancheproof RPC to broadcast a proof to [avalanche] Add a sendavalancheproof RPC shell.Jun 8 2021, 15:04
Fabien edited the summary of this revision. (Show Details)
Fabien edited the test plan for this revision. (Show Details)

Rebase on top of D9648, make it an empty shell for now

This revision is now accepted and ready to land.Jun 8 2021, 15:29