fix(rpc): remove 0x prefix from admin_peers id to match go-ethereum format#23318
Merged
Merged
Conversation
…ormat B256::to_string() / Display always prepends "0x" via alloy-primitives FixedBytes::fmt_hex. Replace with alloy_primitives::hex::encode() which emits a bare 64-char hex string, matching go-ethereum's admin_peers output. The node_info handler already uses the same hex::encode pattern (line 160), so this change makes the two handlers consistent.
mattsse
approved these changes
Apr 1, 2026
Collaborator
mattsse
left a comment
There was a problem hiding this comment.
Looks good to me. The admin_peers.id serialization now matches geth's bare lowercase hex format.
github-merge-queue Bot
pushed a commit
to tempoxyz/tempo
that referenced
this pull request
Apr 3, 2026
Automated nightly update of reth dependencies from `paradigmxyz/reth` main branch. ## Upstream reth changes [`f8efc76...c82d435`](paradigmxyz/reth@f8efc76...c82d435) 🔗 Amp thread: https://ampcode.com/threads/T-019d517e-981b-75fd-b3cf-8ad2455f38f6 **RPC** - Remove `0x` prefix from `admin_peers` id and return keccak256 node ID in `admin_nodeInfo.id` to match go-ethereum format ([#23318](paradigmxyz/reth#23318), [#23319](paradigmxyz/reth#23319)) - Apply count filter only after `after` is consumed in pagination ([#23338](paradigmxyz/reth#23338)) - Pre-allocate vectors in `eth_feeHistory` ([#23334](paradigmxyz/reth#23334)) - Add `bal` RPC methods ([#23330](paradigmxyz/reth#23330)) **Engine** - Include backpressure in reported `persistence_wait`, make wait-time mimic CL slot time ([#23308](paradigmxyz/reth#23308)) **Perf** - Reduce cacheline ping-pong in workers availability ([#23321](paradigmxyz/reth#23321)) **Net** - Avoid itertools `Format` panic in tracing log ([#23331](paradigmxyz/reth#23331)) **DB** - Cap `storage_v2` unwind history by MDBX tip ([#23335](paradigmxyz/reth#23335)) **Bench** - Add warmup step for big blocks mode ([#23323](paradigmxyz/reth#23323)) - Make payload handling ethereum-only ([#23324](paradigmxyz/reth#23324)) - Use repository instead of GitHub Actions cache to track hourly runs ([#23306](paradigmxyz/reth#23306)) - Upload nightly regression results to ClickHouse ([#23344](paradigmxyz/reth#23344)) **Chore** - Migrate `allow(clippy::` to `expect(clippy::` ([#23340](paradigmxyz/reth#23340)) - Remove unused return value from `dispatch_with_chunking` ([#23341](paradigmxyz/reth#23341)) - Update nixpkgs to 25.11 and refresh flake inputs ([#23342](paradigmxyz/reth#23342)) ## Migrations 🔗 Amp thread: https://ampcode.com/threads/T-019d517e-baf0-727b-a57e-0488240af973 - **Reth dependency bump**: All `reth-*` git dependencies updated from rev `f8efc76` to `c82d435` - **New `GetBlockAccessList` trait impl**: `TempoEthApi` now implements `GetBlockAccessList` (imported from `reth_rpc_eth_api::helpers::bal`), likely a new required trait added upstream in the reth update [GitHub Workflow](https://github.com/tempoxyz/tempo/actions/runs/23933027282) --------- Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
asdv23
added a commit
to mantle-xyz/reth
that referenced
this pull request
Apr 9, 2026
…ormat B256::to_string() / Display always prepends "0x" via alloy-primitives FixedBytes::fmt_hex. Replace with alloy_primitives::hex::encode() which emits a bare 64-char hex string, matching go-ethereum's admin_peers output. Port of paradigmxyz#23318
Merged
5 tasks
asdv23
added a commit
to mantle-xyz/reth
that referenced
this pull request
Apr 9, 2026
…stamp (#29) * fix(rpc): remove 0x prefix from admin_peers id to match go-ethereum format B256::to_string() / Display always prepends "0x" via alloy-primitives FixedBytes::fmt_hex. Replace with alloy_primitives::hex::encode() which emits a bare 64-char hex string, matching go-ethereum's admin_peers output. Port of paradigmxyz#23318 * fix(rpc): admin_nodeInfo.id returns keccak256 node ID matching go-ethereum format Previously, id2pk(enode.id).map(|pk| pk.to_string()) was used, which calls the secp256k1 crate's LowerHex implementation that returns the compressed public key (33 bytes, 66 hex chars, 02/03 prefix). go-ethereum computes the node ID as keccak256(X||Y) of the raw public key coordinates (32 bytes, 64 hex chars, no prefix). Since enode.id is already the raw 64-byte X||Y coordinates (PeerId = B512), calling keccak256 directly on it produces the correct node ID matching go-ethereum's format. Also removes now-unused id2pk import. Port of paradigmxyz#23319 * feat(mantle): add Arsia mainnet hardfork timestamp 1_776_841_200 Add MANTLE_MAINNET_ARSIA_TIMESTAMP constant matching op-geth params/mantle.go. Update from_chain_and_timestamp and mantle_mainnet() fork list to include Arsia. Extend tests with fork condition assertion and reverse-lookup coverage. * feat(chainspec): enable Arsia hardfork for Mantle mainnet at 1_776_841_200 Set mantle_arsia_time to MANTLE_MAINNET_ARSIA_TIMESTAMP in create_mantle_mainnet_genesis(). Per the Mantle alignment logic in OpChainSpec::from(Genesis), this activates Canyon/Ecotone/Fjord/Granite/ Holocene/Isthmus/Jovian simultaneously at the Arsia timestamp. Matches op-geth params/mantle.go: MantleArsiaTime: u64Ptr(1_776_841_200). * test(chainspec): complete OP fork alignment assertions in verify_hardfork_timestamps Add missing Fjord/Granite/Isthmus positive assertions and add pre-boundary negative assertions for Holocene and Jovian, so all 7 OP-layer forks activated at Arsia timestamp are fully covered.
asdv23
added a commit
to mantle-xyz/mantle-v2
that referenced
this pull request
Apr 10, 2026
…tream reth fix mantle-xyz/reth v2.2.1 (commit e166f3a9) ported paradigmxyz/reth#23318 and #23319, fixing admin_nodeInfo.id (compressed pubkey → keccak256) and admin_peers[].id (0x prefix removed). Both formats now match go-ethereum. Remove the client-side workarounds that were needed before the fix: - enodeNodeID(): derived node ID from enode URL to avoid admin_nodeInfo.id mismatch - matchesPeerID(): stripped 0x prefix from admin_peers[].id Peer comparison now uses admin_nodeInfo.ID directly (p.ID == info.ID). All other reth compatibility changes (bidirectional addPeer, 90s timeout, Wipe, WaitUntilValid, SupportsPostFinalizationELSync) are unaffected. -40 lines, 2 functions removed, 2 imports removed (strings, enode).
3 tasks
asdv23
added a commit
to mantle-xyz/mantle-v2
that referenced
this pull request
Apr 10, 2026
…tream reth fix mantle-xyz/reth v2.2.1 (commit e166f3a9) ported paradigmxyz/reth#23318 and #23319, fixing admin_nodeInfo.id (compressed pubkey → keccak256) and admin_peers[].id (0x prefix removed). Both formats now match go-ethereum. Remove the client-side workarounds that were needed before the fix: - enodeNodeID(): derived node ID from enode URL to avoid admin_nodeInfo.id mismatch - matchesPeerID(): stripped 0x prefix from admin_peers[].id Peer comparison now uses admin_nodeInfo.ID directly (p.ID == info.ID). All other reth compatibility changes (bidirectional addPeer, 90s timeout, Wipe, WaitUntilValid, SupportsPostFinalizationELSync) are unaffected. -40 lines, 2 functions removed, 2 imports removed (strings, enode).
asdv23
added a commit
to mantle-xyz/mantle-v2
that referenced
this pull request
Apr 14, 2026
…assertions
- Document reth v2.2.1 P2P node ID format invariant on ConnectP2P
(mantle-xyz/reth e166f3a9, paradigmxyz/reth#23318 #23319)
- Remove dead if-guard in normalizeSysextCoinbase fallthrough path
- Restore initial EIP-1559 param assertions for sysgo mode; sysext
skips them because the devnet may carry prior SystemConfig writes
- Convert sync_tester_hfs re-enable prose into TODO comments for
tooling discoverability
- Add bob.VerifyBalanceExact in transfer test to close recipient-side
coverage gap after ValidateReceipt → ValidateTransaction migration
- Soften "avoiding" → "reducing" in transfer test comment; note that
vault snapshots still use latest-block queries
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.
Summary
Removes the spurious
0xprefix fromadmin_peers[].id, making it consistent with go-ethereum which returns bare hex without any prefix.Root Cause
keccak256(...).to_string()uses alloy-primitivesB256::Display, which always prepends0x(viafmt_hexwithprefix = true). Replacing it withalloy_primitives::hex::encode(...)produces a bare 64-character hex string.As a bonus, the
node_infohandler in the same file already useshex::encodeat line 160 — so this change makes both handlers consistent.Change
File:
crates/rpc/rpc/src/admin.rsBefore / After
0x?0x6b36f791352f15eb3ec4f67787074ab8ad9d487e37c4401d383f0561a0a205076b36f791352f15eb3ec4f67787074ab8ad9d487e37c4401d383f0561a0a20507Closes #23316
Related
0xprefix issue