-
Notifications
You must be signed in to change notification settings - Fork 21.6k
WIP: EIP-7907 Meter Contract Code Size And Increase Limit #32003
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
Conversation
core/state/access_list.go
Outdated
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.
This function is identical to DeleteAddress.
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.
Oops good catch
params/protocol_params.go
Outdated
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.
There seems to be some use of MaxInitCodeSize yet:
--- a/cmd/evm/internal/t8ntool/transaction.go
+++ b/cmd/evm/internal/t8ntool/transaction.go
@@ -180,7 +180,7 @@ func Transaction(ctx *cli.Context) error {
r.Error = errors.New("gas * maxFeePerGas exceeds 256 bits")
}
// Check whether the init code size has been exceeded.
- if chainConfig.IsShanghai(new(big.Int), 0) && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
+ if chainConfig.IsShanghai(new(big.Int), 0) && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSizeEIP3860 {
r.Error = errors.New("max initcode size exceeded")
}
results = append(results, r)
diff --git a/core/txpool/validation.go b/core/txpool/validation.go
index 720d0d3b7..29c335038 100644
--- a/core/txpool/validation.go
+++ b/core/txpool/validation.go
@@ -87,8 +87,8 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
return fmt.Errorf("%w: type %d rejected, pool not yet in Prague", core.ErrTxTypeNotSupported, tx.Type())
}
// Check whether the init code size has been exceeded
- if rules.IsShanghai && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
- return fmt.Errorf("%w: code size %v, limit %v", core.ErrMaxInitCodeSizeExceeded, len(tx.Data()), params.MaxInitCodeSize)
+ if rules.IsShanghai && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSizeEIP3860 {
+ return fmt.Errorf("%w: code size %v, limit %v", core.ErrMaxInitCodeSizeExceeded, len(tx.Data()), params.MaxInitCodeSizeEIP3860)
}
// Transactions can't be negative. This may never happen using RLP decoded
// transactions but may occur for transactions created using the RPC.
Co-authored-by: lightclient <lightclient@proton.com> Co-authored-by: Qi Zhou <qizhou@ethstorage.io>
Co-authored-by: lightclient <lightclient@proton.com> Co-authored-by: Qi Zhou <qizhou@ethstorage.io>
c3c6874 to
df12e79
Compare
b326264 to
9859e6d
Compare
|
Closing since this is no longer considered for Fusaka. |
WIP implementation of EIP-7907.