Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f2371e3
feat(cli): add console subcommand for operator RPC access
camembera Apr 16, 2026
894d6aa
chore: remove http_headers dead code from console
camembera Apr 16, 2026
a71e401
fix: address PR review findings
camembera Apr 16, 2026
03ba0b6
fix: tighten wei heuristic, add IPC timeout, harden completions
camembera Apr 16, 2026
d2587f6
fix(console): detect endpoint transport case-insensitively
camembera Apr 17, 2026
d2d0a5e
test(console): cover IPC paths without URL schemes
camembera Apr 17, 2026
eeeb239
fix(console): parse .map() selector with balanced parentheses
camembera Apr 17, 2026
8c6a901
fix(console): clarify rpc_modules JSON parse failures
camembera Apr 17, 2026
8559746
fix(console): show empty state for detailed peers table
camembera Apr 17, 2026
2d1bcfb
refactor(console): remove named alias table and shortcuts
camembera Apr 17, 2026
732a4e5
feat(console): restore removeAllPeers batch admin.removePeer flow
camembera Apr 17, 2026
9b1363e
docs(console): mention removeAllPeers in --exec help
camembera Apr 17, 2026
3607147
fix(console): Unicode-safe peer/reason truncation in output formatting
camembera Apr 17, 2026
3af49a4
refactor(console): replace rustyline with reedline
camembera Apr 17, 2026
7681683
chore(ci): fmt, dprint, rustdoc, and machete allowlist
camembera Apr 17, 2026
08609bf
fix(deps): bump rand for RUSTSEC-2026-0097
camembera Apr 17, 2026
6c4c5ba
Merge branch 'main' into feat/reth-console
camembera Apr 17, 2026
54e4656
fix(console): align beraAdmin startup snapshot with node status JSON
camembera Apr 17, 2026
dd05c97
fix(console): ignore null JSON-RPC error field on IPC responses
camembera Apr 17, 2026
24934db
fix(console): use beradmin_* JSON-RPC namespace
camembera Apr 22, 2026
d6e0b98
refactor(console): remove HTTP and WebSocket transport support
camembera Apr 24, 2026
ddc11ab
cargo fmt
camembera Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
452 changes: 277 additions & 175 deletions Cargo.lock

Large diffs are not rendered by default.

118 changes: 78 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,71 +15,90 @@ alloy-rlp = "0.3.13"
alloy-rpc-types = "1.6.3"
alloy-rpc-types-eth = "1.6.3"
alloy-serde = "1.6.3"
alloy-signer = "1.6.3"
alloy-signer-local = "1.6.3"
alloy-sol-macro = "1.5.6"
alloy-sol-types = "1.5.6"
bytes = "1.10.1"
clap = { version = "4.5.40", features = ["derive"] }
derive_more = "2.0.1"
dirs = "6.0.0"
eyre = "0.6.12"
libc = "0.2.177"
reedline = "0.47"
sha2 = "0.10"

# rpc
jsonrpsee = "0.26.0"
jsonrpsee = { version = "0.26.0", features = ["http-client", "ws-client"] }
jsonrpsee-core = { version = "0.26.0", features = ["server"] }
jsonrpsee-proc-macros = "0.26.0"

async-trait = "0.1.88"
futures = "0.3.32"
modular-bitfield = "0.13.1"
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-codecs = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-payload-validator = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
# RUSTSEC-2026-0097: use >=0.8.6 on the 0.8 release line.
rand = "0.8.6"
reth = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-basic-payload-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-chainspec = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli-commands = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli-runner = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli-util = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-codecs = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-consensus-common = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-db = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-db-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-engine-local = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-engine-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-errors = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-eth-wire-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-cli = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-engine-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-payload-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-evm = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-evm-ethereum = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-metrics = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network-peers = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-core = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-ethereum = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-payload-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-payload-validator = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-primitives-traits = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-convert = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-engine-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-eth-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-eth-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-server-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-storage-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-transaction-pool = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
Comment on lines +41 to +81
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Branch-based camembera/reth deps in Cargo.toml:"
rg -n '^\s*reth[-a-z0-9]*\s*=\s*\{[^}]*git\s*=\s*"https://github.com/camembera/reth"[^}]*branch\s*=\s*"pog/provenance-callback"' Cargo.toml

if [ -f Cargo.lock ]; then
  echo
  echo "Resolved camembera/reth sources in Cargo.lock:"
  rg -n 'source = "git\+https://github.com/camembera/reth\?branch=pog/provenance-callback#[0-9a-f]+"' Cargo.lock

  echo
  echo "Unique resolved commit SHAs:"
  rg -o 'git\+https://github.com/camembera/reth\?branch=pog/provenance-callback#[0-9a-f]+' Cargo.lock \
    | sed 's/.*#//' \
    | sort -u
fi

Repository: berachain/bera-reth

Length of output: 4764


🏁 Script executed:

ls -la Cargo.lock 2>&1 || echo "Cargo.lock not found"

Repository: berachain/bera-reth

Length of output: 125


🏁 Script executed:

# Check the structure of Cargo.toml to confirm the issue
head -100 Cargo.toml | tail -65

Repository: berachain/bera-reth

Length of output: 5275


🏁 Script executed:

# If Cargo.lock exists, search for any resolved refs to camembera/reth
if [ -f Cargo.lock ]; then
  echo "=== Cargo.lock entries for camembera/reth ===" 
  rg -A 3 'name = "reth' Cargo.lock | grep -A 3 'camembera' | head -50
fi

Repository: berachain/bera-reth

Length of output: 1818


🏁 Script executed:

# Extract all unique commit SHAs from Cargo.lock for camembera/reth
rg -o 'git\+https://github.com/camembera/reth\?branch=pog%2Fprovenance-callback#[0-9a-f]+' Cargo.lock | sed 's/.*#//' | sort -u

Repository: berachain/bera-reth

Length of output: 104


Pin reth-* git dependencies to explicit revisions

All 41 reth-* crates (lines 41–81, 96–98) use the mutable branch pog/provenance-callback. Although Cargo.lock resolves all to commit ab0c215ee7276dab1f9cc944258b530a7cef466a, this approach reduces reproducibility if the lock file is refreshed or regenerated. Replace the branch reference with an explicit rev pin to make dependency resolution immutable and improve supply-chain control.

Proposed manifest direction
-reth = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
+reth = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }

-reth-cli-runner = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
+reth-cli-runner = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }

Apply the same revision across all reth-* entries.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
reth = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-basic-payload-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-chainspec = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli-commands = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli-runner = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-cli-util = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-codecs = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-consensus-common = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-db = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-db-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-engine-local = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-engine-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-errors = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-eth-wire-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-cli = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-engine-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-payload-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-ethereum-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-evm = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-evm-ethereum = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-metrics = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network-peers = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-network-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-core = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-node-ethereum = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-payload-primitives = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-payload-validator = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-primitives-traits = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-convert = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-engine-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-eth-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-eth-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-server-types = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-storage-api = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-transaction-pool = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-basic-payload-builder = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-chainspec = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-cli = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-cli-commands = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-cli-runner = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-cli-util = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-codecs = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-consensus-common = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-db = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-db-api = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-engine-local = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-engine-primitives = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-errors = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-eth-wire-types = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-ethereum-cli = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-ethereum-engine-primitives = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-ethereum-payload-builder = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-ethereum-primitives = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-evm = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-evm-ethereum = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-metrics = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-network = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-network-api = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-network-peers = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-network-types = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-node-api = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-node-builder = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-node-core = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-node-ethereum = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-payload-primitives = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-payload-validator = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-primitives-traits = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-rpc = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-rpc-convert = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-rpc-engine-api = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-rpc-eth-api = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-rpc-eth-types = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-rpc-server-types = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-storage-api = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
reth-transaction-pool = { git = "https://github.com/camembera/reth", rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a" }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Cargo.toml` around lines 41 - 81, The reth-* git dependencies currently use
the mutable branch "pog/provenance-callback"; update each reth crate entry
(e.g., reth, reth-basic-payload-builder, reth-cli, reth-db, reth-evm, reth-rpc,
etc.) to pin the exact commit by replacing the branch =
"pog/provenance-callback" with rev = "ab0c215ee7276dab1f9cc944258b530a7cef466a"
(use the same rev for all listed reth-* entries) so Cargo resolves immutably and
the lockfile cannot drift.

rusqlite = { version = "0.32", features = ["bundled"] }
serde = { version = "1.0", features = ["derive"], default-features = false }
serde_json = "1.0"
thiserror = "2.0"
tokio = "1.46.0"
tokio = { version = "1.46.0", features = ["macros", "rt-multi-thread", "net", "io-util"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3", default-features = false, features = ["registry"] }

[dev-dependencies]
alloy-provider = "1.6.3"
alloy-rpc-client = "1.6.3"
alloy-rpc-types-trace = "1.6.3"
eyre = "0.6.12"
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
jsonrpsee = { version = "0.26.0", features = ["server"] }
reth-e2e-test-utils = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-rpc-builder = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
reth-trie-common = { git = "https://github.com/camembera/reth", branch = "pog/provenance-callback" }
revm-inspectors = "0.34.2"
serde_json = "1.0"
tempfile = "3"
test-fuzz = "7"

[build-dependencies]
Expand Down Expand Up @@ -110,7 +129,26 @@ opt-level = 3
lto = "thin"

[package.metadata.cargo-machete]
ignored = ["modular-bitfield"]
# cargo-machete misses macro/build.rs/test-only uses; keep explicit allowlist in sync when deps change.
ignored = [
"alloy-provider",
"alloy-rpc-client",
"alloy-signer",
"futures",
"modular-bitfield",
"rand",
"reth-eth-wire-types",
"reth-metrics",
"reth-network",
"reth-network-api",
"reth-network-types",
"reth-rpc-builder",
"rusqlite",
"test-fuzz",
"tracing-subscriber",
"vergen",
"vergen-git2",
]

# [patch."https://github.com/paradigmxyz/reth"]
# reth = { path = "../reth/bin/reth" }
Expand Down
58 changes: 58 additions & 0 deletions src/berachain_cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//! Berachain-specific CLI subcommands (extension to reth Ethereum CLI).

use clap::Subcommand;
use reth_cli_runner::CliRunner;
use reth_ethereum_cli::app::ExtendedCommand;

#[derive(Debug, Subcommand)]
pub enum BerachainSubcommands {
/// JSON-RPC console over IPC, HTTP, or WebSocket.
Console(crate::console::ConsoleCommand),
}

impl ExtendedCommand for BerachainSubcommands {
fn execute(self, runner: CliRunner) -> eyre::Result<()> {
match self {
Self::Console(cmd) => cmd.run(runner),
}
}
}

#[cfg(test)]
mod tests {
use super::*;
use crate::chainspec::BerachainChainSpecParser;
use clap::Parser;
use reth_cli_commands::node::NoArgs;
use reth_ethereum_cli::interface::{Cli, Commands};
use reth_rpc_server_types::DefaultRpcModuleValidator;

#[test]
fn parses_console_subcommand() {
let err = Cli::<
BerachainChainSpecParser,
NoArgs,
DefaultRpcModuleValidator,
BerachainSubcommands,
>::try_parse_from(["bera-reth", "console", "--help"])
.unwrap_err();
assert_eq!(err.kind(), clap::error::ErrorKind::DisplayHelp);
}

#[test]
fn ext_console_variant_reachable() {
let cli = Cli::<
BerachainChainSpecParser,
NoArgs,
DefaultRpcModuleValidator,
BerachainSubcommands,
>::try_parse_from(["bera-reth", "console", "--exec", "eth_blockNumber"])
.unwrap();
match cli.command {
Commands::Ext(BerachainSubcommands::Console(ref c)) => {
assert_eq!(c.exec.as_deref(), Some("eth_blockNumber"));
}
_ => panic!("expected console ext"),
}
}
}
12 changes: 6 additions & 6 deletions src/chainspec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ impl BerachainChainSpec {
// We filter out TTD-based forks w/o a pre-known block since those do not show up in
// the fork filter.
Some(match condition {
ForkCondition::Block(block) |
ForkCondition::TTD { fork_block: Some(block), .. } => ForkFilterKey::Block(block),
ForkCondition::Block(block)
| ForkCondition::TTD { fork_block: Some(block), .. } => ForkFilterKey::Block(block),
ForkCondition::Timestamp(time) => ForkFilterKey::Time(time),
_ => return None,
})
Expand Down Expand Up @@ -160,8 +160,8 @@ impl BerachainChainSpec {
for (_, cond) in self.inner.hardforks.forks_iter() {
// handle block based forks and the sepolia merge netsplit block edge case (TTD
// ForkCondition with Some(block))
if let ForkCondition::Block(block) |
ForkCondition::TTD { fork_block: Some(block), .. } = cond
if let ForkCondition::Block(block)
| ForkCondition::TTD { fork_block: Some(block), .. } = cond
{
if head.number >= block {
// skip duplicated hardforks: hardforks enabled at genesis block
Expand Down Expand Up @@ -573,8 +573,8 @@ impl From<Genesis> for BerachainChainSpec {
}

// Validate Prague3 ordering if configured (Prague3 must come at or after Prague2)
if let Some(prague3_config) = prague3_config_opt.as_ref() &&
prague3_config.time < prague2_config.time
if let Some(prague3_config) = prague3_config_opt.as_ref()
&& prague3_config.time < prague2_config.time
{
panic!(
"Prague3 hardfork must activate at or after Prague2 hardfork. Prague2 time: {}, Prague3 time: {}.",
Expand Down
12 changes: 6 additions & 6 deletions src/consensus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ impl FullConsensus<BerachainPrimitives> for BerachainBeaconConsensus {
for receipt in &result.receipts {
for log in &receipt.logs {
// Check if this is a Transfer event (first topic is the event signature)
if log.topics().first() == Some(&TRANSFER_EVENT_SIGNATURE) &&
log.topics().len() >= 3
if log.topics().first() == Some(&TRANSFER_EVENT_SIGNATURE)
&& log.topics().len() >= 3
{
// Transfer event has indexed from (topics[1]) and to (topics[2]) addresses
let from_addr = Address::from_word(log.topics()[1]);
let to_addr = Address::from_word(log.topics()[2]);

// Check if BEX vault is involved in the transfer (block all BEX vault
// transfers)
if let Some(bex_vault) = bex_vault_address &&
(from_addr == bex_vault || to_addr == bex_vault)
if let Some(bex_vault) = bex_vault_address
&& (from_addr == bex_vault || to_addr == bex_vault)
{
return Err(ConsensusError::Other(
BerachainExecutionError::Prague3BexVaultTransfer {
Expand Down Expand Up @@ -197,8 +197,8 @@ impl FullConsensus<BerachainPrimitives> for BerachainBeaconConsensus {
for log in &receipt.logs {
// Check if this log is from the BEX vault and is an InternalBalanceChanged
// event
if log.address == bex_vault_address &&
log.topics().first() == Some(&INTERNAL_BALANCE_CHANGED_SIGNATURE)
if log.address == bex_vault_address
&& log.topics().first() == Some(&INTERNAL_BALANCE_CHANGED_SIGNATURE)
{
return Err(ConsensusError::Other(
BerachainExecutionError::Prague3BexVaultEvent {
Expand Down
60 changes: 60 additions & 0 deletions src/console/cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
use clap::Args;
use reth_cli_runner::CliRunner;

/// JSON-RPC console over IPC.
#[derive(Debug, Clone, Args)]
pub struct ConsoleCommand {
/// IPC path. If omitted, uses the platform default datadir with `reth.ipc`.
#[arg(value_name = "ENDPOINT")]
pub endpoint: Option<String>,

/// Run a single command and print raw JSON (implies raw output; no prompts).
#[arg(long = "exec")]
pub exec: Option<String>,

/// In REPL mode, print raw JSON instead of tables and annotations.
#[arg(long)]
pub raw: bool,
}

impl ConsoleCommand {
pub fn run(self, runner: CliRunner) -> eyre::Result<()> {
runner.block_on(super::run::run_console(self))
}
}

#[cfg(test)]
mod tests {
use super::*;
use clap::Parser;

#[derive(clap::Parser)]
#[command(name = "bera-reth")]
struct Top {
#[command(subcommand)]
sub: Sub,
}

#[derive(clap::Subcommand)]
enum Sub {
Console(ConsoleCommand),
}

#[test]
fn parses_exec_and_raw() {
let Top { sub: Sub::Console(c) } =
Top::try_parse_from(["bera-reth", "console", "--exec", "eth.blockNumber", "--raw"])
.unwrap();
assert_eq!(c.exec.as_deref(), Some("eth.blockNumber"));
assert!(c.raw);
assert!(c.endpoint.is_none());
}

#[test]
fn parses_positional_endpoint() {
let Top { sub: Sub::Console(c) } =
Top::try_parse_from(["bera-reth", "console", "/tmp/reth.ipc"]).unwrap();
assert_eq!(c.endpoint.as_deref(), Some("/tmp/reth.ipc"));
assert!(!c.raw);
}
}
Loading
Loading