-
Notifications
You must be signed in to change notification settings - Fork 77
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
Pectra EIP 7702: set eoa account code for one transaction #2489
Pectra EIP 7702: set eoa account code for one transaction #2489
Conversation
…de-for-one-transaction
…de-for-one-transaction
…ansaction' of github.com:erigontech/silkworm into 2120-implement-eip-7702-set-eoa-account-code-for-one-transaction
…ansaction' of github.com:erigontech/silkworm into 2120-implement-eip-7702-set-eoa-account-code-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
…ansaction' of github.com:erigontech/silkworm into 2120-implement-eip-7702-set-eoa-account-code-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
…de-for-one-transaction
@@ -187,6 +199,12 @@ ValidationResult validate_call_precheck(const Transaction& txn, const EVM& evm) | |||
} | |||
} | |||
|
|||
if (evm.revision() >= EVMC_PRAGUE) { | |||
if (txn.type == TransactionType::kSetCode && !txn.to) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I'm not sure what's the difference between validate_call_precheck
& pre_validate_transaction
is (looks like we should eliminate code duplication between the two methods), but it looks suspicious to me that EIP-7702 transactions are validated differently between the two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The former seems to be more relaxed, and that's an issue with EIP-7702 txns - they should be validated the same way in both places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pre_validate_transaction
and validate_call_precheck
are slightly different because the checks done also by Erigon before call simulations (e.g. eth_call
) are somewhat more relaxed.
Anyway, validation of EIP-7702 transactions seems to be equivalent except for the missing check on Prague revision in pre_validate_transaction
, which should be added.
I agree we should eliminate duplication between the two methods (see #2522), doing it in separate PR is fine or even better.
Last EIP from Pectra. It's not fully implemented and, depending on the outcome of evm v2 API, the remaining bit is either integrating with new API or, more complicated, implementing required logic directly in silkworm.