apollo_network_benchmark: moved peerID creation files#12725
Open
Conversation
This was referenced Feb 19, 2026
This was referenced Feb 19, 2026
Contributor
Author
This was referenced Feb 19, 2026
f32a6eb to
9fd8303
Compare
d9248de to
41712e4
Compare
| let keypair = Keypair::ed25519_from_bytes(secret_key_bytes) | ||
| .context("Failed to derive keypair from node id")?; | ||
| Ok(keypair.public().to_peer_id().to_string()) | ||
| } |
There was a problem hiding this comment.
New exported function peer_id_from_node_id is unused
Low Severity
The newly added peer_id_from_node_id function is exported (pub) but has no callers anywhere in the codebase — the only match for peer_id_from_node_id is its definition. This may be intentional if an upstack PR in the stack will consume it, but as it stands in this PR, it introduces dead code along with unused anyhow and libp2p imports.
9fd8303 to
80cca2e
Compare
41712e4 to
140656d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Note
Low Risk
Low risk refactor that moves deterministic key derivation into a shared module; behavior should remain the same aside from removing secret-key logging and adding a new helper for PeerId derivation.
Overview
Stress test nodes now derive their deterministic libp2p secret key via a new shared
peer_keymodule instead of an inline helper, and the previous secret-key logging/utility function was removed.The benchmark crate also exports
peer_keyand addspeer_id_from_node_id()to deterministically compute aPeerIdstring from a node id.Written by Cursor Bugbot for commit 140656d. This will update automatically on new commits. Configure here.