execution/state: keep a same-tx create and destroy internal before EIP-8246, and trim the reader-side handling

Open
#26,515 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
blockchain

Research direction

Read the implementation changes in #26095 and #26491, then trace the transaction state and reader-side handling discussed in #24906. Check how SetContractRemoval, calcFees, and eip8246PreservedAccount behave before and under EIP-8246. Done means pre-EIP-8246 transactions publish the removal and burn the destroyed coinbase tip, while reader handling is trimmed only where it no longer serves other cases.

Written by the indexing model from the issue text.

Description

Follow-up to #24906, which #26095 and #26491 do for EIP-8246: a contract that a tx creates and destroys publishes only its net effect, a balance-only account with the kept balance, and no destruct.

Left:

  • Before EIP-8246 (Cancun to Osaka), the tx still publishes the contract removal (SetContractRemoval). Its net effect is nothing at an absent address, and a zero balance and an account delete at a pre-funded one. calcFees must then learn from the tx's own output that the coinbase was destroyed, to burn its tip (an open point of #24906).
  • Under EIP-8246 the readers no longer see a destruct from such a tx, so the reader-side handling of a destroyed account (the special cases that #24906 lists) is not reached for it. Some of it still serves other cases: eip8246PreservedAccount also serves an account that the access list funds or re-creates after a removal. Trim what only served this case.
Dominant language
Go
Stars
3.6k
Forks
1.6k
Avg merge
1d 17h
Merged PRs (30d)
820

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from erigontech/erigon

All issues in erigontech/erigon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.