Page MenuHomePhabricator

[avalanche] Initiate avalanche when the service bit is present and we have a stake.
ClosedPublic

Authored by deadalnix on Sat, Jan 9, 23:44.

Details

Summary

When a new node connects itself and supports avalanche, then we send an avahello message. This message simply contains a delegation and a signature proving we own the final key.

Depends on D8861

In order to ensure the signature is secure, we need extra entropy from our peer, which is exactly what D8861 does.

Test Plan
ninja all check-all

Extended the avalanche test to check thta avahello messages are sent properly.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien requested changes to this revision.Mon, Jan 11, 10:34
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/net.h
857 ↗(On Diff #26832)

Remove

src/net_processing.cpp
3848 ↗(On Diff #26832)

This part probably belongs to another diff, since it's an empty shell for now.

3863 ↗(On Diff #26832)

No longer needed since D8794.

This revision now requires changes to proceed.Mon, Jan 11, 10:34
src/net.h
857 ↗(On Diff #26832)

Good catch

src/net_processing.cpp
3848 ↗(On Diff #26832)

It's a useful stub and won't cause problems down the road.

3862–3863 ↗(On Diff #26832)

likestamp

Let's go with the stub then. It's indeed a non issue for now.

This revision is now accepted and ready to land.Tue, Jan 12, 08:03