Skip to content

Conversation

@trantienduchn
Copy link
Contributor

@trantienduchn trantienduchn commented Mar 18, 2025

Member PRs:

@trantienduchn trantienduchn changed the title Implement EIP-7702 [WIP] Implement EIP-7702 Mar 18, 2025
@trantienduchn trantienduchn marked this pull request as draft March 18, 2025 03:34
@trantienduchn trantienduchn changed the title [WIP] Implement EIP-7702 Implement EIP-7702 Apr 14, 2025
@trantienduchn trantienduchn marked this pull request as ready for review April 14, 2025 04:30
Copy link

@hao-phamSM hao-phamSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trantienduchn trantienduchn changed the title Implement EIP-7702 all: implement EIP-7702 May 21, 2025
@trantienduchn trantienduchn changed the base branch from master to main May 21, 2025 04:57
@trantienduchn trantienduchn changed the base branch from main to master May 21, 2025 05:06
@trantienduchn
Copy link
Contributor Author

rebased PR: #87

trantienduchn and others added 19 commits May 21, 2025 13:48
content:
- update core/vm
- update EXT... gas estimation

from:
- ethereum/go-ethereum#30078
- ethereum/go-ethereum#31089

* core/vm: update 7702 gas calculation on impacted OpCode

CALL, CALLCODE, STATICCALL, DELEGATECALL. EXTCODE... opcodes are aligned with the EIP update ethereum/EIPs#9248

* core/vm: EVM resolve code with delegations of 7702

* core/vm: add gas cost test

* fixup! core/vm: add gas cost test

* fixup! core/vm: add gas cost test
* core: state_transition with AuthList

* core: statedb SetCode() returning prev code

* fixup! core: state_transition with AuthList

* fixup! core: statedb SetCode() returning prev code
* tests: adapt TestState to Prague hardfork

* internal, graphql: update AuthList in the Tx interface

* fixup! tests: adapt TestState to Prague hardfork

---------

Co-authored-by: sonhv0212 <[email protected]>
* eth/tracers/logger: make structlog/json-log stack hex again (#28628)

* common/hexutil: define hex wrappers for uint256.Int

* eth/tracers/logger: make structlog/json-log stack hex again

* common/hexutil: goimports

* pick up ethereum/go-ethereum#30926

ethereum/go-ethereum#30926

* pick up ethereum/go-ethereum#30933

ethereum/go-ethereum#30933

* core/types: rename SetCodeAuthorization 'v' to 'yParity'

The API spec requires the name yParity.

* pick up ethereum/go-ethereum#30935

ethereum/go-ethereum#30935

* fixup! pick up ethereum/go-ethereum#30935

---------

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
* pick up ethereum/go-ethereum#30982

Co-authored-by: Felix Lange <[email protected]>

* tests: synchronize with go-ethereum, run code gen

Co-authored-by: Felix Lange <[email protected]>

* core/types: correct chainId check for pragueSigner (#31032)

Use zero value check for the pragueSigner

This aligns with cancunSigner and londonSigner as well.

* core/types: initialize ChainID in SetCodeTx copy method (#31054)

---------

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Shude Li <[email protected]>
* pick up ethereum/go-ethereum#31073

Co-authored-by: lightclient <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* pick up ethereum/go-ethereum#31206

Co-authored-by: Marius van der Wijden <[email protected]>

* pick up ethereum/go-ethereum#31209

Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: lightclient <[email protected]>

* pick up ethereum/go-ethereum#31249

Co-authored-by: buddho <[email protected]>
Co-authored-by: lightclient <[email protected]>

* fixup! pick up ethereum/go-ethereum#31249

* fixup! pick up ethereum/go-ethereum#31249

---------

Co-authored-by: lightclient <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: buddho <[email protected]>
* pick up ethereum/go-ethereum#29520

* core/state: update test cases

* core/state: fix SetStorage override behavior (#30185)

This pull request fixes the broken feature where the entire storage set is overridden.

Originally, the storage set override was achieved by marking the associated account
as deleted, preventing access to the storage slot on disk. However, since #29520, this
flag is also checked when accessing the account, rendering the account unreachable.

A fix has been applied in this pull request, which re-creates a new state object with all
account metadata inherited.

* fixup! pick up ethereum/go-ethereum#29520

* fixup! core/state: fix SetStorage override behavior (#30185)

---------

Co-authored-by: rjl493456442 <[email protected]>
* core/txpool/legacypool: reject gapped tx from delegated account (#31430)

This pull request improves the protection mechanism in the txpool for 
senders with delegation. A sender with either delegation or pending 
delegation is now limited to a maximum of one in-flight executable 
transaction, while gapped transactions will be rejected.

Reason:
If nonce-gapped transaction from delegated/pending-delegated senders
can be acceptable, then it's no-longer possible to send another
"executable" transaction with correct nonce due to the policy of at most
one inflight tx. The gapped transaction will be stuck in the txpool, with no
meaningful way to unlock the sender.

---------

Co-authored-by: lightclient <[email protected]>

* core/txpool/legacypool: fix data race in checkDelegationLimit (#31475)

---------

Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: rekyyang <[email protected]>
@chiphamskymavis chiphamskymavis changed the base branch from master to main May 21, 2025 07:08
@github-actions
Copy link

📊 Code Coverage Report

✅ Total coverage: 52.2% (Above threshold of 50%)

📑 Detailed coverage report:

File Coverage
accounts/abi/bind/backends/simulated.go 100.0%
accounts/external/backend.go 0.0%
cmd/evm/internal/t8ntool/transaction.go 100.0%
common/hexutil/json.go 100.0%
consensus/consortium/common/contract.go 0.0%
core/state/journal.go 100.0%
core/state/state_object.go 100.0%
core/state/statedb.go 0.0%
core/state_processor.go 100.0%
core/state_transition.go 0.0%
core/txpool/legacypool/legacypool.go 46.2%
core/txpool/legacypool/list.go 100.0%
core/txpool/validation.go 83.3%
core/types/blob_tx.go 100.0%
core/types/dynamic_fee_tx.go 100.0%
core/types/gen_authorization.go 0.0%
core/types/hashes.go 0.0%
core/types/receipt.go 0.0%
core/types/setcode_tx.go 100.0%
core/types/transaction.go 100.0%
core/types/transaction_marshalling.go 100.0%
core/types/transaction_signing.go 36.4%
core/vm/eips.go 80.0%
core/vm/evm.go 68.2%
core/vm/interpreter.go 65.2%
core/vm/jump_table.go 100.0%
core/vm/operations_acl.go 3.4%
core/vm/program/program.go 100.0%
eth/gasestimator/gasestimator.go 50.0%
eth/tracers/logger/access_list_tracer.go 0.0%
eth/tracers/logger/gen_structlog.go 85.0%
eth/tracers/logger/logger.go 100.0%
graphql/graphql.go 100.0%
internal/ethapi/api.go 0.0%
internal/ethapi/transaction_args.go 100.0%
light/txpool.go 100.0%
params/config.go 0.0%
tests/gen_stauthorization.go 0.0%
tests/gen_stenv.go 0.0%
tests/gen_sttransaction.go 0.0%
tests/init.go 0.0%
tests/state_test_util.go 0.0%
tests/transaction_test_util.go 0.0%

📈 Download detailed HTML coverage report

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.

5 participants