Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 16, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

fselmo and others added 30 commits January 16, 2026 11:49
fix(tests): Fix Amsterdam filling after rebase
fix(specs): Fix issues with new ruff + mypy rules after rebase

- bal -> block_access_list; re-add custom rlp encoding for block access list
- bytes to uint
- move away from method-style

- Update EIP-7928 implementation: system contracts at index 0, migrate to RLP
  - System contracts (parent hash, beacon root) now use block_access_index 0
  - Transactions use block_access_index 1 to len(transactions)
  - Post-execution changes use block_access_index len(transactions) + 1
  - Migrated from SSZ to RLP encoding as per updated EIP-7928 spec
  - Updated all tests to match new API and structure
  - Replaced tx_index with block_access_index throughout codebase

- add system contract logic
- add markdown docstrings
- update BAL format; address comments
- ssz encoding and bal validation
- six ssz types
- bal tests
- balspecs

fix: do not track setting empty code to a new account (#19)
fix: track implicit SLOAD within SSTORE for OOG cases (#18)
refactor: Put back explicit acct tracking outside 7702 delegation path (#17)
fix non-tracked 7702 authority for invalid delegations (#16)
    * fix non-tracked 7702 authority for invalid delegations
    * fix: lint issues
    * fix: track delegation target when loaded as call target
    * fix: track delegation target when loaded as call target from call
      opcodes
    * chore: fix issues with documentation generation

Fix self-destruct cases with pre-execution balance cache / tracking
    * fix self-destruct implementation
    * fix self-destruct tracking balance
    * fix it in the bal finalization by filtering
    * add balance reset and fix tests
    * simplify pre-balance tracking not using snapshots

fix duplicated code entries for in transaction self destruct
fix self destruct in same transaction bug
fix call/delagate call tracking bug
fix zero-value transfer tracking (#6)
    * fix zero-value transfer tracking
    * fix reverted frame tracking
    * rename variables
    * fix missing addresses bug
    * fix: docs run & move imports to top of file

refactor: move rlp_utils to block_access_lists; bal -> block_access_lists
Some remaining fixes due to large refactor in `forks/osaka`:

- Move BALs from amsterdam -> forks/amsterdam
- rename: build -> build_block_access_list
- fix docc issues

move state change tracker to State

correct system contract addresses

Fixes to communicate with BALs EEST branch:

- fix(bal): Initialize the state tracker before system contract calls

- We were missing system contract calls to beacon roots and history
  contracts. This change initializes the state tracker before system
  contract calls and passes the tracker to these calls if post-Amsterdam.

- fix(docs): Fix issues with toxenvs: lint, doc, json_infra
- fix(t8n): Only initialize the bal_change_tracker for amsterdam
- feat(fork criteria): Index upcoming forks for better ordering / fix issues
- chore(forks): Fix issues from lint after rebase with Osaka latest
- fix(setuptools): Update packages to include amsterdam
- chore(lint): Fix 'tox -e static' issues

- Fix bug in tracker
  Manually cherry-picked from e72991b
  Author: nerolation

- chore(tests): Attempt to resolve issues with CI tests
- chore(lint): fix issues from running ``tox -e static`` locally
- refactor(bal): Send BAL as a list over t8n tool
- fix(amsterdam): Add change tracker to state test in t8n
- chore(lint,tests): Fix tests after moving bal from osaka -> amsterdam
- chore(forks): Move bals from Osaka to Amsterdam
- chore(lint): Fix lint issues

- refactor(bal): Send the full bal object and bal_hash over t8n

  - If we send the full object over JSON, we can model_validate() on ESST.
  - If we send the hash, once we fill the pydantic model, we can get the rlp
    and the hash and validate that our objects match while only really
    validating the parts of the BAL we are interested in for each test.

- chore: point to working eest branch
- chore(bals): Remove unused SSZ utils.py
  The SSZ implementation is no longer needed as we are now using RLP
- refactor(bals): Clean up BAL module types and imports
  - Bytes -> Bytes32 type for storage slots
  - Remove unused imports / fix imports / fix linting
  - Update function signatures to match tracker

- fix(bals-tx-index): Track bal indexes in t8n
  Keep track of BAL index state in t8n
* fix(specs): Fix zero value withdrawals BAL tracking

* docs(specs): rename 'finalize' to 'normalize' in comments

* docs(specs): remove reference to uint128 for balance tracking

---------

Co-authored-by: Toni Wahrstätter <51536394+nerolation@users.noreply.github.com>
Co-authored-by: Toni Wahrstätter <info@toniwahrstaetter.com>
refactor(tests): Prevent skips by splitting tests appropriately

fix(tests): Use valid inputs to precompile tests

chore(tests): linting fixes

feat(tests): EIP-7928 test_bal_storage_write_read_cross_frame

feat(tests): EIP-7928 test_bal_storage_write_read_same_frame

feat(tests): EIP-7928 test_bal_nonexistent_account_access

feat(tests): EIP-7928 test_bal_nonexistent_value_transfer

feat(tests): EIP-7928 test_bal_precompiles

feat(tests): EIP-7928 test_bal_withdrawal_to_coinbase_empty_block

feat(tests): EIP-7928 test_bal_withdrawal_to_coinbase

feat(tests): EIP-7928 test_bal_withdrawal_largest_amount

feat(tests): EIP-7928 test_bal_withdrawal_to_precompiles

fix(tests): expectation for nonexistent account in post

fix(specs,tests): Fix withdrawal tests for BALs issue with idx==0

- `self.txs.successfully_parsed` is a list of transaction indexes, not
  transactions. The "if tx" check here would then check `if 0` which
  parses as a boolean ``False``. This means we would skip counting the tx
  if index=0 was successful.

- Fixes some test expectations where `post_code` was being checked instead
  of ``new_code``.

feat(tests): EIP-7928 test_bal_zero_withdrawal

feat(tests): EIP-7928 test_bal_withdrawal_and_new_contract

feat(tests): EIP-7928 test_bal_withdrawal_and_selfdestruct

feat(tests): EIP-7928 test_bal_multiple_withdrawals_same_address

feat(tests): EIP-7928 withdrawal_and_value_transfer_same_address

feat(tests): EIP-7928 withdrawal_and_state_access_same_account

feat(tests): EIP-7928 test_bal_withdrawal_no_evm_execution

feat(tests): EIP-7928 test_bal_withdrawal_to_nonexistent_account

feat(tests): EIP-7928 test_bal_withdrawal_empty_block

feat(tests): EIP-7928 test_bal_withdrawal_with_transaction

feat(tests): EIP-7928 coinbase
- Perform a similar check to balance changes and other
  tracker methods and keep only the last write.
#1742)

- Validate static checks on the t8n BAL if it exists
- IF the expectation also exists, validate against the expectation

Keep these checks separate as this helps validation now that we fill
for all tests, regardless if they have an expectation or not.
Co-authored-by: spencer spencer.taylor-brown@ethereum.org
 - add commit_transaction_frame() - no net-zero filtering
   for cross-tx changes
 - keep max nonce per transaction when building BAL, remove
   block-level code filtering
 - filter net-zero code changes at tracking time
   (for 7702 txs)
 - use commit_transaction_frame() instead of
   merge_on_success() for tx->block commits
- Calculate all gas that we can without state access and check this
  gas before ever accessing state. This is the most sensible way for
  an implementation to behave and indeed was revealed to be the way
  clients are behaving, which differed from the specs.

- Use fork.gas_costs to calculate gas costs, NOT hard-coded values.

- Create a BAL expectation for the test that yielded discrepancies
  between clients and specs so this doesn't slip through again.
  Document this test in `test_cases.md`.
fselmo and others added 26 commits January 16, 2026 11:49
* feat(test-tests): expand bal call opcode oog boundary tests

Parametrize for:

- value / no value
- COLD / WARM target
- 7702 delegation / no delegation
  - WARM / COLD delegation
- mem expansion / no mem expansion

Include tests both before and after state access to ensure BAL
expectations at these gas boundaries are met.

* refactor(tests): Use `fork.memory_expansion_gas_calculator()`

* feat(test-tests): Refactor; Add second 7702 boundary at success minus 1

* refactor: changes from comments on PR #1882

* fix: update test names and descriptions after refactor
…_index (#1912)

* feat(spec-test): Change storage RLP encoding to U256; tx_index rename

* fix: unit tests exception message
* feat(specs): EIP-7928 move bal from payload

* remove BAL from stf

* fix linter
… BALs (#1922)

* fix(test-tests): Use ZeroPaddedHexNumber instead of HexNumber for consistency

* chore(test-tests): add bal serialization roundtrip & 0-padded hex test (#33)

* refactor(test): Remove unnecessary instantiation of classes to pydantic types

---------

Co-authored-by: danceratopz <danceratopz@gmail.com>
#1897)

* refactor(spec-specs): Refactor specs to be more coherent wrt gas accounting

* feat(test): BAL test for call with value in static context
* feat(tests): add more 7928 test descriptions

* chore(test): remove test duplicated by test_bal_create_selfdestruct_to_self_with_call

---------

Co-authored-by: fselmo <fselmo2@gmail.com>
* ✨ feat(tests): 7928x4788 tests

* 🧹 chore: Rename bal index

* ✨ feat: zero indexed tx

* 🥢 nit: Balance change for query contract

* 🥢 nit: Exclude system address from BAL

* 🥢 nit: Exclude system address from BAL

* 📄 docs: Update test description

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: felipe <fselmo2@gmail.com>
* feat(test-tests): Add EIP-7002 BAL tests

🥢 nit:

✨ feat(tests): parameterised amount in clean sweep

✨ feat(tests): test_bal_7002_request_invalid

✨ feat(tests): test_bal_withdrawal_request_from_contract

✨ feat(tests): test_bal_7002_no_withdrawal_requests

♻️ refactor:

✨ feat(tests): parameter: validator key

✨ feat(tests): simplify

✨ feat(tests): test_bal_7002_partial_sweep

✨ feat(tests): test_bal_7002_clean_sweep

✨ feat: add more coverage

✨ feat:  test_bal_withdrawal_request_from_eoa

* fix(test-tests): lint

* chore: update test docstring to match case description and test behavior

* fix: balance_changes -> balance for post Accounts

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>
* 🧪 test(EIP-7928): test_bal_invalid_extraneous_entries

* 🥢 nit:

* chore: fix lint issues

---------

Co-authored-by: raxhvl <raxhvl@users.noreply.github.com>
Co-authored-by: fselmo <fselmo2@gmail.com>
* refactor(eip7928): refactor net zero filtering in BALs

* refactor(eip7928): handle selfdestruct correctly
feat(test): Expand fork range for selfdestruct to precompile tests

- For successful tests, start at Homestead where precompiles were
  introduced (EIPs 196, 197, 198).

- For OOG tests, start at Tangerine where operation gas costs were
  introduced (EIP 150).
Bonus:

- fix(test): remove unnecessary isolation for enginex
…rison

- This will also help with support for any forks of this repo for L2s
  or other projects if some fork definitions don't have any meaningful
  relationship to SpuriousDragon.
* tests(eip-7928): remove bal from block body

* fix(tests): clean up json_infra and genesis bal in block

* fix(tests): fix add_genesis_block empty bal hash

---------

Co-authored-by: fselmo <fselmo2@gmail.com>
* tests(eip-7928): generalize eip-7934 tests

* ci(eip-7928): run all amsterdam tests on py3 and pypy3

---------

Co-authored-by: fselmo <fselmo2@gmail.com>
@pull pull bot locked and limited conversation to collaborators Jan 16, 2026
@pull pull bot added the ⤵️ pull label Jan 16, 2026
@pull pull bot merged commit 1d11d8d into LuckQuack:forks/amsterdam Jan 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants