core/txpool/legacypool: add note about pool behavior w.r.t. authorizations

This commit is contained in:
lightclient 2025-02-10 21:23:58 -07:00
parent a15c2973a6
commit 37247f9461
No known key found for this signature in database
GPG key ID: 657913021EF45A6A

View file

@ -197,6 +197,19 @@ func (config *Config) sanitize() Config {
// The pool separates processable transactions (which can be applied to the // The pool separates processable transactions (which can be applied to the
// current state) and future transactions. Transactions move between those // current state) and future transactions. Transactions move between those
// two states over time as they are received and processed. // two states over time as they are received and processed.
//
// In addition to tracking transactions, the pool will also track pending set
// code authorizations. This helps minimize number of transactions that can be
// trivially churned in the pool. As a standard rule, any account with a
// deployed delegation or an in-flight authorization to deploy a delegation will
// only be allowed a single transaction slot instead of the standard number.
// This is due to the possibility of the account being sweeped by an unrelated
// account. Because SetCode transactions can have many authorizations included,
// we avoid explicitly checking their validity to save the state lookup. So long
// as the encompassing transaction is valid, the authorization will be accepted
// and tracked by the pool. In case the pool is tracking a pending / queued
// transaction from a specific account, it will reject new transactions with
// delegations from that account with standard in-flight transactions.
type LegacyPool struct { type LegacyPool struct {
config Config config Config
chainconfig *params.ChainConfig chainconfig *params.ChainConfig