Skip to content

feat: addpeeraddress rpc#1117

Draft
jaoleal wants to merge 5 commits into
getfloresta:masterfrom
jaoleal:rpc/addpeeraddress
Draft

feat: addpeeraddress rpc#1117
jaoleal wants to merge 5 commits into
getfloresta:masterfrom
jaoleal:rpc/addpeeraddress

Conversation

@jaoleal
Copy link
Copy Markdown
Member

@jaoleal jaoleal commented Jun 3, 2026

Description and Notes

addpeeraddress Is a simple hidden RPC that adds an address into the Address Manager.

This PR implements the addpeeraddress rpc, with docs and integration tests.

Depends on #1116

How to verify the changes you have done?

The tests use the getaddrmaninfo rpc to assert the addresses are correctly handled.

@jaoleal jaoleal marked this pull request as draft June 3, 2026 15:34
@jaoleal jaoleal requested a review from Davidson-Souza June 3, 2026 15:34
@jaoleal jaoleal self-assigned this Jun 3, 2026
@jaoleal jaoleal added the new rpc This issue/PR implements a new json-rpc endpoint label Jun 3, 2026
@jaoleal jaoleal added this to Floresta Jun 3, 2026
@jaoleal jaoleal moved this from Backlog to Needs review in Floresta Jun 3, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Floresta Jun 3, 2026
@jaoleal jaoleal moved this from Needs review to In progress in Floresta Jun 3, 2026
@jaoleal jaoleal added this to the Q2/2026 milestone Jun 3, 2026
jaoleal added 5 commits June 3, 2026 12:37
Extract the network-to-default-P2P-port mapping from add_node() into a
reusable default_network_port() method on RpcImpl, so other RPC handlers
can resolve the default port without duplicating the match.
Add the wire-layer plumbing for the addpeeraddress RPC:
- UserRequest::AddPeerAddress and NodeResponse::AddPeerAddress variants
- add_peer_address() method on NodeInterface
- handle_add_peer_address() implementation in peer_man
- address_count() helper on AddressMan
- Match arm in perform_user_request()
Register the addpeeraddress RPC endpoint in the JSON-RPC server:
- Add add_peer_address() handler in network.rs
- Register "addpeeraddress" route in server.rs with address, optional
  port (defaults to network P2P port), and optional tried parameters
- Add RPC documentation
Add addpeeraddress to the FlorestaRPC trait and its blanket
implementation for JSON-RPC clients. Wire the new method into
the floresta-cli binary as a subcommand with address, port,
and optional tried parameters.
Add Python integration test verifying addpeeraddress correctly adds
addresses to the address manager, and add the add_peer_address()
wrapper to the test framework.
@jaoleal jaoleal force-pushed the rpc/addpeeraddress branch from 97a2837 to 99fd546 Compare June 3, 2026 15:40
@jaoleal jaoleal requested a review from moisesPompilio June 3, 2026 17:59
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

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant