Skip to content

apollo_network_benchmark: moved peerID creation files#12725

Open
sirandreww-starkware wants to merge 1 commit into02-18-apollo_network_benchmark_moved_metric_declerations_to_cratefrom
02-18-apollo_network_benchmark_moved_peerid_creation_files
Open

apollo_network_benchmark: moved peerID creation files#12725
sirandreww-starkware wants to merge 1 commit into02-18-apollo_network_benchmark_moved_metric_declerations_to_cratefrom
02-18-apollo_network_benchmark_moved_peerid_creation_files

Conversation

@sirandreww-starkware
Copy link
Contributor

@sirandreww-starkware sirandreww-starkware commented Feb 19, 2026

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_key module instead of an inline helper, and the previous secret-key logging/utility function was removed.

The benchmark crate also exports peer_key and adds peer_id_from_node_id() to deterministically compute a PeerId string from a node id.

Written by Cursor Bugbot for commit 140656d. This will update automatically on new commits. Configure here.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

sirandreww-starkware commented Feb 19, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sirandreww-starkware sirandreww-starkware marked this pull request as ready for review February 19, 2026 07:27
@sirandreww-starkware sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_metric_declerations_to_crate branch from f32a6eb to 9fd8303 Compare February 19, 2026 08:04
@sirandreww-starkware sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_peerid_creation_files branch from d9248de to 41712e4 Compare February 19, 2026 08:04
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

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())
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

@sirandreww-starkware sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_metric_declerations_to_crate branch from 9fd8303 to 80cca2e Compare March 16, 2026 15:13
@sirandreww-starkware sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_peerid_creation_files branch from 41712e4 to 140656d Compare March 16, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants