Skip to content

feat(node): Backport Follow Mode For v1.3.2 - #4995

Open
refcell wants to merge 3 commits into
releases/v1.3.2from
rf/feat/backport-4994-follow-mode-v1.3.2
Open

feat(node): Backport Follow Mode For v1.3.2#4995
refcell wants to merge 3 commits into
releases/v1.3.2from
rf/feat/backport-4994-follow-mode-v1.3.2

Conversation

@refcell

@refcell refcell commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Backports the unified binary follow mode from #4994 onto the releases/v1.3.2 release branch. This cherry-picks the three commits that add follow mode to the unified base binary along with the rustfmt and clippy cleanups. The commits applied cleanly with no conflicts. Note that #4994 is still open on main at the time of this backport, so this branch may need to be refreshed if that PR changes before it merges.

@refcell refcell added the backport Meta: PR is a backport from main label Sep 9, 2026
@refcell refcell self-assigned this Sep 9, 2026
refcell and others added 3 commits September 9, 2026 16:12
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@refcell
refcell force-pushed the rf/feat/backport-4994-follow-mode-v1.3.2 branch from 3a2b231 to e9885e3 Compare September 9, 2026 20:13
@refcell
refcell marked this pull request as ready for review September 9, 2026 20:18
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Summary

PR: Backport Follow Mode for v1.3.2

This PR adds a base follow subcommand to the unified binary, running an execution node and consensus follow node in a single process. The follow node reads canonical payloads from a source L2 RPC and inserts them via the embedded execution node's IPC engine socket.

Assessment: No blocking findings.

The implementation closely mirrors the existing base rpc command structure, which reduces risk:

  • Shutdown coordination (tokio::select! in bin/base/src/commands/follow.rs:112-130) correctly handles both execution-exits-first and follow-exits-first cases, matching the pattern in rpc.rs.
  • Engine endpoint override is correctly enforced: FollowNodeOverrides::embedded_execution(l2_engine_rpc) always provides Some(url), so the placeholder from EmbeddedL2ClientArgsL2ClientArgs conversion is never reached in the embedded path.
  • CLI flag namespacing (--follow.proofs, --follow.proofs.max-blocks-ahead, --follow.insert-delay-ms) avoids collisions with execution-layer flags when flattened into the unified command.
  • Cancellation propagation via CancellationToken and start_with_cancellation on FollowNode is clean, and the follow node also respects ShutdownSignal internally.
  • No .unwrap()/.expect() in non-test code, error handling is consistent with ? and map_err.
  • Not block-production-sensitive — follow mode is a follower/validator path, not a builder/sequencer path.

Tests cover CLI argument parsing, proofs flag defaults, and rejection of the --l2-engine-rpc flag (which must come from the embedded execution node).

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Base Std historical fork tests

Fork Result Passed Failed Skipped base/base base-anvil base-std
Beryl pass 616 0 13 bf6113a3 6d744e03 4658f1b7
Cobalt failure 596 250 14 bf6113a3 ae7557c4 3f899009

View run

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Caution

This PR may regress performance. 2 benchmark(s) slower by more than 10% beyond the noise band: batch_transaction_encoding/temporary_frame_buffers (+48.1%), execution/Insertion - 65,536 nodes (+20.7%).

Benchmark results (advisory)

Median time on the PR head versus the base branch, measured on the same host. Wall-clock, so a change is only flagged when it clears ±10% and the confidence intervals do not overlap. Only benchmarks past the ±10% threshold (plus new or dropped ones) are listed. This check never blocks a merge.

Benchmark Base Head Δ median
batch_transaction_encoding/temporary_frame_buffers 254.90 µs 377.46 µs +48.1% ⚠️ slower
execution/Insertion - 65,536 nodes 30.25 ms 36.52 ms +20.7% ⚠️ slower
execution/Open 1024 nodes - 4096 nodes 37.79 µs 46.17 µs +22.2% · within noise
execution/Open 1024 nodes - 65,536 nodes 72.18 µs 44.95 µs -37.7% ✅ faster
tx_selection_parkable_payload/transactions/10000 6.81 ms 6.09 ms -10.6% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=1000_predicates=1_stat 8.50 ms 7.28 ms -14.4% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=1000_predicates=8_stat 9.04 ms 7.57 ms -16.4% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=100_predicates=1_state 7.45 ms 6.69 ms -10.1% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=100_predicates=8_state 7.46 ms 6.63 ms -11.1% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=100_predicates=8_state_2 7.61 ms 6.68 ms -12.2% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=10_predicates=1_state= 7.35 ms 6.53 ms -11.2% ✅ faster
tx_selection_predicate_rescan/transactions=10000_predicate_transactions=10_predicates=8_state= 7.59 ms 6.51 ms -14.3% ✅ faster

37 benchmark(s) within ±10% omitted.

View run · Re-run benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Meta: PR is a backport from main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants