Page MenuHomePhabricator

[avalanche] Add a getavalancheinfo RPC for general status info
ClosedPublic

Authored by Fabien on Mar 4 2022, 16:47.

Details

Summary

This returns some general informations about how many proofs we know, the total staked amount and how many avalanche nodes we are connected to. This can be used to monitor the avalanche network.

The avalanche query timeout is made configurable to let the test run in a reasonable amount of time (the default timeout is 10s).

Depends on D11131 and D11132.

Test Plan
ninja all check-all

Diff Detail

Event Timeline

Fabien requested review of this revision.Mar 4 2022, 16:47
Mengerian requested changes to this revision.Mar 4 2022, 19:49
Mengerian added a subscriber: Mengerian.
Mengerian added inline comments.
src/rpc/avalanche.cpp
575 ↗(On Diff #32594)

How about calling it "total_stake_amount", to make it totally unambiguous from the fields that return a count.

576 ↗(On Diff #32594)

Should this specify the unit? Ie, XEC, or satoshi?

577 ↗(On Diff #32594)

Similarly, I'd call this "connected_stake_amount"

This revision now requires changes to proceed.Mar 4 2022, 19:49

Feedback: improve field naming and specify the unit in the help

tyler-smith added a subscriber: tyler-smith.

Concept and implementation both look good.

This revision is now accepted and ready to land.Mar 11 2022, 23:52