-
Notifications
You must be signed in to change notification settings - Fork 37
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
Txpool: Enforce minimum gas fee on tx entry #803
base: zkevm
Are you sure you want to change the base?
Conversation
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.
quick question -- will that produce an immediate error for user trying to use eth_sendRawTransaction?
Because the last thing we want is for a tx to be accepted and just disappear.
@mandrigin This PR enforces the correct behaviour which resolves this issue. More context: #774 (comment) This PR rejects txs on the RPC end entirely on validateTx, and returns an txpool rejection error on the RPC. |
zk/txpool/pool.go
Outdated
// Drop non-local transactions under our own minimal accepted gas price or tip | ||
if !isLocal && uint256.NewInt(p.cfg.MinFeeCap).Cmp(&txn.FeeCap) == 1 { | ||
// Drop transactions under our minimal accepted gas price or tip | ||
if uint256.NewInt(p.cfg.MinFeeCap).Cmp(&txn.FeeCap) == 1 { |
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.
will it break gasless (that come with 0 fee)?
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 for the spot. I think it might, let me resolve this.
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.
question about gasless -- it must keep working if allow-free-transactions is set to true
Quality Gate passedIssues Measures |
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.
@mandrigin I am making some assumptions here, but it seems like the zkevm node on your side will only allow gasless txs if they were submitted locally. In this case this check is skipped entirely, since there isnt any other checks on gasless txs on the validate tx pipeline on tx entry into the pool. I have reverted the min gasprice check to only happen for non-local txs in commit - 3b33c6e
Summary
Context
cdk-erigon/zk/txpool/pool.go
Lines 710 to 713 in 4796359