Skip to content

Frame Transactions (EIP-8141) - #3047

Open
SamWilsn wants to merge 12 commits into
ethereum:eips/amsterdam/eip-8141from
SamWilsn:eips/amsterdam/eip-8141
Open

Frame Transactions (EIP-8141)#3047
SamWilsn wants to merge 12 commits into
ethereum:eips/amsterdam/eip-8141from
SamWilsn:eips/amsterdam/eip-8141

Conversation

@SamWilsn

Copy link
Copy Markdown
Contributor

🗒️ Description

My work so far on frame transactions (EIP-8141)

Cute Animal Picture

IMG_20260624_154128_797

@SamWilsn SamWilsn mentioned this pull request Jul 7, 2026
6 tasks
@gurukamath gurukamath self-assigned this Jul 21, 2026
@gurukamath
gurukamath force-pushed the eips/amsterdam/eip-8141 branch from 362b750 to 1402c53 Compare July 21, 2026 13:02
@gurukamath
gurukamath force-pushed the eips/amsterdam/eip-8141 branch from 1402c53 to 2f8aa48 Compare July 31, 2026 08:11
@gurukamath
gurukamath changed the base branch from forks/amsterdam to eips/amsterdam/eip-8141 July 31, 2026 08:12
@gurukamath

Copy link
Copy Markdown
Contributor

Note to reviewers: The first commit of this PR ccd0c593af5 is a spec refactor that should be upstreamed independent of EIP-8141. This is exactly what #3192 does. The actual Frame Transaction implementation is in the second commit onwards.

I have built the frame transaction implementation on top of the re-factor since the changes introduced in the refactor make it much nicer to implement frames. Once PR#3192 gets approved and merged, I will rebase this PR branch.

@gurukamath
gurukamath marked this pull request as ready for review July 31, 2026 08:18
@gurukamath
gurukamath requested a review from lightclient July 31, 2026 08:18
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.13%. Comparing base (9863a6d) to head (25de0d2).

Additional details and impacted files
@@                     Coverage Diff                     @@
##           eips/amsterdam/eip-8141    #3047      +/-   ##
===========================================================
- Coverage                    93.49%   93.13%   -0.37%     
===========================================================
  Files                          624      576      -48     
  Lines                        37056    33246    -3810     
  Branches                      3394     2975     -419     
===========================================================
- Hits                         34647    30962    -3685     
+ Misses                        1653     1586      -67     
+ Partials                       756      698      -58     
Flag Coverage Δ
unittests 93.13% <ø> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gurukamath
gurukamath force-pushed the eips/amsterdam/eip-8141 branch from 2f8aa48 to aef48b6 Compare July 31, 2026 11:13
@gurukamath gurukamath removed their assignment Jul 31, 2026
@gurukamath
gurukamath requested a review from marioevz July 31, 2026 19:34
SamWilsn and others added 5 commits August 4, 2026 15:58
Implement the type-6 frame transaction flow on the amsterdam fork,
separated from the regular flow from admission onwards:

- static validation, signature verification, intrinsic gas, and the
  two gas anchors (standard_gas_limit, max_gas) in
  transactions/frame_transaction.py
- consensus receipt types (FrameReceipt, FrameTransactionReceipt)
  and the 0x06 receipt codec arms in blocks.py
- TransactionEnvironment split into top_level_context/frame_context
  in vm/__init__.py
- admission through a dedicated check_frame_transaction in
  frame_processing.py; process_transaction dispatches frame
  transactions after the chain-id check
- frames execute as independent top-level calls in
  vm/frame_interpreter.py: per-frame gas meters, atomic batches,
  cross-frame warm journal, default verify code, approval rollback
- the six frame opcodes (TXPARAM, FRAMEDATALOAD, FRAMEDATACOPY,
  FRAMEPARAM, SIGPARAM, APPROVE) in vm/instructions/frame.py
- settlement anchored on the standard gas limit with the calldata
  floor binding through max_gas; the payer refund is
  max_cost - charged_fee; the frame transaction receipt reports
  status, gas, and logs per frame

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
@gurukamath
gurukamath force-pushed the eips/amsterdam/eip-8141 branch from aef48b6 to fb05113 Compare August 4, 2026 14:18
Co-authored-by: lightclient <lightclient@protonmail.com>
@gurukamath
gurukamath force-pushed the eips/amsterdam/eip-8141 branch from fb05113 to 7f4ee85 Compare August 4, 2026 15:34
VERSIONED_HASH_VERSION_KZG,
)

if U256(tx.nonce) >= U256(U64.MAX_VALUE):

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.

Unnecessary cast.

EIP-8141 aligned the SIGPARAM (0xb4) copy operation's stack order with
CALLDATACOPY (ethereum/EIPs 4a9ad32c): after signatureIndex and param the
operands are memOffset, dataOffset, length. The implementation still popped
them in the old order (length, dataOffset, memOffset) — the reverse of its
own FRAMEDATACOPY. Swap to match the live spec.
Frame transaction processing initializes the shared, once-per-tx warm
address set with the sender so its first EVM access is charged warm
(100) rather than cold (2600). The sender is loaded unconditionally for
the nonce check and, like a regular transaction's origin, must start
warm per EIP-2929 and EIP-3651.
@Marchhill

Copy link
Copy Markdown
Contributor

Hey I made a couple of fixes, opened PRs:
SamWilsn#9
SamWilsn#10

fix: correct SIGPARAM copy operand order
@gurukamath
gurukamath force-pushed the eips/amsterdam/eip-8141 branch from cb6d6cf to 94b7234 Compare August 6, 2026 12:25
fix: warm the sender for frame transactions
@gurukamath

Copy link
Copy Markdown
Contributor

Hey I made a couple of fixes, opened PRs: SamWilsn#9 SamWilsn#10

Thanks @Marchhill
Merged!

Comment thread src/ethereum/forks/amsterdam/transactions/frame_transaction.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants