Skip to content

apollo_network_benchmark: moved peerID creation files - #12725

Closed
sirandreww-starkware wants to merge 1 commit into
02-18-apollo_network_benchmark_moved_metric_declerations_to_cratefrom
02-18-apollo_network_benchmark_moved_peerid_creation_files
Closed

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

Conversation

@sirandreww-starkware

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

Copy link
Copy Markdown
Contributor

Note

Low Risk
Small refactor isolated to benchmark tooling; behavior should remain equivalent aside from removing secret-key logging and adding a new helper.

Overview
Centralizes deterministic peer key generation for the benchmark tooling by introducing peer_key (with private_key_from_node_id and peer_id_from_node_id) and exporting it from the crate.

Updates stress_test_node.rs to use the shared helper and removes the old inline key derivation (including the previous secret-key logging); adds anyhow to support error context when deriving a PeerId.

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

sirandreww-starkware commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor Author

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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
Copy Markdown

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 2 times, most recently from 140656d to a94623e Compare March 22, 2026 17:09
@sirandreww-starkware
sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_metric_declerations_to_crate branch from 80cca2e to 9bb267b Compare March 22, 2026 17:09
@sirandreww-starkware
sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_metric_declerations_to_crate branch from 9bb267b to 3c1df25 Compare March 30, 2026 11:08
@sirandreww-starkware
sirandreww-starkware force-pushed the 02-18-apollo_network_benchmark_moved_peerid_creation_files branch from a94623e to 291ab1d Compare March 30, 2026 11:08
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants