-
Notifications
You must be signed in to change notification settings - Fork 87
FIP Implementation: Add support for EIP-7702 (Set Code for EOAs) #1705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
snissn
wants to merge
67
commits into
filecoin-project:master
Choose a base branch
from
snissn:eip7702
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 38 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
a0657b4
EIP-7702 Phase-2: Delegator actor, CALL→EOA delegation, test harness …
snissn 699be20
update
snissn 7b73aeb
evm: fix GH action warnings/errors: remove unused NetworkVersion impo…
snissn 188f355
EIP-7702 tests (builtin-actors):
snissn fa6a50a
builtin-actors: add InvokeAsEoa nested delegation behavioral test (cu…
snissn 4eb694b
builtin-actors: mark nested InvokeAsEoa delegation test as ignored fo…
snissn 8e61f8d
builtin-actors: flesh out nested InvokeAsEoa delegation test expectat…
snissn 4319b86
builtin-actors: add CALL→EOA edge case where delegate returns no outp…
snissn 73eb2c3
builtin-actors: add nested CALL→EOA test (ignored for now) and contin…
snissn 5238515
builtin-actors: relax nested InvokeAsEoa test expectations; keep igno…
snissn 4542370
builtin-actors: align nested InvokeAsEoa test with expected ordering …
snissn 4875c6c
EIP-7702: EVM-only + atomic-only; remove Delegator crate; internalize…
snissn 0a87399
EIP-7702: InvokeAsEoa persistent storage; intrinsic gas charging; dup…
snissn c1a5f38
EIP-7702: depth limit ApplyAndCall test; pre-existence + tuple cap te…
snissn 8585f84
EIP-7702 tests: fix tuple cap expectations and recovery, add event + …
snissn 61ae6a6
fix lint errors
snissn c229ee8
fmt
snissn d09f0d2
runtime: refactor expect_send_any_params to reduce args (introduce Se…
snissn 821a4fd
rust fmt
snissn f1a1404
EIP-7702: restore precompile tests; add nonce initialization test; pe…
snissn 87243d8
fmt: cargo fmt --all
snissn 8f547b3
tests(evm): fix clippy unused imports in precompile.rs
snissn 1d4230c
tests(evm): add failing test for EIP-7702 atomicity on InvokeAsEoa re…
snissn 9d4be32
fix(evm): EIP-7702 atomicity — don’t abort ApplyAndCall on InvokeAsEo…
snissn 99381d4
EIP-7702: ensure ApplyAndCall atomicity on delegated EOA path and adj…
snissn 89cab4a
EIP-7702: accept ≤32-byte r/s (left-pad); clarify validation errors; …
snissn 0d9ac1f
EIP-7702 tests: storage persistence across delegate changes; CBOR mal…
snissn 348b9e4
Tests: add precise error message asserts and r-too-long case in inval…
snissn 5d5f1c7
evm/tests: restore precompile tests removed in diff vs master
snissn 4603245
evm: centralize Delegated(address) topic constant and refactor event …
snissn c186426
tests(evm): add eoa_call_pointer_semantics.rs (EXTCODESIZE/COPY point…
snissn 544b94f
tests(evm): extend pointer semantics with EXTCODEHASH and NV sanity; …
snissn 2a59c8f
EVM: make return-data decode strict (no fallback) and handle Bytecode…
snissn 609cd88
eip7702: remove ApplyAndCall intrinsic gas charges and tests; drop rt…
snissn 81ff133
fmt
snissn 2436a09
EIP-7702: remove NV gating (bundle-based activation). Always consult …
snissn 607312a
Remove unused NV_EIP_7702 constant (bundle-based activation; no runti…
snissn fd3a4a4
fmt: cargo fmt --all
snissn 169c86f
Update actors/evm/src/interpreter/system.rs
snissn bf6e99b
Update actors/evm/src/lib.rs
snissn b8c8ced
Update actors/evm/src/lib.rs
snissn 90da165
Update actors/evm/src/lib.rs
snissn 772b804
Update actors/evm/src/interpreter/instructions/call.rs
snissn 8e2b5cc
Delete runtime/src/features.rs
snissn b6303a1
EIP-7702: atomicity hardening + tests
snissn ce32656
Merge branch 'master' of github.com:filecoin-project/builtin-actors i…
snissn ba82411
cargo fmt --all
snissn ffb7c97
evm/tests: add global mapping proof test for EIP-7702; assert EXTCODE…
snissn b1caa37
EVM: minimalize CALL/STATICCALL to EOAs (no internal delegation); rel…
snissn 97645fd
EVM: add InvokeAsEoaWithRoot trampoline for VM intercept; keep Invoke…
snissn 59c7462
EthAccount: tidy clippy warnings in tests; align receiver f4 handling…
snissn b582b60
runtime: add get_eth_delegate_to to Runtime + FVM impl + test hooks; …
snissn 1bfaf7b
eip7702: WIP minimalization plan – drop legacy EVM delegation entrypo…
snissn aac100a
ethaccount: add tuple cap boundary and duplicates tests; adjust value…
snissn 9c1a111
evm: remove legacy InvokeAsEoa/ApplyAndCall paths (stub to illegal_st…
snissn 25bf1f2
evm: prune legacy 7702 per-authority maps (delegations/nonces/storage…
snissn e453006
evm: decode robustness in CALLDATASIZE (avoid unwrap); no silent fall…
snissn 123621e
evm/tests: drop legacy ApplyAndCall/InvokeAsEoa suites; rely on EthAc…
snissn cc1043d
evm: minimalize EOA CALL path; METHOD_SEND only; remove legacy delega…
snissn f335b4c
evm: decode robustness — no silent fallbacks; return illegal_state
snissn b3516a7
docs(agents): record 7702 minimalization status and quick validation …
snissn 56bbbbe
ci: replace local ref-fvm path patches with git patches (fix cargo-de…
snissn 75c392b
eip7702: remove stale EVM ApplyAndCall stubs + unused helper; clarify…
snissn 810c755
cargo fmt
snissn 2c13e56
docs(agents): align notes with EthAccount+VM intercept; fix design no…
snissn 2a7fc08
feat(eip7702): enhance EthAccount ApplyAndCall and tests
snissn 31b8da0
ethaccount: assert mapping in outer-call test
snissn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Agents Notes | ||
|
|
||
| This repository inherits its agent workflow, conventions, and project guidance from the Lotus workstream. | ||
|
|
||
| - For the canonical instructions, see `../lotus/AGENTS.md`. | ||
| - Treat that document as the source of truth for coding style, review etiquette, CI expectations, and how agents should coordinate across repos in this workstream. | ||
|
|
||
| Repo‑local quick notes: | ||
| - Tests: `make test` (uses cargo-nextest across the workspace). | ||
| - Lint: `make check` (clippy; warnings are errors). | ||
| - Formatting: `make rustfmt`. | ||
| - EIP‑7702 is always active in this bundle (no runtime NV gating). | ||
| - EIP‑7702 design notes live at `../eip7702.md`. | ||
|
|
||
| If there is any conflict between this file and `../lotus/AGENTS.md`, prefer the Lotus file. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| use crate::address::EthAddress; | ||
|
|
||
| /// EIP-7702 bytecode magic prefix and version. | ||
| pub const EIP7702_MAGIC: [u8; 2] = [0xEF, 0x01]; | ||
| pub const EIP7702_VERSION: u8 = 0x00; | ||
|
|
||
| /// Returns true if code is an EIP-7702 delegation indicator: 0xEF 0x01 0x00 || 20-byte address. | ||
| pub fn is_eip7702_code(code: &[u8]) -> bool { | ||
| code.len() == 23 && code[0..2] == EIP7702_MAGIC && code[2] == EIP7702_VERSION | ||
| } | ||
|
|
||
| /// Attempts to parse an EIP-7702 delegation indicator and return the embedded 20-byte address. | ||
| pub fn eip7702_delegate_address(code: &[u8]) -> Option<EthAddress> { | ||
| if !is_eip7702_code(code) { | ||
| return None; | ||
| } | ||
| let mut addr = [0u8; 20]; | ||
| addr.copy_from_slice(&code[3..23]); | ||
| Some(EthAddress(addr)) | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { | ||
| use super::*; | ||
| #[test] | ||
| fn detect_and_parse() { | ||
| let mut raw = vec![0u8; 23]; | ||
| raw[0] = 0xEF; | ||
| raw[1] = 0x01; | ||
| raw[2] = 0x00; | ||
| for i in 0..20 { | ||
| raw[3 + i] = 0xAB; | ||
| } | ||
| assert!(is_eip7702_code(&raw)); | ||
| let d = eip7702_delegate_address(&raw).unwrap(); | ||
| assert_eq!(d, EthAddress([0xAB; 20])); | ||
| assert!(!is_eip7702_code(&raw[..10])); | ||
| let mut bad = raw.clone(); | ||
| bad[1] = 0x00; | ||
| assert!(!is_eip7702_code(&bad)); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| pub mod address; | ||
| pub mod eip7702; | ||
| pub mod uints; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.