-
Notifications
You must be signed in to change notification settings - Fork 21k
internal/ethapi: support unlimited rpc gas cap in eth_createAccessList #28846
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
Changes from 4 commits
53f7872
76cad9b
9424531
2eea30d
ee59f15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,7 @@ func (args *TransactionArgs) data() []byte { | |
} | ||
|
||
// setDefaults fills in default values for unspecified tx fields. | ||
func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error { | ||
func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend, infiniteGas bool) error { | ||
if err := args.setBlobTxSidecar(ctx, b); err != nil { | ||
return err | ||
} | ||
|
@@ -135,6 +135,12 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error { | |
return errors.New(`contract creation without any data provided`) | ||
} | ||
} | ||
// Assign a very high gas limit for cases where an accurate gas limit is not critical, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this needed? I think a max value will be assigned in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm but no default is set in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. But |
||
// but need to ensure that gas is sufficient. | ||
if infiniteGas { | ||
tmp := hexutil.Uint64(math.MaxUint64 / 2) | ||
args.Gas = &tmp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will overwrite any user-provided gas limit. Please put it under the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense, the comments are addressed in ee59f15. |
||
} | ||
|
||
// Estimate the gas usage if necessary. | ||
if args.Gas == nil { | ||
|
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.
👍