-
Notifications
You must be signed in to change notification settings - Fork 20.8k
internal/ethapi: exclude 7702 authorities from result in eth_createAccessList #31336
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
eth_createAccessList
eth_createAccessList
eth_createAccessList
eth_createAccessList
I suppose authorization list length should be limited to prevent DoS. |
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.
LGTM
…sing in eth_createAccessList
@s1na Thank you for your review! I would be grateful if you could also take a look at the latest commit (6e18588) If you and the other reviewers confirm that it makes sense, I'll keep it. |
internal/ethapi/api.go
Outdated
|
||
// Prevent redundant operations if args contain more authorizations than EVM may handle | ||
maxAuthorizations := uint64(*args.Gas) / params.TxAuthTupleGas | ||
if uint64(len(args.AuthorizationList)) <= maxAuthorizations { |
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.
I think it's a good idea to limit the number of authorizations since they incur a heavy signature verification cost. I would instead of changing semantics rather return an error once the cap is reached.
Let's use CallNewAccountGas for the max number
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.
Certainly!
I just realised that CallNewAccountGas
is used in state transition, so it should also be used here, thank you!
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.
I was thinking about the error message and accidentally used fmt.Errorf
, I apologize
c5e3ac1
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.
Thanks LGTM!
@s1na thanks again! Is there anything else I need to do? |
No please hold on we will merge it soon. |
eth_createAccessList
…cessList (ethereum#31336) closes ethereum#31335 --------- Co-authored-by: sashabeton <sashabeton2007@gmail.com>
…cessList (ethereum#31336) closes ethereum#31335 --------- Co-authored-by: sashabeton <sashabeton2007@gmail.com>
closes #31335