You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core/txpool,core/txpool/locals): hold back local resubmits below the gas price floor
A gas schedule fork raises the floor above transactions that were admitted
under the previous tier, and the pool sweeps them out. The local tracker kept
resubmitting them every minute: recheck ignored the result of pool.Add, and the
transactions never went stale because their nonce never advanced, so they
stayed tracked and journalled forever.
Hold back any tracked transaction priced below the current floor, resolved for
the block pending on top of the head exactly as admission validation resolves
it. They stay tracked, so a reorg or a set-head rollback that lowers the floor
picks them up again on the next recheck: the pool does not bring back what it
swept, so the tracker is the only thing that can. Special transactions stay
exempt, as they are during admission.
Resolve the floor through a new TxPool.MinGasPrice, which goes through the
same pendingBlockNumber helper as admission validation and the sweep, so the
tracker and the pool cannot price the same transaction at different heights.
Report the held back transactions through txpool/local/belowfloor, since they
are still counted by txpool/local.
Pin that ErrUnderMinGasPrice is not a temporary reject: the floor only rises as
the chain advances, so retrying cannot help and AddLocal must not track the
transaction, but the error must not be used to drop a tracked one either.
Cover the floor with tests that rewind the head with SetHead across every tier
boundary and cover a head without a block number, the hold-back at exactly the
floor and one wei below it, resumption once the floor drops, and the exemption
special transactions keep.
0 commit comments