Summary
The get_some_initial_peers RPC appears to be dead code and should be removed unless there is an out-of-tree caller that still depends on it.
Background
While tracing bootstrap peer selection, I found that seed peer choice is driven by configured initial_peers, optional seed_peer_list_url, and libp2p/DHT bootstrap setup.
Relevant paths:
src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml builds initial_peers
src/lib/gossip_net/libp2p.ml merges seed peers and adds them to libp2p
src/app/libp2p_helper/src/codanet.go passes seeds into dht.BootstrapPeers(...)
The RPC itself is still defined:
src/lib/mina_networking/rpcs.ml defines Get_some_initial_peers
src/lib/mina_networking/mina_networking.ml exposes the RPC through the networking layer
However, I could not find a production call site for this RPC. Search results only show:
- the RPC definition/registration
- metrics
- fake/test network hooks
Why remove it
- Reduces dead code in the networking surface area
- Removes an apparently unused RPC and its associated metrics
- Simplifies reasoning about how bootstrap peer discovery actually works
Proposed work
- Remove
Get_some_initial_peers from src/lib/mina_networking/rpcs.ml
- Remove any corresponding exposure from
src/lib/mina_networking/mina_networking.mli and related interfaces
- Remove metrics that only exist for this RPC
- Update tests/fakes that still mention it
- Verify there is no external or operational dependency before merging
Acceptance criteria
get_some_initial_peers RPC is removed from the production networking API
- Build/tests pass after removing references
- No bootstrap/discovery behavior changes for normal node startup
- If an external dependency exists, document it and keep/remove the RPC accordingly
Open question
Is there any out-of-tree consumer, operational tooling, or older node workflow still relying on get_some_initial_peers? If not, we should delete it.
Summary
The
get_some_initial_peersRPC appears to be dead code and should be removed unless there is an out-of-tree caller that still depends on it.Background
While tracing bootstrap peer selection, I found that seed peer choice is driven by configured
initial_peers, optionalseed_peer_list_url, and libp2p/DHT bootstrap setup.Relevant paths:
src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.mlbuildsinitial_peerssrc/lib/gossip_net/libp2p.mlmerges seed peers and adds them to libp2psrc/app/libp2p_helper/src/codanet.gopasses seeds intodht.BootstrapPeers(...)The RPC itself is still defined:
src/lib/mina_networking/rpcs.mldefinesGet_some_initial_peerssrc/lib/mina_networking/mina_networking.mlexposes the RPC through the networking layerHowever, I could not find a production call site for this RPC. Search results only show:
Why remove it
Proposed work
Get_some_initial_peersfromsrc/lib/mina_networking/rpcs.mlsrc/lib/mina_networking/mina_networking.mliand related interfacesAcceptance criteria
get_some_initial_peersRPC is removed from the production networking APIOpen question
Is there any out-of-tree consumer, operational tooling, or older node workflow still relying on
get_some_initial_peers? If not, we should delete it.