Skip to content

[RPCSAGA]: getaddrmaninforpc command#1064

Open
jaoleal wants to merge 4 commits into
getfloresta:masterfrom
jaoleal:rpcsaga/getaddrmaninfo
Open

[RPCSAGA]: getaddrmaninforpc command#1064
jaoleal wants to merge 4 commits into
getfloresta:masterfrom
jaoleal:rpcsaga/getaddrmaninfo

Conversation

@jaoleal
Copy link
Copy Markdown
Member

@jaoleal jaoleal commented May 15, 2026

Description and Notes

Split of #916

This pr is solely implementing getaddrmaninfo rpc command

The rpc is a read-only getter for connection statistics from the address manager, it needed some plumbing on floresta-wire but is most about data transport.

This pr adds the rpc-server internal handler, the docs and entry for the cli and integration tests.

How to verify the changes you have done?

Run the tests and the command locally, you should see something similar as:

/Floresta (rpcsaga/getaddrmaninfo) $ fcli getaddrmaninfo
   Compiling floresta-rpc v0.5.0 (/Users/jaoleal/Floresta/crates/floresta-rpc)
   Compiling floresta-cli v0.5.0 (/Users/jaoleal/Floresta/bin/floresta-cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.72s
     Running `target/debug/floresta-cli getaddrmaninfo`
{
  "all_networks": {
    "total": 44190,
    "new": 43450,
    "tried": 740
  },
  "ipv4": {
    "total": 35255,
    "new": 34573,
    "tried": 682
  },
  "ipv6": {
    "total": 8935,
    "new": 8877,
    "tried": 58
  },
  "onion": {
    "total": 0,
    "new": 0,
    "tried": 0
  },
  "i2p": {
    "total": 0,
    "new": 0,
    "tried": 0
  },
  "cjdns": {
    "total": 0,
    "new": 0,
    "tried": 0
  }
}

jaoleal added 4 commits May 14, 2026 21:39
Add the core plumbing for a getaddrmaninfo RPC that returns address
manager statistics broken down by network type (ipv4, ipv6, onion,
i2p, cjdns). Each network reports total, new (untried), and tried
address counts.
Expose the getaddrmaninfo plumbing from floresta-wire as a JSON-RPC
method in the floresta-node server.
Expose getaddrmaninfo through the floresta-rpc trait and the
floresta-cli binary, with accompanying RPC documentation.
Add Python RPC wrapper and integration test that exercises the
getaddrmaninfo RPC method, validating the response schema and
the total == new + tried invariant for each network.
@jaoleal jaoleal requested a review from moisesPompilio May 15, 2026 01:40
@jaoleal jaoleal self-assigned this May 15, 2026
@jaoleal jaoleal added new rpc This issue/PR implements a new json-rpc endpoint RPC Changes something with our JSON-RPC interface labels May 15, 2026
@jaoleal jaoleal added this to Floresta May 15, 2026
@jaoleal jaoleal added this to the Q2/2026 milestone May 15, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Floresta May 15, 2026
@jaoleal jaoleal moved this from Backlog to Needs review in Floresta May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new rpc This issue/PR implements a new json-rpc endpoint RPC Changes something with our JSON-RPC interface

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

1 participant