Skip to content

all: devnet 3#33930

Closed
jwasinger wants to merge 40 commits into
masterfrom
bal-devnet-3
Closed

all: devnet 3#33930
jwasinger wants to merge 40 commits into
masterfrom
bal-devnet-3

Conversation

@jwasinger
Copy link
Copy Markdown
Contributor

@jwasinger jwasinger commented Mar 2, 2026

Contains changes required for devnet 3. The BAL changes are in a branch here and build on several open PRs:

Other EIPs in devnet 3 with open PRs have been squashed into single commits and included on this branch:

EIPs missing from this branch:

  • EIP-8159: eth/71 - Block Access List Exchange (no implementation of it yet)

@jwasinger
Copy link
Copy Markdown
Contributor Author

There's some new failing spec tests introduced in the 7928 changes. I am looking into them.

@jwasinger
Copy link
Copy Markdown
Contributor Author

jwasinger commented Mar 3, 2026

There's currently a lot of tests failing. Likely, some the failures are related to 8037, but I have yet to deep dive into them.

@healthykim
Copy link
Copy Markdown
Contributor

eth70 is ready to be merged :)

@jwasinger
Copy link
Copy Markdown
Contributor Author

jwasinger commented Mar 5, 2026

I rebased this because 7778 was merged. I also merged the eth 70 changes in here.

@jwasinger
Copy link
Copy Markdown
Contributor Author

@MariusVanDerWijden I stripped the outdated 8037 changes from this branch.

Comment thread core/vm/gascosts.go Outdated
Comment thread core/vm/gas_table.go Outdated
@@ -391,97 +421,155 @@ func gasCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize
} else if !evm.StateDB.Exist(address) {
gas += params.CallNewAccountGas
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we are post-amsterdam, we need to exclude this from the regular gas. I am attempting to integrate #33648 in to this branch, which should make this change.

Comment thread core/vm/operations_acl.go
Comment thread core/state_transition.go
prev := st.gasRemaining.RegularGas
// When the calldata floor exceeds actual gas used, any
// remaining state gas must also be consumed
targetRemaining := (st.initialGas.RegularGas + st.initialGas.StateGas) - floorDataGas
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can we get into a situation where targetRemaining > params.MaxTxGasLimit? If the tx gas limit is high, and the gas used low, the state gas might be vastly larger than floorDataGas.

MariusVanDerWijden and others added 14 commits March 31, 2026 16:59
CopyHeader copies all pointer-typed header fields (WithdrawalsHash,
RequestsHash, SlotNumber, etc.) but was missing the deep copy for
BlockAccessListHash added by EIP-7928. This caused the BAL hash
to be silently shared between the original and the copy, leading
to potential data races and incorrect nil-checks on copied headers.
Adds support for returning `blockAccessListHash` in the RPC block header
response.

This change includes `blockAccessListHash` in `RPCMarshalHeader` when
`head.BlockAccessListHash` is not nil, aligning the RPC output with the
Header struct which already contains this field.
* add method on StateReaderTracker to clear the accumulated reads
* don't factor the BAL size into the payload size during construction in the miner
* simplify miner code for constructing payloads-with-BALs via the use of aformentioned StateReaderTracker clear method
* clean up the configuration of the BAL execution mode based on the preset flag specified
## Summary

- The BAL refactoring in 5808d21 removed the line `env.header.GasUsed
= env.gasPool.Used()` from `applyTransaction()`, causing all
geth-proposed blocks to have `GasUsed=0` in the header
- Every other client rejects these blocks during validation, so geth can
never successfully propose on the network
- Restores the single line that was present in upstream master

## Test plan

- [x] Verified line exists in upstream/master at miner/worker.go:409
- [x] Confirmed all 34 geth-proposed blocks on a 4-client devnet had
`GasUsed=0` via `debug_getBadBlocks` on besu
- [ ] Build local image and verify geth proposals are accepted in a
multi-client Kurtosis network
jwasinger and others added 2 commits March 31, 2026 17:59
… made some changes to the --bal.executionmode flag
Rename `balHash` to `blockAccessListHash` in json encoding of block header.  Fix miner panic when attempting to create pre-amsterdam blocks.
@jwasinger
Copy link
Copy Markdown
Contributor Author

@MariusVanDerWijden I pushed a fix to an issue found by @qu0b . PTAL at 566992d and if it looks okay to you, we can add it to the 8037 branch.

@jwasinger
Copy link
Copy Markdown
Contributor Author

Oops. Those fixes broke some tests. Reverted them until I can get them working

jwasinger and others added 15 commits April 2, 2026 14:20
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
…with access lists

Co-authored-by: spencer <spencer.tb@ethereum.org>
To check whether a transaction can be applied, we validate that
`blockGasLimit > txGasLimit + (cumulativeRegularGasUsed +
cumulativeStateGasUsed)`. However, the check should only be applied to
the bottleneck resource, i.e. `blockGasLimit >
max(txRegularGasUsed+cumulativeRegularGasUsed, txStateGasUsed+
cumulativeStateGasUsed)`.

The changes here break multiple tests.  I am trying to determine why.

---------

Co-authored-by: qu0b <stefan@starflinger.eu>
The BAL reader tracker captures access list reads at the reader level.
When statedb has an account cached the BAL tracker is not informed of
the access. This is ok during the lifetime of a transaction because you
only need to record the access the first time. It is also ok during the
lifetime of a block because BAL reads are block-level (same as statedb
caches).

Where I think the issue can rise is in the miner. Namely when building a
block, if the miner picks up a tx which fails, it drops it and picks up
another tx to include. There might be some edge case here where the
failed tx which is not included poisons the cache and a future block
which is included omits an account because it wasn't aware of the
access.
Fixes the collision bugs and create gas ordering
Comment thread core/state/journal.go

func (ch codeChange) revert(s *StateDB) {
s.getStateObject(ch.account).setCode(crypto.Keccak256Hash(ch.prevCode), ch.prevCode)
s.getStateObject(ch.account).SetCode(crypto.Keccak256Hash(ch.prevCode), ch.prevCode)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Appears to be a bug. SetCode will add a code change to the journal, which is not what we want here.

fselmo and others added 7 commits April 14, 2026 19:01
Wire up slotnum for `testing_buildBlockV1` for `bal-devnet-3` branch

We are experimenting testing block building through hive via EELS (PR
[here](ethereum/execution-specs#2679)). This is
the only change needed to test against `bal-devnet-3` - missing slotnum.
…s, surface more metrics including prefetcher time (#34892)

Adapts some of the changes from
#34861 . Some other metrics
which are recorded manually during execution in that PR, but can be
deduced from the BAL are TBD.

I've added two bal feature flags:

* `--bal.prefetchworkers <uint>`: this tunes the number of concurrent
go-routines that will be used to perform state fetching tasks by the BAL
prefetcher. Default is `runtime.NumCPUs`, the current behavior in
`bal-devnet-3`.
* `--bal.blockingprefetch`: If set, state prefetching will block the
execution of transactions and state root update.

---------

Co-authored-by: CPerezz <cperezz19@pm.me>
…plumbing that gets the values to the blockchain config when instantiating for main command
A first attempt to get the entire slow_blocks to be
BAL&parallel-exec-aware.

- Sequential-path output is unchanged; the `bal` JSON field is
`omitempty`.
- All new types are pure-data snapshots (value receivers, no shared
mutation), so they're safe to copy across goroutine boundaries in the
parallel pipeline.

---------

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
@jwasinger jwasinger closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.