github.com/ethereum/go-ethereum@v1.14.4-0.20240516095835-473ee8fc07a3/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 "errors" 20 21 var ( 22 // ErrAlreadyKnown is returned if the transactions is already contained 23 // within the pool. 24 ErrAlreadyKnown = errors.New("already known") 25 26 // ErrInvalidSender is returned if the transaction contains an invalid signature. 27 ErrInvalidSender = errors.New("invalid sender") 28 29 // ErrUnderpriced is returned if a transaction's gas price is below the minimum 30 // configured for the transaction pool. 31 ErrUnderpriced = errors.New("transaction underpriced") 32 33 // ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced 34 // with a different one without the required price bump. 35 ErrReplaceUnderpriced = errors.New("replacement transaction underpriced") 36 37 // ErrAccountLimitExceeded is returned if a transaction would exceed the number 38 // allowed by a pool for a single account. 39 ErrAccountLimitExceeded = errors.New("account limit exceeded") 40 41 // ErrGasLimit is returned if a transaction's requested gas limit exceeds the 42 // maximum allowance of the current block. 43 ErrGasLimit = errors.New("exceeds block gas limit") 44 45 // ErrNegativeValue is a sanity error to ensure no one is able to specify a 46 // transaction with a negative value. 47 ErrNegativeValue = errors.New("negative value") 48 49 // ErrOversizedData is returned if the input data of a transaction is greater 50 // than some meaningful limit a user might use. This is not a consensus error 51 // making the transaction invalid, rather a DOS protection. 52 ErrOversizedData = errors.New("oversized data") 53 54 // ErrFutureReplacePending is returned if a future transaction replaces a pending 55 // one. Future transactions should only be able to replace other future transactions. 56 ErrFutureReplacePending = errors.New("future transaction tries to replace pending") 57 58 // ErrAlreadyReserved is returned if the sender address has a pending transaction 59 // in a different subpool. For example, this error is returned in response to any 60 // input transaction of non-blob type when a blob transaction from this sender 61 // remains pending (and vice-versa). 62 ErrAlreadyReserved = errors.New("address already reserved") 63 )