Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
c314bc2
chore(flashblocks-rpc): clean up and refactor dirs
sieniven Mar 9, 2026
beed97b
style(flashblocks): fix import ordering in cache module
sieniven Mar 9, 2026
8c4ca82
feat(flashblocks-rpc): add state cache with pending and confirm caches
sieniven Mar 9, 2026
8bb7fc0
chore(flashblocks-rpc): remove types module and clean up re-exports
sieniven Mar 9, 2026
9be3a74
feat(flashblocks): add pending sequence and canonical block handlers …
sieniven Mar 9, 2026
9a25e60
feat(builder): revamp flashblocks caching layer
sieniven Mar 10, 2026
2cb1ea3
fix(flashblocks-rpc): fix range bounds trait impl operations
sieniven Mar 10, 2026
59164fd
chore(flashblocks-rpc): refactor state mod
sieniven Mar 11, 2026
dd25891
feat(flashblocks-rpc): add transaction index to confirm cache
sieniven Mar 11, 2026
d805b73
feat(flashblocks-rpc): add cache overlay for sealed_headers_while
sieniven Mar 11, 2026
2634962
fix(flashblocks-rpc): refactor range to add optional predicate
sieniven Mar 11, 2026
e25008c
chore(flashblocks-rpc): refactor cache, add tx index to pending sequence
sieniven Mar 11, 2026
e94f969
refactor(flashblocks-rpc): move provider impls to eth api override in…
sieniven Mar 11, 2026
1dd2c75
style(rpc): clean up import ordering and formatting
sieniven Mar 11, 2026
10fd30c
feat(flashblocks-rpc): clean up handle logic and channels
sieniven Mar 11, 2026
c9a18d8
feat(flashblock-rpc): fix flashblocks eth extensions and helpers, cle…
sieniven Mar 12, 2026
043e312
refactor(node): unify flashblocks state init into single if-let block
sieniven Mar 12, 2026
5ab3b80
refactor(flashblocks): store ExecutedBlock in confirm cache for state…
sieniven Mar 12, 2026
b62076a
feat(flashblocks-rpc): add memory overlay state provider for flashblo…
sieniven Mar 13, 2026
b122e33
feat(flashblocks-rpc): support eth_sendRawTransactionSync
sieniven Mar 13, 2026
dafa740
feat(flashblocks-rpc): support eth_call and eth_estimateGas
sieniven Mar 13, 2026
30ae3a1
fix(flashblocks-rpc): simplify eth_call and eth_estimateGas trait calls
sieniven Mar 13, 2026
b41d65b
feat(flashblocks-rpc): support raw flashblocks payload cache
sieniven Mar 13, 2026
d47ef3b
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Mar 13, 2026
6666f70
Fix merge errors
sieniven Mar 13, 2026
634be38
fix(flashblocks-rpc): use spawn_critical_task for service handles
sieniven Mar 13, 2026
391da2c
test(flashblocks-rpc): add unit test coverages for caches
sieniven Mar 13, 2026
c18a37d
chore: fix tests
sieniven Mar 16, 2026
53c30db
feat(flashblocks-rpc): add cached receipts to pending sequence and st…
sieniven Mar 16, 2026
324de32
chore(flashblocks): re-export FlashblockCachedReceipt from crate root
sieniven Mar 16, 2026
707f540
refactor(flashblocks): remove execution cache, inline types into exec…
sieniven Mar 16, 2026
079ecb7
feat: revamp flashblocks execution logic, use sync SR calc first
sieniven Mar 16, 2026
495e3ba
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Mar 16, 2026
f2d3752
feat: revamp worker, split into processor and validator
sieniven Mar 16, 2026
94e1d8a
style(flashblocks): reformat validator match expression
sieniven Mar 16, 2026
56c22f5
refactor(rpc): update eth API to use explicit generic parameters
sieniven Mar 17, 2026
2d6d29c
refactor(rpc): rename modules and types for clarity
sieniven Mar 17, 2026
8329664
chore(rpc): remove unused dependencies and clean up
sieniven Mar 17, 2026
bf9f91a
Fix
sieniven Mar 17, 2026
2f9b01e
Revert "style(flashblocks): reformat validator match expression"
sieniven Mar 17, 2026
634594d
Revert "feat: revamp worker, split into processor and validator"
sieniven Mar 17, 2026
56910db
Revert "feat: revamp flashblocks execution logic, use sync SR calc fi…
sieniven Mar 17, 2026
51c9b26
Revert "refactor(flashblocks): remove execution cache, inline types i…
sieniven Mar 17, 2026
190237c
feat(flashblocks-rpc): Revamp worker, add state root strategies into …
sieniven Mar 19, 2026
de771af
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Mar 19, 2026
7e4c558
fix(flashblocks): resolve merging receipt index on incremental builds…
sieniven Mar 20, 2026
7da6e81
fix(flashblocks): resolve passing overlay data to generating lazyover…
sieniven Mar 20, 2026
7380011
feat(flashblocks): thread payload events sender to RPC service for en…
sieniven Mar 24, 2026
9e1b537
Fmt
sieniven Mar 24, 2026
35f1509
feat: Add flashblocks rpc handles
sieniven Mar 25, 2026
c344206
refactor(flashblocks): flush execution task queue on state cache reset
sieniven Mar 25, 2026
a74a10c
refactor(flashblocks): simplify flush return flow and fix minor issues
sieniven Mar 25, 2026
b0a8862
feat(flashblocks): track payload_id through execution for incremental…
sieniven Mar 25, 2026
89ee622
refactor(flashblocks): remove unused methods and tighten dead code attrs
sieniven Mar 25, 2026
7c0a691
fix: resolve claude issues
sieniven Mar 25, 2026
455fcaa
fix(flashblocks): fix confirm cache insert ordering and capacity check
sieniven Mar 25, 2026
50e4841
chore: add comments
sieniven Mar 25, 2026
40d60cb
fix(flashblocks): guard uninitialized canon height and use OS thread …
sieniven Mar 25, 2026
878d3f5
fix(flashblocks): reset confirm_height to canon height on flush
sieniven Mar 25, 2026
715fcd2
feat(flashblocks): extend overlay provider with canonical in-memory s…
sieniven Mar 25, 2026
862793a
feat: Add sending flashblocks target index
sieniven Mar 26, 2026
e570398
fix(flashblocks): fix pending_stale flush by promoting complete seque…
sieniven Mar 26, 2026
99d8168
fix(flashblocks): apply cumulative gas offset during suffix execution
sieniven Mar 27, 2026
3775a30
fix(flashblocks): use pending sequence hash for incremental state pro…
sieniven Mar 27, 2026
811eb5d
fix(flashblocks): flatten multi-transition reverts for incremental bu…
sieniven Mar 27, 2026
bb05216
feat(flashblocks): add debug state comparison between flashblocks and…
sieniven Mar 27, 2026
fb5a042
refactor(flashblocks): add get_executed_block_by_number for debug lookup
sieniven Mar 27, 2026
df288e2
Refactor
sieniven Mar 27, 2026
a36bca7
refactor(flashblocks): remove trie data comparison from debug output
sieniven Mar 27, 2026
e42e44f
Better logging
sieniven Mar 27, 2026
bd968ab
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Mar 30, 2026
3fa2b4a
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Mar 30, 2026
60a1346
fix(flashblocks): restore hashed_state comparison and send empty trie…
sieniven Mar 30, 2026
5e8dd9c
fix(flashblocks): check incoming canon hash to ensure confirm states …
sieniven Mar 30, 2026
bb8aa3a
chore(flashblocks): improve execution validator logging
sieniven Mar 30, 2026
6042ba7
fix(flashblocks): fix state trie updates
sieniven Mar 30, 2026
34ab520
feat(flashblocks): add debug state comparison for accumulated trie up…
sieniven Mar 30, 2026
09c6b9d
feat(flashblocks): add debug state comparison for accumulated trie up…
sieniven Mar 30, 2026
a814693
chore(flashblocks): remove pre-warm flag
sieniven Mar 30, 2026
8461277
fix(flashblocks): fix debug compare
sieniven Mar 30, 2026
7dd566d
fix: Add committing pending state to confirm on canon block
sieniven Mar 30, 2026
2e48ed6
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Mar 30, 2026
bde5109
chore: better logging
sieniven Mar 30, 2026
027392b
fix: flush if fail to get overlay data
sieniven Mar 30, 2026
9cd1db5
fix: set canon info first before flush
sieniven Mar 30, 2026
26d7d01
refactor(flashblocks): simplify handle_canonical_block pending cleanup
sieniven Mar 30, 2026
6d64551
refactor(flashblocks): co-locate execution task queue with state cache
sieniven Mar 30, 2026
02b8eb7
refactor(flashblocks): rename execution task queue module to task
sieniven Mar 30, 2026
a7fe463
refactor(flashblocks): remove catch_unwind from deferred trie task
sieniven Mar 31, 2026
0a5450d
refactor(flashblocks): convert execution task queue to async
sieniven Mar 31, 2026
6dca7f2
Fix log
sieniven Mar 31, 2026
2b9d4b3
fix(flashblocks): send end of sequence signal to subscribers
sieniven Mar 31, 2026
7b08406
fix(flashblocks): propagate XLayerFlashblockMessage through RPC pipeline
sieniven Mar 31, 2026
e8ca488
fix(flashblocks): skip PayloadEnd messages in test listener
sieniven Mar 31, 2026
7201efe
feat(flashblocks): skip SR computation for intermediate flashblocks
sieniven Mar 31, 2026
0f3c052
refactor(flashblocks): use sequence_end signal for SR and confirm pro…
sieniven Mar 31, 2026
954bc80
refactor(flashblocks): skip overlay factory construction when SR is n…
sieniven Mar 31, 2026
095d6b3
fix(flashblocks): skip duplicate execution for already-confirmed heights
sieniven Mar 31, 2026
b1d080c
test(flashblocks): add unit test and e2e test coverage for revamped R…
sieniven Mar 31, 2026
8f972f8
fix(flashblocks): swap confirm_height ordering and update stale comment
sieniven Mar 31, 2026
2c851e4
fix(flashblocks): share engine ChangesetCache with flashblocks RPC va…
sieniven Apr 1, 2026
6330539
Better log level
sieniven Apr 1, 2026
98ddde1
fix(flashblocks): remove redundant changeset cache eviction from stat…
sieniven Apr 1, 2026
8483fae
Increase raw buffer size, align with confirm cache size
sieniven Apr 1, 2026
c3817cf
fix(broadcast): resolve open_stream deadlock blocking P2P stream setup
sieniven Apr 2, 2026
7841046
feat(flashblocks): unify engine and flashblocks validators via XLayer…
sieniven Apr 3, 2026
8dc4571
refactor(flashblocks): cleanup engine validator and state cache tests
sieniven Apr 3, 2026
5181578
fix(flashblocks): wrap blocking_lock calls in block_in_place and impr…
sieniven Apr 4, 2026
cd51a7f
fix(flashblocks): preserve execution cache across intermediate flashb…
sieniven Apr 6, 2026
50f87cf
fix(flashblocks): fix execution cache corruption from prewarm writes …
sieniven Apr 6, 2026
751ce69
chore: update to latest optimism dev branch
sieniven Apr 7, 2026
e459eb5
refactor(flashblocks): extract engine validator cache helpers into in…
sieniven Apr 7, 2026
4127c9e
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Apr 7, 2026
dc869af
Merge branch 'main' of github.com:okx/xlayer-reth into niven/fix-buil…
sieniven Apr 7, 2026
ceb02e2
feat(builder): bump flashblocks protocol version to 2.0.0
sieniven Apr 7, 2026
48d4e29
test(broadcast): add test for connected-but-no-stream retry path
sieniven Apr 7, 2026
90c0e0c
fix(broadcast): use per-(peer, protocol) dedup and fix type mismatches
sieniven Apr 7, 2026
ec360c8
chore(broadcast): apply final review suggestions
sieniven Apr 7, 2026
bcd8c15
refactor(broadcast): reduce clone in push() and clarify recovery comment
sieniven Apr 7, 2026
97f3139
Merge branch 'niven/fix-builder-p2p' of github.com:okx/xlayer-reth in…
sieniven Apr 7, 2026
f342175
refactor(flashblocks): always spawn WebSocket relay publisher
sieniven Apr 7, 2026
b172c0a
refactor(payload): remove redundant flashblock_rpc parameter
sieniven Apr 7, 2026
a6d8ad8
test(flashblocks): add comprehensive e2e tests for CREATE2, precompil…
sieniven Apr 8, 2026
6e6ec11
feat(rpc): add flashblocks-aware eth_getLogs filter override
sieniven Apr 8, 2026
3a3e01e
Merge branch 'main' of github.com:okx/xlayer-reth into niven/cleanup-…
sieniven Apr 8, 2026
4448b28
test(flashblocks): add e2e tests for eth_getLogs filter override
sieniven Apr 8, 2026
70d1411
docs(flashblocks): add SAFETY comments for blocking_lock() in engine …
sieniven Apr 8, 2026
65f5f33
test(flashblocks): fix e2e test determinism and inter-test isolation
sieniven Apr 8, 2026
368d4bc
fix(flashblocks): simplify low-latency visibility test assertion
sieniven Apr 8, 2026
ac7bda4
test(flashblocks): add missing RPC comparison tests for all overridde…
sieniven Apr 8, 2026
dcde7f0
refactor(flashblocks): split comparison test into individual per-API …
sieniven Apr 8, 2026
127581a
refactor(flashblocks): move comparison_test_setup to operations and r…
sieniven Apr 8, 2026
0d30170
style(flashblocks): reorder e2e tests to match section grouping
sieniven Apr 8, 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
743 changes: 355 additions & 388 deletions Cargo.lock

Large diffs are not rendered by default.

105 changes: 56 additions & 49 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,54 +82,59 @@ xlayer-trace-monitor = { git = "https://github.com/okx/xlayer-toolkit", rev = "d
# These are chain-agnostic crates from the base reth framework.
# https://github.com/paradigmxyz/reth/tree/v1.11.3
# ==============================================================================
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-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
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-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
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-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-payload-builder-primitives = { 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-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-api = { 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", default-features = false }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-static-file-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-tokio-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.11.3", default-features = false }
reth = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-basic-payload-builder = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-chain-state = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-chainspec = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-cli = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-cli-commands = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-cli-util = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-db = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-db-api = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-db-models = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-engine-primitives = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-engine-tree = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-errors = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-ethereum-forks = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-evm = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-exex = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-execution-types = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-ipc = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-metrics = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-network-peers = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-node-api = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-node-builder = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-node-core = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-node-types = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-payload-builder = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-payload-builder-primitives = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-payload-primitives = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-payload-util = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-primitives = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-primitives-traits = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-provider = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-revm = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-rpc = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-api = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-convert = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-engine-api = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-eth-api = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-eth-types = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-rpc-layer = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-builder = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-rpc-server-types = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-static-file-types = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-storage-api = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-tasks = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-testing-utils = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-tokio-util = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-tracing = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-tracing-otlp = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-transaction-pool = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-trie = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-trie-common = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422", default-features = false }
reth-trie-db = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }
reth-trie-parallel = { git = "https://github.com/okx/reth", rev = "997bf9a59ee7330e434eab1706b5cb12af120422" }

# ==============================================================================
# Reth Optimism Dependencies (from local optimism/rust op-reth)
Expand Down Expand Up @@ -167,6 +172,7 @@ alloy-chains = { version = "0.2.30", default-features = false }
alloy-contract = { version = "~1.6" }
alloy-consensus = { version = "~1.6", default-features = false }
alloy-eips = { version = "~1.6", default-features = false }
alloy-eip7928 = { version = "0.3.0", default-features = false }
alloy-evm = { version = "~0.27", default-features = false }
alloy-genesis = { version = "~1.6", default-features = false }
alloy-json-rpc = { version = "~1.6" }
Expand Down Expand Up @@ -223,6 +229,7 @@ jsonrpsee-core = { version = "0.26.0" }

# misc
clap = { version = "4.4.3" }
crossbeam-channel = "0.5.13"
derive_more = { version = "2", default-features = false, features = ["full"] }
dashmap = "6.1"
either = { version = "1.15.0", default-features = false }
Expand All @@ -243,7 +250,7 @@ tracing = { version = "0.1.41" }
shellexpand = "3.1"
url = "2.5"
brotli = "8.0"
ringbuffer = "0.15"
ringbuffer = "=0.16.0"

# p2p
libp2p = { version = "0.56", features = ["identify", "ping", "noise", "tcp", "autonat", "mdns", "tokio", "cbor", "macros", "yamux", "dns"] }
Expand Down
10 changes: 10 additions & 0 deletions bin/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ xlayer-trace-monitor.workspace = true

# reth
reth.workspace = true
reth-chain-state.workspace = true
reth-engine-tree.workspace = true
reth-optimism-node.workspace = true
reth-optimism-primitives.workspace = true
reth-optimism-cli.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
Expand All @@ -46,7 +49,11 @@ reth-optimism-forks.workspace = true
reth-optimism-txpool.workspace = true
reth-transaction-pool.workspace = true
reth-cli-util.workspace = true
reth-provider.workspace = true
reth-rpc-builder.workspace = true
reth-rpc-server-types.workspace = true
reth-tasks = { workspace = true, features = ["rayon"] }
reth-trie-db.workspace = true

# alloy
alloy-primitives.workspace = true
Expand All @@ -57,6 +64,9 @@ op-alloy-network.workspace = true
# revm
revm.workspace = true

# async
tokio.workspace = true

# misc
clap.workspace = true
tracing.workspace = true
Expand Down
64 changes: 46 additions & 18 deletions bin/node/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ pub struct XLayerArgs {
#[command(flatten)]
pub builder: BuilderArgs,

/// Flashblocks RPC configuration
#[command(flatten)]
pub flashblocks_rpc: FlashblocksRpcArgs,

/// Enable legacy rpc routing
#[command(flatten)]
pub legacy: LegacyRpcArgs,
Expand All @@ -132,22 +136,6 @@ pub struct XLayerArgs {
#[command(flatten)]
pub intercept: XLayerInterceptArgs,

/// Enable custom flashblocks subscription
#[arg(
long = "xlayer.flashblocks-subscription",
help = "Enable custom flashblocks subscription (disabled by default)",
default_value = "false"
)]
pub enable_flashblocks_subscription: bool,

/// Set the number of subscribed addresses in flashblocks subscription
#[arg(
long = "xlayer.flashblocks-subscription-max-addresses",
help = "Set the number of subscribed addresses in flashblocks subscription",
default_value = "1000"
)]
pub flashblocks_subscription_max_addresses: usize,

#[arg(
long = "xlayer.sequencer-mode",
help = "Enable sequencer mode for the node (default: false, i.e., RPC mode). This flag can be used by various business logic components to determine node behavior.",
Expand Down Expand Up @@ -247,6 +235,40 @@ impl LegacyRpcArgs {
}
}

#[derive(Debug, Clone, Args, PartialEq, Eq, Default)]
pub struct FlashblocksRpcArgs {
/// Enable flashblocks RPC
#[arg(
long = "xlayer.flashblocks-url",
help = "URL of the flashblocks RPC endpoint (disabled by default)"
)]
pub flashblock_url: Option<Url>,

/// Enable custom flashblocks subscription
#[arg(
long = "xlayer.flashblocks-subscription",
help = "Enable custom flashblocks subscription (disabled by default)",
default_value = "false"
)]
pub enable_flashblocks_subscription: bool,

/// Set the number of subscribed addresses in flashblocks subscription
#[arg(
long = "xlayer.flashblocks-subscription-max-addresses",
help = "Set the number of subscribed addresses in flashblocks subscription",
default_value = "1000"
)]
pub flashblocks_subscription_max_addresses: usize,

/// Enable flashblocks RPC state comparison debug mode
#[arg(
long = "xlayer.flashblocks-debug-state-comparison",
help = "Enable flashblocks RPC state comparison debug mode",
default_value = "false"
)]
pub flashblocks_debug_state_comparison: bool,
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down Expand Up @@ -391,13 +413,19 @@ mod tests {
"--xlayer.flashblocks-subscription",
"--xlayer.flashblocks-subscription-max-addresses",
"2000",
"--xlayer.flashblocks-url",
"ws://localhost:1111",
])
.args;

assert!(args.enable_flashblocks_subscription);
assert!(args.legacy.legacy_rpc_url.is_some());
assert_eq!(args.legacy.legacy_rpc_timeout, Duration::from_secs(45));
assert_eq!(args.flashblocks_subscription_max_addresses, 2000);
assert!(args.flashblocks_rpc.enable_flashblocks_subscription);
assert_eq!(args.flashblocks_rpc.flashblocks_subscription_max_addresses, 2000);
assert_eq!(
args.flashblocks_rpc.flashblock_url,
Some(Url::parse("ws://localhost:1111").unwrap())
);
assert!(args.validate().is_ok());
}

Expand Down
Loading