Skip to content

Commit 01ea068

Browse files
committed
feat(bal): enable opt-in Parlia parallel execution
1 parent 3ab6b62 commit 01ea068

12 files changed

Lines changed: 503 additions & 167 deletions

File tree

‎Cargo.lock‎

Lines changed: 104 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,60 @@ members = [".", "testing/bsc-ef-tests"]
33

44
[workspace.dependencies]
55
# Keep the node and EF tests on the cross-region Reth integration.
6-
reth = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
7-
reth-basic-payload-builder = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
8-
reth-chain-state = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
9-
reth-chainspec = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
10-
reth-cli = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
11-
reth-cli-commands = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
12-
reth-cli-util = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
6+
reth = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
7+
reth-basic-payload-builder = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
8+
reth-chain-state = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
9+
reth-chainspec = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
10+
reth-cli = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
11+
reth-cli-commands = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
12+
reth-cli-util = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
1313
reth-codecs = { version = "0.8.2" }
14-
reth-consensus = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
15-
reth-db = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
16-
reth-db-api = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
17-
reth-db-common = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
18-
reth-discv4 = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
19-
reth-engine-local = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
20-
reth-engine-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
21-
reth-engine-tree = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
22-
reth-errors = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
23-
reth-eth-wire = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
24-
reth-eth-wire-types = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
25-
reth-ethereum-consensus = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
26-
reth-ethereum-engine-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
27-
reth-ethereum-forks = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
28-
reth-ethereum-payload-builder = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
29-
reth-ethereum-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
30-
reth-evm = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
31-
reth-evm-ethereum = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
32-
reth-execution-types = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
33-
reth-ipc = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
34-
reth-metrics = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
35-
reth-network = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
36-
reth-network-api = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
37-
reth-network-p2p = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
38-
reth-network-peers = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
39-
reth-node-builder = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
40-
reth-node-core = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
41-
reth-node-ethereum = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
42-
reth-payload-builder-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
43-
reth-payload-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
14+
reth-consensus = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
15+
reth-db = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
16+
reth-db-api = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
17+
reth-db-common = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
18+
reth-discv4 = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
19+
reth-engine-local = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
20+
reth-engine-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
21+
reth-engine-tree = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
22+
reth-errors = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
23+
reth-eth-wire = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
24+
reth-eth-wire-types = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
25+
reth-ethereum-consensus = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
26+
reth-ethereum-engine-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
27+
reth-ethereum-forks = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
28+
reth-ethereum-payload-builder = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
29+
reth-ethereum-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
30+
reth-evm = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
31+
reth-evm-ethereum = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
32+
reth-execution-types = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
33+
reth-ipc = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
34+
reth-metrics = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
35+
reth-network = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
36+
reth-network-api = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
37+
reth-network-p2p = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
38+
reth-network-peers = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
39+
reth-node-builder = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
40+
reth-node-core = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
41+
reth-node-ethereum = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
42+
reth-payload-builder-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
43+
reth-payload-primitives = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
4444
reth-primitives-traits = { version = "0.8.2", default-features = false }
45-
reth-provider = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
46-
reth-revm = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
47-
reth-rpc = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
48-
reth-rpc-convert = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
49-
reth-rpc-engine-api = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
50-
reth-rpc-eth-api = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
51-
reth-rpc-eth-types = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
52-
reth-rpc-server-types = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
53-
reth-storage-overlay = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
54-
reth-tasks = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
55-
reth-tracing = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
56-
reth-transaction-pool = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
57-
reth-trie = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
58-
reth-trie-common = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
59-
reth-trie-db = { git = "https://github.com/bnb-chain/reth.git", rev = "5e971cf5060a018824342755fd23ef2ccea89588" }
45+
reth-provider = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
46+
reth-revm = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
47+
reth-rpc = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
48+
reth-rpc-convert = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
49+
reth-rpc-engine-api = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
50+
reth-rpc-eth-api = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
51+
reth-rpc-eth-types = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
52+
reth-rpc-server-types = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
53+
reth-storage-overlay = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
54+
reth-tasks = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
55+
reth-tracing = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
56+
reth-transaction-pool = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
57+
reth-trie = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
58+
reth-trie-common = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
59+
reth-trie-db = { git = "https://github.com/bnb-chain/reth.git", rev = "0cc955dfafe965825c972c250296b5e563eb93e9" }
6060

6161
[package]
6262
name = "reth_bsc"

‎docs/amsterdam-bal-validation.md‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Amsterdam BAL local validation — 2026-11-30
2+
3+
Implementation branch: `feat/bsc-bal-parallel-execution`, based on reth-bsc
4+
`57fc627f3eed844b9b148942343d80b0840e755c`.
5+
The companion Reth base is `5e971cf5060a018824342755fd23ef2ccea89588`; the tested
6+
engine changes are published at `0cc955dfafe965825c972c250296b5e563eb93e9` in
7+
[bnb-chain/reth #263](https://github.com/bnb-chain/reth/pull/263).
8+
The Go-BSC reference is `e5e6ff018771b6aada1744ae40a12274d812a074` plus the
9+
Amsterdam startup-override patch included in `testing/bal/go-reference.patch`.
10+
See [the implementation guide](amsterdam-bal.md) for rebuilding both changes.
11+
12+
## Review-stack revision
13+
14+
The implementation was split into five buildable layers on 2026-12-03. Before
15+
rebasing, the combined tree was byte-for-byte identical to PR #658 at
16+
`7d1cc7435a184baec5d4e6264958d3b4b63f582a`. The stack is now based on develop
17+
`18807fa7ad122f494effd68dab741ddadc0f0b8f`, preserving its newer early legacy-bid
18+
budget checks and live miner gas target. The cross-client evidence below belongs
19+
to the original November 30 source snapshot; it has not been rerun on the rebased
20+
stack. Fresh validation of the rebased stack: all five layers passed
21+
`cargo +1.99.0 check --locked --workspace --all-targets`; the combined BSC library
22+
suite passed 1,183 tests with zero failures and one existing ignored test, run
23+
serially. Splitting the review does not resolve the retained release-validation gaps.
24+
25+
## Final run
26+
27+
Evidence directory on the development host:
28+
`/Users/chee/Documents/repo/bal-parallel-cluster-r4-2026-11-30/results`.
29+
The adjacent scripts, genesis and suite configuration reproduce the workloads
30+
with the existing local validator fixtures. Wallet files are not part of this
31+
branch or report.
32+
33+
The final Reth executable SHA-256 is
34+
`64cf8ac9004f6100de9ed1dcaebd758eec4bc2256c2aeb531271d5f1c8130bcf`.
35+
Build profile: development, Rust 1.99.0, debug info disabled; this is not a
36+
performance benchmark. Exact source patches and the new gas module are retained
37+
under `results/final-source/`.
38+
39+
Chain 714 has three validators: Reth with BAL parallel execution enabled, Reth
40+
with `--engine.disable-bal-parallel-execution`, and Go-BSC. A fourth Reth node
41+
observes/imports with parallel execution enabled. RPC endpoints are localhost
42+
44460–44463; each Reth node uses a 64 MB cross-block cache. Amsterdam activates at
43+
Unix timestamp `1796033098`.
44+
45+
| Check | Result | Evidence |
46+
| --- | --- | --- |
47+
| BSC library suite | 1,171 passed, 0 failed, 1 existing ignored | `bsc-unit-tests.log` |
48+
| Upstream BAL engine tests | 26 passed | `engine-bal-tests.log` |
49+
| BSC library Clippy | Passed; no BSC warnings, existing dependency warnings remain | `clippy.log` |
50+
| External EF harness compilation | Passed; EF execution fixtures not run | `ef-check.log` |
51+
| BNB, ERC20, CAS20, Uniswap V2 | 36 checks, 67 transactions passed | `functions-report.json`, `functions.log` |
52+
| BEP-675 admission and invalid-BAL revocation | 15/15 passed | `bep675-tier1.log` |
53+
| Valid bids, competing bids, underpriced-bid revocation | 3/3 passed; valid bids became canonical with builder tags | `bep675-tier2.log` |
54+
| Dependent transfer burst | 24 transactions passed; receipts and final balances match all clients | `burst-report.json` |
55+
| Actual parallel execution | Multiple worker records tied to burst-block parents; disabled node has none | `parallel-worker-evidence.json` |
56+
| Peer corruption and missing attachment | Corrupt attachment rejected; same block imports without attachment | `negative-peer-report.json` |
57+
| Controlled restart | All four nodes recovered and advanced on the existing databases | `restart-recovery-report.json` |
58+
| Final canonical comparison | 677 consecutive blocks (0–676), 91 workload receipts and 3 canonical builder blocks agreed across all four nodes | `consensus-report.json`, `verified-blocks.json` |
59+
60+
The functional suite checks exact BNB debit/credit and fees, ERC20 allowance and
61+
rollback, CAS20 asset/stablecoin creation and roles, and real Uniswap factory,
62+
router and pairs including CAS20 pools. It checks quotes, balances, reserves,
63+
liquidity removal and deliberate reverting transactions. Bid tests restore local
64+
builder permission afterward.
65+
66+
## Failures found and corrected
67+
68+
- Contract deployment exposed beneficiary fee credit including unused Amsterdam
69+
state reservoir. Corrected fee accounting; added a regression covering a
70+
35-million-gas declaration; repeated the full functional workload.
71+
- CAS20 needed Amsterdam execution/state gas accounting instead of Jenner-only
72+
prices. Native creation, storage allocation, refund and rollback checks now
73+
pass alongside cross-client token/swap execution.
74+
- A missing BAL account during payment-lane classification was incorrectly
75+
classified as a local database fault. It now invalidates the builder's block
76+
and triggers revocation, while genuine database failures remain local faults.
77+
The live admission suite reproduced and then verified this fix.
78+
79+
## Retained limitations and unsuccessful attempts
80+
81+
The earlier `bal-parallel-cluster-r3-2026-11-30` run agreed on 1,692 consecutive
82+
canonical blocks and 91 workload receipts before later restart experiments.
83+
It subsequently stopped at height 2261: both Reth and Go-BSC failed the next
84+
system-contract call to `0x1000` with an invalid opcode after the 10:00 UTC
85+
boundary, with the test's breathe interval set to 1,200 seconds. The root cause
86+
is not established. This is a shared failure, not demonstrated client divergence;
87+
long-duration/breathe-boundary validation remains incomplete. See its
88+
`results/shared-boundary-failure.json` and node logs. Read-only diagnostic calls
89+
with empty elected-validator arguments on the fresh run succeeded and do not
90+
explain that failure.
91+
92+
The optional blob extension in R3 included the valid blob transaction but failed
93+
sidecar RPC visibility (`[]`); malformed KZG proof rejection passed. This is the
94+
separate blob RPC issue covered by draft PR
95+
[reth-bsc #655](https://github.com/bnb-chain/reth-bsc/pull/655), whose fix is not
96+
included here. Do not report the blob extension as fully passed.
97+
98+
Harness failures are retained separately: an observer without a signer could
99+
not build candidate bids; an initial test peer omitted the BSC upgrade handshake;
100+
a cache flag mistakenly supplied bytes where MB were required and caused an
101+
oversized allocation on restart; and a rerun attempted to deactivate an already
102+
inactive CAS20 feature. These were corrected in the final harness without
103+
changing consensus rules or disabling parallel execution.
104+
105+
There is no performance claim, sustained malformed-peer/DoS campaign, or mainnet
106+
activation. High-gas legacy builder payment reservation is covered by unit
107+
accounting tests; the live builder tests exercise BEP-675 zero-simulation bids.
108+
Before merging, integrate the pinned companion engine PR and resolve the
109+
remaining release-validation issues above.

0 commit comments

Comments
 (0)