-
Notifications
You must be signed in to change notification settings - Fork 0
core/txpool/legacypool: legacypool supports SetCode tx #1
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
base: base-eip-7702
Are you sure you want to change the base?
Conversation
414f06e
to
30f2d2f
Compare
// Authorities cannot conflict with any pending or queued transactions. | ||
if auths := tx.SetCodeAuthorities(); len(auths) > 0 { | ||
for _, auth := range auths { | ||
if pool.pending[auth] != nil || pool.queue[auth] != 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.
I think we should add || pool.totalPendingPayerCost[auth] != nil
to avoid conflict with pending payer in sponsored transaction
// restrictions brought by SetCode transaction type. | ||
func (pool *LegacyPool) validateAuth(tx *types.Transaction) error { | ||
from, _ := types.Sender(pool.signer, tx) // validated | ||
|
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.
We should add this to reject sponsored transaction with pending authorization
payer, err := types.Payer(pool.signer, tx)
if err == nil {
if pool.currentState.GetCodeHash(payer) != emptyCodeHash || len(pool.all.auths[payer]) != 0 {
return ErrInflightTxLimitReached
}
}
PRs
Description
In this PR:
UsedAndLeftSlots
becomes an optional callback inValidationOptionsWithState
.lookup
to track pooled authorization