execution/state: a Balance or Nonce read at a withdrawn destruct validates on its own
Maintainers usually reply within 1 day
@mh0lt is already working on this.
Since Nov 17, 2026.
Assessment
This issue has not been assessed yet.
Description
In a block with an access list, a tx can read the balance or nonce of an account while a destruct of a lower tx holds. The read is recorded at the version of the destruct. When the field has no cell at that tx, validateReadImpl checks the read against AddressPath, and the existence marker that the access list seeds has the same version. So the read stays valid after the destruct is withdrawn, although a re-run reads the old value.
This does not change a result today: every path that records such a read also records a SelfDestructPath read at the same version, and that read fails validation, so the full read set is rejected. Only the Balance or Nonce read alone is not checked against the destruct. #26380 added this check for the AddressPath read; it needs the read's value, which validateReadImpl does not get.
Repro
seededRemovalOfPrefundedAccount in execution/state/versionmap_seed_removal_test.go: tx 0 creates and destroys the prefunded x (balance 5), and the access list seeds the removal.
func TestBalanceReadAtAWithdrawnDestruct(t *testing.T) {
x, reader, vm := seededRemovalOfPrefundedAccount(t)
ibs := NewWithVersionMap(reader, vm)
defer ibs.Close()
ibs.SetTxContext(1, 1)
balance, err := ibs.GetBalance(x)
require.NoError(t, err)
require.True(t, balance.IsZero())
reads := ibs.VersionedReads()
balanceOnly := ReadSet{balance: map[accounts.Address]VersionedRead[uint256.Int]{x: reads.balance[x]}}
for _, path := range []AccountPath{SelfDestructPath, BalancePath} {
vm.Delete(x, path, accounts.NilKey, 0, false) // the removal of tx 0 is withdrawn
}
require.Equal(t, VersionInvalid, vm.ValidateReadSet(1, reads, validateEqualVersion, false, ""))
require.Equal(t, VersionInvalid, vm.ValidateReadSet(1, balanceOnly, validateEqualVersion, false, "")) // fails: VersionValid
}
A re-run of tx 1 reads balance 5. GetNonce(x) gives the same result for the Nonce read.
From @yperbasis's review of #26380.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.6k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 820
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from erigontech/erigon
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
flaky test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
erigontech/erigon#26230 ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: pending nonce counts past gaps in the poolPossibly taken @yperbasis claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erigontech/erigon#26014 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
tracing: expose custom error selector and raw payload in callTracer revertReasonPossibly taken @lupin012 claimed this 9 days ago. OpenRPC
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#25928 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: remove redundant blob/commitment length checkPossibly taken @yperbasis claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
erigontech/erigon#25432 ·
Maintainers usually reply within 1 day
All issues in erigontech/erigon
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day