github.com/ethereum/go-ethereum@v1.16.1/core/txpool/errors.go (about)

     1  // Copyright 2014 The go-ethereum Authors
     2  // This file is part of the go-ethereum library.
     3  //
     4  // The go-ethereum library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The go-ethereum library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  package txpool
    18  
    19  import (
    20  	"errors"
    21  )
    22  
    23  var (
    24  	// ErrAlreadyKnown is returned if the transactions is already contained
    25  	// within the pool.
    26  	ErrAlreadyKnown = errors.New("already known")
    27  
    28  	// ErrInvalidSender is returned if the transaction contains an invalid signature.
    29  	ErrInvalidSender = errors.New("invalid sender")
    30  
    31  	// ErrUnderpriced is returned if a transaction's gas price is too low to be
    32  	// included in the pool. If the gas price is lower than the minimum configured
    33  	// one for the transaction pool, use ErrTxGasPriceTooLow instead.
    34  	ErrUnderpriced = errors.New("transaction underpriced")
    35  
    36  	// ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced
    37  	// with a different one without the required price bump.
    38  	ErrReplaceUnderpriced = errors.New("replacement transaction underpriced")
    39  
    40  	// ErrTxGasPriceTooLow is returned if a transaction's gas price is below the
    41  	// minimum configured for the transaction pool.
    42  	ErrTxGasPriceTooLow = errors.New("transaction gas price below minimum")
    43  
    44  	// ErrAccountLimitExceeded is returned if a transaction would exceed the number
    45  	// allowed by a pool for a single account.
    46  	ErrAccountLimitExceeded = errors.New("account limit exceeded")
    47  
    48  	// ErrGasLimit is returned if a transaction's requested gas limit exceeds the
    49  	// maximum allowance of the current block.
    50  	ErrGasLimit = errors.New("exceeds block gas limit")
    51  
    52  	// ErrNegativeValue is a sanity error to ensure no one is able to specify a
    53  	// transaction with a negative value.
    54  	ErrNegativeValue = errors.New("negative value")
    55  
    56  	// ErrOversizedData is returned if the input data of a transaction is greater
    57  	// than some meaningful limit a user might use. This is not a consensus error
    58  	// making the transaction invalid, rather a DOS protection.
    59  	ErrOversizedData = errors.New("oversized data")
    60  
    61  	// ErrTxBlobLimitExceeded is returned if a transaction would exceed the number
    62  	// of blobs allowed by blobpool.
    63  	ErrTxBlobLimitExceeded = errors.New("transaction blob limit exceeded")
    64  
    65  	// ErrAlreadyReserved is returned if the sender address has a pending transaction
    66  	// in a different subpool. For example, this error is returned in response to any
    67  	// input transaction of non-blob type when a blob transaction from this sender
    68  	// remains pending (and vice-versa).
    69  	ErrAlreadyReserved = errors.New("address already reserved")
    70  
    71  	// ErrInflightTxLimitReached is returned when the maximum number of in-flight
    72  	// transactions is reached for specific accounts.
    73  	ErrInflightTxLimitReached = errors.New("in-flight transaction limit reached for delegated accounts")
    74  )