From accbc3dc1de36f4c3004dc3e915d5b0b784ad73a Mon Sep 17 00:00:00 2001 From: hvanz Date: Fri, 3 Feb 2023 10:18:24 -0300 Subject: [PATCH 01/13] Remove mempool/v1 --- config/config.go | 4 +- consensus/byzantine_test.go | 9 - consensus/common_test.go | 11 - consensus/reactor_test.go | 10 - mempool/v1/mempool.go | 769 ---------------------- mempool/v1/mempool_bench_test.go | 32 - mempool/v1/mempool_test.go | 654 ------------------ mempool/v1/reactor.go | 281 -------- mempool/v1/reactor_test.go | 187 ------ mempool/v1/tx.go | 87 --- node/node_test.go | 19 - node/setup.go | 23 - test/fuzz/mempool/v1/checktx.go | 37 -- test/fuzz/mempool/v1/fuzz_test.go | 34 - test/fuzz/mempool/v1/testdata/cases/empty | 0 test/fuzz/tests/mempool_test.go | 6 +- 16 files changed, 3 insertions(+), 2160 deletions(-) delete mode 100644 mempool/v1/mempool.go delete mode 100644 mempool/v1/mempool_bench_test.go delete mode 100644 mempool/v1/mempool_test.go delete mode 100644 mempool/v1/reactor.go delete mode 100644 mempool/v1/reactor_test.go delete mode 100644 mempool/v1/tx.go delete mode 100644 test/fuzz/mempool/v1/checktx.go delete mode 100644 test/fuzz/mempool/v1/fuzz_test.go delete mode 100644 test/fuzz/mempool/v1/testdata/cases/empty diff --git a/config/config.go b/config/config.go index 42a93a37cc5..3a267ef09cb 100644 --- a/config/config.go +++ b/config/config.go @@ -27,10 +27,8 @@ const ( // DefaultLogLevel defines a default log level as INFO. DefaultLogLevel = "info" - // Mempool versions. V1 is prioritized mempool, v0 is regular mempool. - // Default is v0. + // Mempool versions. v0 is the regular and default mempool. MempoolV0 = "v0" - MempoolV1 = "v1" DefaultTendermintDir = ".cometbft" DefaultConfigDir = "config" diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index cc2f5be44d6..2df6a1ccd12 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -24,7 +24,6 @@ import ( cfg "github.com/cometbft/cometbft/config" mempoolv0 "github.com/cometbft/cometbft/mempool/v0" - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" "github.com/cometbft/cometbft/p2p" cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -80,14 +79,6 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { state.LastBlockHeight, mempoolv0.WithPreCheck(sm.TxPreCheck(state)), mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - case cfg.MempoolV1: - mempool = mempoolv1.NewTxMempool(logger, - config.Mempool, - proxyAppConnConMem, - state.LastBlockHeight, - mempoolv1.WithPreCheck(sm.TxPreCheck(state)), - mempoolv1.WithPostCheck(sm.TxPostCheck(state)), - ) } if thisConfig.Consensus.WaitForTxs() { diff --git a/consensus/common_test.go b/consensus/common_test.go index 8ac2d9205e0..a2f932a87b8 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -31,7 +31,6 @@ import ( cmtsync "github.com/cometbft/cometbft/libs/sync" mempl "github.com/cometbft/cometbft/mempool" mempoolv0 "github.com/cometbft/cometbft/mempool/v0" - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/privval" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -413,16 +412,6 @@ func newStateWithConfigAndBlockStore( mempoolv0.WithMetrics(memplMetrics), mempoolv0.WithPreCheck(sm.TxPreCheck(state)), mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - case cfg.MempoolV1: - logger := consensusLogger() - mempool = mempoolv1.NewTxMempool(logger, - config.Mempool, - proxyAppConnConMem, - state.LastBlockHeight, - mempoolv1.WithMetrics(memplMetrics), - mempoolv1.WithPreCheck(sm.TxPreCheck(state)), - mempoolv1.WithPostCheck(sm.TxPostCheck(state)), - ) } if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 4cef844aeeb..8c0a9ae4087 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -30,7 +30,6 @@ import ( cmtsync "github.com/cometbft/cometbft/libs/sync" mempl "github.com/cometbft/cometbft/mempool" mempoolv0 "github.com/cometbft/cometbft/mempool/v0" - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" "github.com/cometbft/cometbft/p2p" p2pmock "github.com/cometbft/cometbft/p2p/mock" cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus" @@ -173,15 +172,6 @@ func TestReactorWithEvidence(t *testing.T) { mempoolv0.WithMetrics(memplMetrics), mempoolv0.WithPreCheck(sm.TxPreCheck(state)), mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - case cfg.MempoolV1: - mempool = mempoolv1.NewTxMempool(logger, - config.Mempool, - proxyAppConnConMem, - state.LastBlockHeight, - mempoolv1.WithMetrics(memplMetrics), - mempoolv1.WithPreCheck(sm.TxPreCheck(state)), - mempoolv1.WithPostCheck(sm.TxPostCheck(state)), - ) } if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() diff --git a/mempool/v1/mempool.go b/mempool/v1/mempool.go deleted file mode 100644 index 4f48c770ecc..00000000000 --- a/mempool/v1/mempool.go +++ /dev/null @@ -1,769 +0,0 @@ -package v1 - -import ( - "fmt" - "runtime" - "sort" - "sync" - "sync/atomic" - "time" - - "github.com/creachadair/taskgroup" - - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/libs/clist" - "github.com/cometbft/cometbft/libs/log" - "github.com/cometbft/cometbft/mempool" - "github.com/cometbft/cometbft/proxy" - "github.com/cometbft/cometbft/types" -) - -var _ mempool.Mempool = (*TxMempool)(nil) - -// TxMempoolOption sets an optional parameter on the TxMempool. -type TxMempoolOption func(*TxMempool) - -// TxMempool implemements the Mempool interface and allows the application to -// set priority values on transactions in the CheckTx response. When selecting -// transactions to include in a block, higher-priority transactions are chosen -// first. When evicting transactions from the mempool for size constraints, -// lower-priority transactions are evicted sooner. -// -// Within the mempool, transactions are ordered by time of arrival, and are -// gossiped to the rest of the network based on that order (gossip order does -// not take priority into account). -type TxMempool struct { - // Immutable fields - logger log.Logger - config *config.MempoolConfig - proxyAppConn proxy.AppConnMempool - metrics *mempool.Metrics - cache mempool.TxCache // seen transactions - - // Atomically-updated fields - txsBytes int64 // atomic: the total size of all transactions in the mempool, in bytes - - // Synchronized fields, protected by mtx. - mtx *sync.RWMutex - notifiedTxsAvailable bool - txsAvailable chan struct{} // one value sent per height when mempool is not empty - preCheck mempool.PreCheckFunc - postCheck mempool.PostCheckFunc - height int64 // the latest height passed to Update - - txs *clist.CList // valid transactions (passed CheckTx) - txByKey map[types.TxKey]*clist.CElement - txBySender map[string]*clist.CElement // for sender != "" -} - -// NewTxMempool constructs a new, empty priority mempool at the specified -// initial height and using the given config and options. -func NewTxMempool( - logger log.Logger, - cfg *config.MempoolConfig, - proxyAppConn proxy.AppConnMempool, - height int64, - options ...TxMempoolOption, -) *TxMempool { - - txmp := &TxMempool{ - logger: logger, - config: cfg, - proxyAppConn: proxyAppConn, - metrics: mempool.NopMetrics(), - cache: mempool.NopTxCache{}, - txs: clist.New(), - mtx: new(sync.RWMutex), - height: height, - txByKey: make(map[types.TxKey]*clist.CElement), - txBySender: make(map[string]*clist.CElement), - } - if cfg.CacheSize > 0 { - txmp.cache = mempool.NewLRUTxCache(cfg.CacheSize) - } - - for _, opt := range options { - opt(txmp) - } - - return txmp -} - -// WithPreCheck sets a filter for the mempool to reject a transaction if f(tx) -// returns an error. This is executed before CheckTx. It only applies to the -// first created block. After that, Update() overwrites the existing value. -func WithPreCheck(f mempool.PreCheckFunc) TxMempoolOption { - return func(txmp *TxMempool) { txmp.preCheck = f } -} - -// WithPostCheck sets a filter for the mempool to reject a transaction if -// f(tx, resp) returns an error. This is executed after CheckTx. It only applies -// to the first created block. After that, Update overwrites the existing value. -func WithPostCheck(f mempool.PostCheckFunc) TxMempoolOption { - return func(txmp *TxMempool) { txmp.postCheck = f } -} - -// WithMetrics sets the mempool's metrics collector. -func WithMetrics(metrics *mempool.Metrics) TxMempoolOption { - return func(txmp *TxMempool) { txmp.metrics = metrics } -} - -// Lock obtains a write-lock on the mempool. A caller must be sure to explicitly -// release the lock when finished. -func (txmp *TxMempool) Lock() { txmp.mtx.Lock() } - -// Unlock releases a write-lock on the mempool. -func (txmp *TxMempool) Unlock() { txmp.mtx.Unlock() } - -// Size returns the number of valid transactions in the mempool. It is -// thread-safe. -func (txmp *TxMempool) Size() int { return txmp.txs.Len() } - -// SizeBytes return the total sum in bytes of all the valid transactions in the -// mempool. It is thread-safe. -func (txmp *TxMempool) SizeBytes() int64 { return atomic.LoadInt64(&txmp.txsBytes) } - -// FlushAppConn executes FlushSync on the mempool's proxyAppConn. -// -// The caller must hold an exclusive mempool lock (by calling txmp.Lock) before -// calling FlushAppConn. -func (txmp *TxMempool) FlushAppConn() error { - // N.B.: We have to issue the call outside the lock so that its callback can - // fire. It's safe to do this, the flush will block until complete. - // - // We could just not require the caller to hold the lock at all, but the - // semantics of the Mempool interface require the caller to hold it, and we - // can't change that without disrupting existing use. - txmp.mtx.Unlock() - defer txmp.mtx.Lock() - - return txmp.proxyAppConn.FlushSync() -} - -// EnableTxsAvailable enables the mempool to trigger events when transactions -// are available on a block by block basis. -func (txmp *TxMempool) EnableTxsAvailable() { - txmp.mtx.Lock() - defer txmp.mtx.Unlock() - - txmp.txsAvailable = make(chan struct{}, 1) -} - -// TxsAvailable returns a channel which fires once for every height, and only -// when transactions are available in the mempool. It is thread-safe. -func (txmp *TxMempool) TxsAvailable() <-chan struct{} { return txmp.txsAvailable } - -// CheckTx adds the given transaction to the mempool if it fits and passes the -// application's ABCI CheckTx method. -// -// CheckTx reports an error without adding tx if: -// -// - The size of tx exceeds the configured maximum transaction size. -// - The pre-check hook is defined and reports an error for tx. -// - The transaction already exists in the cache. -// - The proxy connection to the application fails. -// -// If tx passes all of the above conditions, it is passed (asynchronously) to -// the application's ABCI CheckTx method and this CheckTx method returns nil. -// If cb != nil, it is called when the ABCI request completes to report the -// application response. -// -// If the application accepts the transaction and the mempool is full, the -// mempool evicts one or more of the lowest-priority transaction whose priority -// is (strictly) lower than the priority of tx and whose size together exceeds -// the size of tx, and adds tx instead. If no such transactions exist, tx is -// discarded. -func (txmp *TxMempool) CheckTx(tx types.Tx, cb func(*abci.Response), txInfo mempool.TxInfo) error { - - // During the initial phase of CheckTx, we do not need to modify any state. - // A transaction will not actually be added to the mempool until it survives - // a call to the ABCI CheckTx method and size constraint checks. - height, err := func() (int64, error) { - txmp.mtx.RLock() - defer txmp.mtx.RUnlock() - - // Reject transactions in excess of the configured maximum transaction size. - if len(tx) > txmp.config.MaxTxBytes { - return 0, mempool.ErrTxTooLarge{Max: txmp.config.MaxTxBytes, Actual: len(tx)} - } - - // If a precheck hook is defined, call it before invoking the application. - if txmp.preCheck != nil { - if err := txmp.preCheck(tx); err != nil { - return 0, mempool.ErrPreCheck{Reason: err} - } - } - - // Early exit if the proxy connection has an error. - if err := txmp.proxyAppConn.Error(); err != nil { - return 0, err - } - - txKey := tx.Key() - - // Check for the transaction in the cache. - if !txmp.cache.Push(tx) { - // If the cached transaction is also in the pool, record its sender. - if elt, ok := txmp.txByKey[txKey]; ok { - w := elt.Value.(*WrappedTx) - w.SetPeer(txInfo.SenderID) - } - return 0, mempool.ErrTxInCache - } - return txmp.height, nil - }() - if err != nil { - return err - } - - // Invoke an ABCI CheckTx for this transaction. - rsp, err := txmp.proxyAppConn.CheckTxSync(abci.RequestCheckTx{Tx: tx}) - if err != nil { - txmp.cache.Remove(tx) - return err - } - wtx := &WrappedTx{ - tx: tx, - hash: tx.Key(), - timestamp: time.Now().UTC(), - height: height, - } - wtx.SetPeer(txInfo.SenderID) - txmp.addNewTransaction(wtx, rsp) - if cb != nil { - cb(&abci.Response{Value: &abci.Response_CheckTx{CheckTx: rsp}}) - } - return nil -} - -// RemoveTxByKey removes the transaction with the specified key from the -// mempool. It reports an error if no such transaction exists. This operation -// does not remove the transaction from the cache. -func (txmp *TxMempool) RemoveTxByKey(txKey types.TxKey) error { - txmp.mtx.Lock() - defer txmp.mtx.Unlock() - return txmp.removeTxByKey(txKey) -} - -// removeTxByKey removes the specified transaction key from the mempool. -// The caller must hold txmp.mtx excluxively. -func (txmp *TxMempool) removeTxByKey(key types.TxKey) error { - if elt, ok := txmp.txByKey[key]; ok { - w := elt.Value.(*WrappedTx) - delete(txmp.txByKey, key) - delete(txmp.txBySender, w.sender) - txmp.txs.Remove(elt) - elt.DetachPrev() - elt.DetachNext() - atomic.AddInt64(&txmp.txsBytes, -w.Size()) - return nil - } - return fmt.Errorf("transaction %x not found", key) -} - -// removeTxByElement removes the specified transaction element from the mempool. -// The caller must hold txmp.mtx exclusively. -func (txmp *TxMempool) removeTxByElement(elt *clist.CElement) { - w := elt.Value.(*WrappedTx) - delete(txmp.txByKey, w.tx.Key()) - delete(txmp.txBySender, w.sender) - txmp.txs.Remove(elt) - elt.DetachPrev() - elt.DetachNext() - atomic.AddInt64(&txmp.txsBytes, -w.Size()) -} - -// Flush purges the contents of the mempool and the cache, leaving both empty. -// The current height is not modified by this operation. -func (txmp *TxMempool) Flush() { - txmp.mtx.Lock() - defer txmp.mtx.Unlock() - - // Remove all the transactions in the list explicitly, so that the sizes - // and indexes get updated properly. - cur := txmp.txs.Front() - for cur != nil { - next := cur.Next() - txmp.removeTxByElement(cur) - cur = next - } - txmp.cache.Reset() -} - -// allEntriesSorted returns a slice of all the transactions currently in the -// mempool, sorted in nonincreasing order by priority with ties broken by -// increasing order of arrival time. -func (txmp *TxMempool) allEntriesSorted() []*WrappedTx { - txmp.mtx.RLock() - defer txmp.mtx.RUnlock() - - all := make([]*WrappedTx, 0, len(txmp.txByKey)) - for _, tx := range txmp.txByKey { - all = append(all, tx.Value.(*WrappedTx)) - } - sort.Slice(all, func(i, j int) bool { - if all[i].priority == all[j].priority { - return all[i].timestamp.Before(all[j].timestamp) - } - return all[i].priority > all[j].priority // N.B. higher priorities first - }) - return all -} - -// ReapMaxBytesMaxGas returns a slice of valid transactions that fit within the -// size and gas constraints. The results are ordered by nonincreasing priority, -// with ties broken by increasing order of arrival. Reaping transactions does -// not remove them from the mempool. -// -// If maxBytes < 0, no limit is set on the total size in bytes. -// If maxGas < 0, no limit is set on the total gas cost. -// -// If the mempool is empty or has no transactions fitting within the given -// constraints, the result will also be empty. -func (txmp *TxMempool) ReapMaxBytesMaxGas(maxBytes, maxGas int64) types.Txs { - var totalGas, totalBytes int64 - - var keep []types.Tx //nolint:prealloc - for _, w := range txmp.allEntriesSorted() { - // N.B. When computing byte size, we need to include the overhead for - // encoding as protobuf to send to the application. - totalGas += w.gasWanted - totalBytes += types.ComputeProtoSizeForTxs([]types.Tx{w.tx}) - if (maxGas >= 0 && totalGas > maxGas) || (maxBytes >= 0 && totalBytes > maxBytes) { - break - } - keep = append(keep, w.tx) - } - return keep -} - -// TxsWaitChan returns a channel that is closed when there is at least one -// transaction available to be gossiped. -func (txmp *TxMempool) TxsWaitChan() <-chan struct{} { return txmp.txs.WaitChan() } - -// TxsFront returns the frontmost element of the pending transaction list. -// It will be nil if the mempool is empty. -func (txmp *TxMempool) TxsFront() *clist.CElement { return txmp.txs.Front() } - -// ReapMaxTxs returns up to max transactions from the mempool. The results are -// ordered by nonincreasing priority with ties broken by increasing order of -// arrival. Reaping transactions does not remove them from the mempool. -// -// If max < 0, all transactions in the mempool are reaped. -// -// The result may have fewer than max elements (possibly zero) if the mempool -// does not have that many transactions available. -func (txmp *TxMempool) ReapMaxTxs(max int) types.Txs { - var keep []types.Tx //nolint:prealloc - - for _, w := range txmp.allEntriesSorted() { - if max >= 0 && len(keep) >= max { - break - } - keep = append(keep, w.tx) - } - return keep -} - -// Update removes all the given transactions from the mempool and the cache, -// and updates the current block height. The blockTxs and deliverTxResponses -// must have the same length with each response corresponding to the tx at the -// same offset. -// -// If the configuration enables recheck, Update sends each remaining -// transaction after removing blockTxs to the ABCI CheckTx method. Any -// transactions marked as invalid during recheck are also removed. -// -// The caller must hold an exclusive mempool lock (by calling txmp.Lock) before -// calling Update. -func (txmp *TxMempool) Update( - blockHeight int64, - blockTxs types.Txs, - deliverTxResponses []*abci.ResponseDeliverTx, - newPreFn mempool.PreCheckFunc, - newPostFn mempool.PostCheckFunc, -) error { - // Safety check: Transactions and responses must match in number. - if len(blockTxs) != len(deliverTxResponses) { - panic(fmt.Sprintf("mempool: got %d transactions but %d DeliverTx responses", - len(blockTxs), len(deliverTxResponses))) - } - - txmp.height = blockHeight - txmp.notifiedTxsAvailable = false - - if newPreFn != nil { - txmp.preCheck = newPreFn - } - if newPostFn != nil { - txmp.postCheck = newPostFn - } - - for i, tx := range blockTxs { - // Add successful committed transactions to the cache (if they are not - // already present). Transactions that failed to commit are removed from - // the cache unless the operator has explicitly requested we keep them. - if deliverTxResponses[i].Code == abci.CodeTypeOK { - _ = txmp.cache.Push(tx) - } else if !txmp.config.KeepInvalidTxsInCache { - txmp.cache.Remove(tx) - } - - // Regardless of success, remove the transaction from the mempool. - _ = txmp.removeTxByKey(tx.Key()) - } - - txmp.purgeExpiredTxs(blockHeight) - - // If there any uncommitted transactions left in the mempool, we either - // initiate re-CheckTx per remaining transaction or notify that remaining - // transactions are left. - size := txmp.Size() - txmp.metrics.Size.Set(float64(size)) - if size > 0 { - if txmp.config.Recheck { - txmp.recheckTransactions() - } else { - txmp.notifyTxsAvailable() - } - } - return nil -} - -// addNewTransaction handles the ABCI CheckTx response for the first time a -// transaction is added to the mempool. A recheck after a block is committed -// goes to handleRecheckResult. -// -// If either the application rejected the transaction or a post-check hook is -// defined and rejects the transaction, it is discarded. -// -// Otherwise, if the mempool is full, check for lower-priority transactions -// that can be evicted to make room for the new one. If no such transactions -// exist, this transaction is logged and dropped; otherwise the selected -// transactions are evicted. -// -// Finally, the new transaction is added and size stats updated. -func (txmp *TxMempool) addNewTransaction(wtx *WrappedTx, checkTxRes *abci.ResponseCheckTx) { - txmp.mtx.Lock() - defer txmp.mtx.Unlock() - - var err error - if txmp.postCheck != nil { - err = txmp.postCheck(wtx.tx, checkTxRes) - } - - if err != nil || checkTxRes.Code != abci.CodeTypeOK { - txmp.logger.Info( - "rejected bad transaction", - "priority", wtx.Priority(), - "tx", fmt.Sprintf("%X", wtx.tx.Hash()), - "peer_id", wtx.peers, - "code", checkTxRes.Code, - "post_check_err", err, - ) - - txmp.metrics.FailedTxs.Add(1) - - // Remove the invalid transaction from the cache, unless the operator has - // instructed us to keep invalid transactions. - if !txmp.config.KeepInvalidTxsInCache { - txmp.cache.Remove(wtx.tx) - } - - // If there was a post-check error, record its text in the result for - // debugging purposes. - if err != nil { - checkTxRes.MempoolError = err.Error() - } - return - } - - priority := checkTxRes.Priority - sender := checkTxRes.Sender - - // Disallow multiple concurrent transactions from the same sender assigned - // by the ABCI application. As a special case, an empty sender is not - // restricted. - if sender != "" { - elt, ok := txmp.txBySender[sender] - if ok { - w := elt.Value.(*WrappedTx) - txmp.logger.Debug( - "rejected valid incoming transaction; tx already exists for sender", - "tx", fmt.Sprintf("%X", w.tx.Hash()), - "sender", sender, - ) - checkTxRes.MempoolError = - fmt.Sprintf("rejected valid incoming transaction; tx already exists for sender %q (%X)", - sender, w.tx.Hash()) - txmp.metrics.RejectedTxs.Add(1) - return - } - } - - // At this point the application has ruled the transaction valid, but the - // mempool might be full. If so, find the lowest-priority items with lower - // priority than the application assigned to this new one, and evict as many - // of them as necessary to make room for tx. If no such items exist, we - // discard tx. - - if err := txmp.canAddTx(wtx); err != nil { - var victims []*clist.CElement // eligible transactions for eviction - var victimBytes int64 // total size of victims - for cur := txmp.txs.Front(); cur != nil; cur = cur.Next() { - cw := cur.Value.(*WrappedTx) - if cw.priority < priority { - victims = append(victims, cur) - victimBytes += cw.Size() - } - } - - // If there are no suitable eviction candidates, or the total size of - // those candidates is not enough to make room for the new transaction, - // drop the new one. - if len(victims) == 0 || victimBytes < wtx.Size() { - txmp.cache.Remove(wtx.tx) - txmp.logger.Error( - "rejected valid incoming transaction; mempool is full", - "tx", fmt.Sprintf("%X", wtx.tx.Hash()), - "err", err.Error(), - ) - checkTxRes.MempoolError = - fmt.Sprintf("rejected valid incoming transaction; mempool is full (%X)", - wtx.tx.Hash()) - txmp.metrics.RejectedTxs.Add(1) - return - } - - txmp.logger.Debug("evicting lower-priority transactions", - "new_tx", fmt.Sprintf("%X", wtx.tx.Hash()), - "new_priority", priority, - ) - - // Sort lowest priority items first so they will be evicted first. Break - // ties in favor of newer items (to maintain FIFO semantics in a group). - sort.Slice(victims, func(i, j int) bool { - iw := victims[i].Value.(*WrappedTx) - jw := victims[j].Value.(*WrappedTx) - if iw.Priority() == jw.Priority() { - return iw.timestamp.After(jw.timestamp) - } - return iw.Priority() < jw.Priority() - }) - - // Evict as many of the victims as necessary to make room. - var evictedBytes int64 - for _, vic := range victims { - w := vic.Value.(*WrappedTx) - - txmp.logger.Debug( - "evicted valid existing transaction; mempool full", - "old_tx", fmt.Sprintf("%X", w.tx.Hash()), - "old_priority", w.priority, - ) - txmp.removeTxByElement(vic) - txmp.cache.Remove(w.tx) - txmp.metrics.EvictedTxs.Add(1) - - // We may not need to evict all the eligible transactions. Bail out - // early if we have made enough room. - evictedBytes += w.Size() - if evictedBytes >= wtx.Size() { - break - } - } - } - - wtx.SetGasWanted(checkTxRes.GasWanted) - wtx.SetPriority(priority) - wtx.SetSender(sender) - txmp.insertTx(wtx) - - txmp.metrics.TxSizeBytes.Observe(float64(wtx.Size())) - txmp.metrics.Size.Set(float64(txmp.Size())) - txmp.logger.Debug( - "inserted new valid transaction", - "priority", wtx.Priority(), - "tx", fmt.Sprintf("%X", wtx.tx.Hash()), - "height", txmp.height, - "num_txs", txmp.Size(), - ) - txmp.notifyTxsAvailable() -} - -func (txmp *TxMempool) insertTx(wtx *WrappedTx) { - elt := txmp.txs.PushBack(wtx) - txmp.txByKey[wtx.tx.Key()] = elt - if s := wtx.Sender(); s != "" { - txmp.txBySender[s] = elt - } - - atomic.AddInt64(&txmp.txsBytes, wtx.Size()) -} - -// handleRecheckResult handles the responses from ABCI CheckTx calls issued -// during the recheck phase of a block Update. It removes any transactions -// invalidated by the application. -// -// This method is NOT executed for the initial CheckTx on a new transaction; -// that case is handled by addNewTransaction instead. -func (txmp *TxMempool) handleRecheckResult(tx types.Tx, checkTxRes *abci.ResponseCheckTx) { - txmp.metrics.RecheckTimes.Add(1) - txmp.mtx.Lock() - defer txmp.mtx.Unlock() - - // Find the transaction reported by the ABCI callback. It is possible the - // transaction was evicted during the recheck, in which case the transaction - // will be gone. - elt, ok := txmp.txByKey[tx.Key()] - if !ok { - return - } - wtx := elt.Value.(*WrappedTx) - - // If a postcheck hook is defined, call it before checking the result. - var err error - if txmp.postCheck != nil { - err = txmp.postCheck(tx, checkTxRes) - } - - if checkTxRes.Code == abci.CodeTypeOK && err == nil { - wtx.SetPriority(checkTxRes.Priority) - return // N.B. Size of mempool did not change - } - - txmp.logger.Debug( - "existing transaction no longer valid; failed re-CheckTx callback", - "priority", wtx.Priority(), - "tx", fmt.Sprintf("%X", wtx.tx.Hash()), - "err", err, - "code", checkTxRes.Code, - ) - txmp.removeTxByElement(elt) - txmp.metrics.FailedTxs.Add(1) - if !txmp.config.KeepInvalidTxsInCache { - txmp.cache.Remove(wtx.tx) - } - txmp.metrics.Size.Set(float64(txmp.Size())) -} - -// recheckTransactions initiates re-CheckTx ABCI calls for all the transactions -// currently in the mempool. It reports the number of recheck calls that were -// successfully initiated. -// -// Precondition: The mempool is not empty. -// The caller must hold txmp.mtx exclusively. -func (txmp *TxMempool) recheckTransactions() { - if txmp.Size() == 0 { - panic("mempool: cannot run recheck on an empty mempool") - } - txmp.logger.Debug( - "executing re-CheckTx for all remaining transactions", - "num_txs", txmp.Size(), - "height", txmp.height, - ) - - // Collect transactions currently in the mempool requiring recheck. - wtxs := make([]*WrappedTx, 0, txmp.txs.Len()) - for e := txmp.txs.Front(); e != nil; e = e.Next() { - wtxs = append(wtxs, e.Value.(*WrappedTx)) - } - - // Issue CheckTx calls for each remaining transaction, and when all the - // rechecks are complete signal watchers that transactions may be available. - go func() { - g, start := taskgroup.New(nil).Limit(2 * runtime.NumCPU()) - - for _, wtx := range wtxs { - wtx := wtx - start(func() error { - // The response for this CheckTx is handled by the default recheckTxCallback. - rsp, err := txmp.proxyAppConn.CheckTxSync(abci.RequestCheckTx{ - Tx: wtx.tx, - Type: abci.CheckTxType_Recheck, - }) - if err != nil { - txmp.logger.Error("failed to execute CheckTx during recheck", - "err", err, "hash", fmt.Sprintf("%x", wtx.tx.Hash())) - } else { - txmp.handleRecheckResult(wtx.tx, rsp) - } - return nil - }) - } - _ = txmp.proxyAppConn.FlushAsync() - - // When recheck is complete, trigger a notification for more transactions. - _ = g.Wait() - txmp.mtx.Lock() - defer txmp.mtx.Unlock() - txmp.notifyTxsAvailable() - }() -} - -// canAddTx returns an error if we cannot insert the provided *WrappedTx into -// the mempool due to mempool configured constraints. Otherwise, nil is -// returned and the transaction can be inserted into the mempool. -func (txmp *TxMempool) canAddTx(wtx *WrappedTx) error { - numTxs := txmp.Size() - txBytes := txmp.SizeBytes() - - if numTxs >= txmp.config.Size || wtx.Size()+txBytes > txmp.config.MaxTxsBytes { - return mempool.ErrMempoolIsFull{ - NumTxs: numTxs, - MaxTxs: txmp.config.Size, - TxsBytes: txBytes, - MaxTxsBytes: txmp.config.MaxTxsBytes, - } - } - - return nil -} - -// purgeExpiredTxs removes all transactions from the mempool that have exceeded -// their respective height or time-based limits as of the given blockHeight. -// Transactions removed by this operation are not removed from the cache. -// -// The caller must hold txmp.mtx exclusively. -func (txmp *TxMempool) purgeExpiredTxs(blockHeight int64) { - if txmp.config.TTLNumBlocks == 0 && txmp.config.TTLDuration == 0 { - return // nothing to do - } - - now := time.Now() - cur := txmp.txs.Front() - for cur != nil { - // N.B. Grab the next element first, since if we remove cur its successor - // will be invalidated. - next := cur.Next() - - w := cur.Value.(*WrappedTx) - if txmp.config.TTLNumBlocks > 0 && (blockHeight-w.height) > txmp.config.TTLNumBlocks { - txmp.removeTxByElement(cur) - txmp.cache.Remove(w.tx) - txmp.metrics.EvictedTxs.Add(1) - } else if txmp.config.TTLDuration > 0 && now.Sub(w.timestamp) > txmp.config.TTLDuration { - txmp.removeTxByElement(cur) - txmp.cache.Remove(w.tx) - txmp.metrics.EvictedTxs.Add(1) - } - cur = next - } -} - -func (txmp *TxMempool) notifyTxsAvailable() { - if txmp.Size() == 0 { - return // nothing to do - } - - if txmp.txsAvailable != nil && !txmp.notifiedTxsAvailable { - // channel cap is 1, so this will send once - txmp.notifiedTxsAvailable = true - - select { - case txmp.txsAvailable <- struct{}{}: - default: - } - } -} diff --git a/mempool/v1/mempool_bench_test.go b/mempool/v1/mempool_bench_test.go deleted file mode 100644 index c4bca2316b0..00000000000 --- a/mempool/v1/mempool_bench_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package v1 - -import ( - "fmt" - "math/rand" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/cometbft/cometbft/mempool" -) - -func BenchmarkTxMempool_CheckTx(b *testing.B) { - txmp := setup(b, 10000) - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - - b.ResetTimer() - - for n := 0; n < b.N; n++ { - b.StopTimer() - prefix := make([]byte, 20) - _, err := rng.Read(prefix) - require.NoError(b, err) - - priority := int64(rng.Intn(9999-1000) + 1000) - tx := []byte(fmt.Sprintf("%X=%d", prefix, priority)) - b.StartTimer() - - require.NoError(b, txmp.CheckTx(tx, nil, mempool.TxInfo{})) - } -} diff --git a/mempool/v1/mempool_test.go b/mempool/v1/mempool_test.go deleted file mode 100644 index 8030c2133c6..00000000000 --- a/mempool/v1/mempool_test.go +++ /dev/null @@ -1,654 +0,0 @@ -package v1 - -import ( - "bytes" - "errors" - "fmt" - "math/rand" - "os" - "sort" - "strconv" - "strings" - "sync" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/cometbft/cometbft/abci/example/code" - "github.com/cometbft/cometbft/abci/example/kvstore" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/internal/test" - "github.com/cometbft/cometbft/libs/log" - "github.com/cometbft/cometbft/mempool" - "github.com/cometbft/cometbft/proxy" - "github.com/cometbft/cometbft/types" -) - -// application extends the KV store application by overriding CheckTx to provide -// transaction priority based on the value in the key/value pair. -type application struct { - *kvstore.Application -} - -type testTx struct { - tx types.Tx - priority int64 -} - -func (app *application) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { - var ( - priority int64 - sender string - ) - - // infer the priority from the raw transaction value (sender=key=value) - parts := bytes.Split(req.Tx, []byte("=")) - if len(parts) == 3 { - v, err := strconv.ParseInt(string(parts[2]), 10, 64) - if err != nil { - return abci.ResponseCheckTx{ - Priority: priority, - Code: 100, - GasWanted: 1, - } - } - - priority = v - sender = string(parts[0]) - } else { - return abci.ResponseCheckTx{ - Priority: priority, - Code: 101, - GasWanted: 1, - } - } - - return abci.ResponseCheckTx{ - Priority: priority, - Sender: sender, - Code: code.CodeTypeOK, - GasWanted: 1, - } -} - -func setup(t testing.TB, cacheSize int, options ...TxMempoolOption) *TxMempool { - t.Helper() - - app := &application{kvstore.NewApplication()} - cc := proxy.NewLocalClientCreator(app) - - cfg := test.ResetTestRoot(strings.ReplaceAll(t.Name(), "/", "|")) - cfg.Mempool.CacheSize = cacheSize - - appConnMem, err := cc.NewABCIClient() - require.NoError(t, err) - require.NoError(t, appConnMem.Start()) - - t.Cleanup(func() { - os.RemoveAll(cfg.RootDir) - require.NoError(t, appConnMem.Stop()) - }) - - return NewTxMempool(log.TestingLogger().With("test", t.Name()), cfg.Mempool, appConnMem, 0, options...) -} - -// mustCheckTx invokes txmp.CheckTx for the given transaction and waits until -// its callback has finished executing. It fails t if CheckTx fails. -func mustCheckTx(t *testing.T, txmp *TxMempool, spec string) { - done := make(chan struct{}) - if err := txmp.CheckTx([]byte(spec), func(*abci.Response) { - close(done) - }, mempool.TxInfo{}); err != nil { - t.Fatalf("CheckTx for %q failed: %v", spec, err) - } - <-done -} - -func checkTxs(t *testing.T, txmp *TxMempool, numTxs int, peerID uint16) []testTx { - txs := make([]testTx, numTxs) - txInfo := mempool.TxInfo{SenderID: peerID} - - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - - for i := 0; i < numTxs; i++ { - prefix := make([]byte, 20) - _, err := rng.Read(prefix) - require.NoError(t, err) - - priority := int64(rng.Intn(9999-1000) + 1000) - - txs[i] = testTx{ - tx: []byte(fmt.Sprintf("sender-%d-%d=%X=%d", i, peerID, prefix, priority)), - priority: priority, - } - require.NoError(t, txmp.CheckTx(txs[i].tx, nil, txInfo)) - } - - return txs -} - -func TestTxMempool_TxsAvailable(t *testing.T) { - txmp := setup(t, 0) - txmp.EnableTxsAvailable() - - ensureNoTxFire := func() { - timer := time.NewTimer(500 * time.Millisecond) - select { - case <-txmp.TxsAvailable(): - require.Fail(t, "unexpected transactions event") - case <-timer.C: - } - } - - ensureTxFire := func() { - timer := time.NewTimer(500 * time.Millisecond) - select { - case <-txmp.TxsAvailable(): - case <-timer.C: - require.Fail(t, "expected transactions event") - } - } - - // ensure no event as we have not executed any transactions yet - ensureNoTxFire() - - // Execute CheckTx for some transactions and ensure TxsAvailable only fires - // once. - txs := checkTxs(t, txmp, 100, 0) - ensureTxFire() - ensureNoTxFire() - - rawTxs := make([]types.Tx, len(txs)) - for i, tx := range txs { - rawTxs[i] = tx.tx - } - - responses := make([]*abci.ResponseDeliverTx, len(rawTxs[:50])) - for i := 0; i < len(responses); i++ { - responses[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK} - } - - // commit half the transactions and ensure we fire an event - txmp.Lock() - require.NoError(t, txmp.Update(1, rawTxs[:50], responses, nil, nil)) - txmp.Unlock() - ensureTxFire() - ensureNoTxFire() - - // Execute CheckTx for more transactions and ensure we do not fire another - // event as we're still on the same height (1). - _ = checkTxs(t, txmp, 100, 0) - ensureNoTxFire() -} - -func TestTxMempool_Size(t *testing.T) { - txmp := setup(t, 0) - txs := checkTxs(t, txmp, 100, 0) - require.Equal(t, len(txs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - - rawTxs := make([]types.Tx, len(txs)) - for i, tx := range txs { - rawTxs[i] = tx.tx - } - - responses := make([]*abci.ResponseDeliverTx, len(rawTxs[:50])) - for i := 0; i < len(responses); i++ { - responses[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK} - } - - txmp.Lock() - require.NoError(t, txmp.Update(1, rawTxs[:50], responses, nil, nil)) - txmp.Unlock() - - require.Equal(t, len(rawTxs)/2, txmp.Size()) - require.Equal(t, int64(2850), txmp.SizeBytes()) -} - -func TestTxMempool_Eviction(t *testing.T) { - txmp := setup(t, 1000) - txmp.config.Size = 5 - txmp.config.MaxTxsBytes = 60 - txExists := func(spec string) bool { - txmp.Lock() - defer txmp.Unlock() - key := types.Tx(spec).Key() - _, ok := txmp.txByKey[key] - return ok - } - - // A transaction bigger than the mempool should be rejected even when there - // are slots available. - mustCheckTx(t, txmp, "big=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef=1") - require.Equal(t, 0, txmp.Size()) - - // Nearly-fill the mempool with a low-priority transaction, to show that it - // is evicted even when slots are available for a higher-priority tx. - const bigTx = "big=0123456789abcdef0123456789abcdef0123456789abcdef01234=2" - mustCheckTx(t, txmp, bigTx) - require.Equal(t, 1, txmp.Size()) // bigTx is the only element - require.True(t, txExists(bigTx)) - require.Equal(t, int64(len(bigTx)), txmp.SizeBytes()) - - // The next transaction should evict bigTx, because it is higher priority - // but does not fit on size. - mustCheckTx(t, txmp, "key1=0000=25") - require.True(t, txExists("key1=0000=25")) - require.False(t, txExists(bigTx)) - require.False(t, txmp.cache.Has([]byte(bigTx))) - require.Equal(t, int64(len("key1=0000=25")), txmp.SizeBytes()) - - // Now fill up the rest of the slots with other transactions. - mustCheckTx(t, txmp, "key2=0001=5") - mustCheckTx(t, txmp, "key3=0002=10") - mustCheckTx(t, txmp, "key4=0003=3") - mustCheckTx(t, txmp, "key5=0004=3") - - // A new transaction with low priority should be discarded. - mustCheckTx(t, txmp, "key6=0005=1") - require.False(t, txExists("key6=0005=1")) - - // A new transaction with higher priority should evict key5, which is the - // newest of the two transactions with lowest priority. - mustCheckTx(t, txmp, "key7=0006=7") - require.True(t, txExists("key7=0006=7")) // new transaction added - require.False(t, txExists("key5=0004=3")) // newest low-priority tx evicted - require.True(t, txExists("key4=0003=3")) // older low-priority tx retained - - // Another new transaction evicts the other low-priority element. - mustCheckTx(t, txmp, "key8=0007=20") - require.True(t, txExists("key8=0007=20")) - require.False(t, txExists("key4=0003=3")) - - // Now the lowest-priority tx is 5, so that should be the next to go. - mustCheckTx(t, txmp, "key9=0008=9") - require.True(t, txExists("key9=0008=9")) - require.False(t, txExists("k3y2=0001=5")) - - // Add a transaction that requires eviction of multiple lower-priority - // entries, in order to fit the size of the element. - mustCheckTx(t, txmp, "key10=0123456789abcdef=11") // evict 10, 9, 7; keep 25, 20, 11 - require.True(t, txExists("key1=0000=25")) - require.True(t, txExists("key8=0007=20")) - require.True(t, txExists("key10=0123456789abcdef=11")) - require.False(t, txExists("key3=0002=10")) - require.False(t, txExists("key9=0008=9")) - require.False(t, txExists("key7=0006=7")) -} - -func TestTxMempool_Flush(t *testing.T) { - txmp := setup(t, 0) - txs := checkTxs(t, txmp, 100, 0) - require.Equal(t, len(txs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - - rawTxs := make([]types.Tx, len(txs)) - for i, tx := range txs { - rawTxs[i] = tx.tx - } - - responses := make([]*abci.ResponseDeliverTx, len(rawTxs[:50])) - for i := 0; i < len(responses); i++ { - responses[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK} - } - - txmp.Lock() - require.NoError(t, txmp.Update(1, rawTxs[:50], responses, nil, nil)) - txmp.Unlock() - - txmp.Flush() - require.Zero(t, txmp.Size()) - require.Equal(t, int64(0), txmp.SizeBytes()) -} - -func TestTxMempool_ReapMaxBytesMaxGas(t *testing.T) { - txmp := setup(t, 0) - tTxs := checkTxs(t, txmp, 100, 0) // all txs request 1 gas unit - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - - txMap := make(map[types.TxKey]testTx) - priorities := make([]int64, len(tTxs)) - for i, tTx := range tTxs { - txMap[tTx.tx.Key()] = tTx - priorities[i] = tTx.priority - } - - sort.Slice(priorities, func(i, j int) bool { - // sort by priority, i.e. decreasing order - return priorities[i] > priorities[j] - }) - - ensurePrioritized := func(reapedTxs types.Txs) { - reapedPriorities := make([]int64, len(reapedTxs)) - for i, rTx := range reapedTxs { - reapedPriorities[i] = txMap[rTx.Key()].priority - } - - require.Equal(t, priorities[:len(reapedPriorities)], reapedPriorities) - } - - // reap by gas capacity only - reapedTxs := txmp.ReapMaxBytesMaxGas(-1, 50) - ensurePrioritized(reapedTxs) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - require.Len(t, reapedTxs, 50) - - // reap by transaction bytes only - reapedTxs = txmp.ReapMaxBytesMaxGas(1000, -1) - ensurePrioritized(reapedTxs) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - require.GreaterOrEqual(t, len(reapedTxs), 16) - - // Reap by both transaction bytes and gas, where the size yields 31 reaped - // transactions and the gas limit reaps 25 transactions. - reapedTxs = txmp.ReapMaxBytesMaxGas(1500, 30) - ensurePrioritized(reapedTxs) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - require.Len(t, reapedTxs, 25) -} - -func TestTxMempool_ReapMaxTxs(t *testing.T) { - txmp := setup(t, 0) - tTxs := checkTxs(t, txmp, 100, 0) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - - txMap := make(map[types.TxKey]testTx) - priorities := make([]int64, len(tTxs)) - for i, tTx := range tTxs { - txMap[tTx.tx.Key()] = tTx - priorities[i] = tTx.priority - } - - sort.Slice(priorities, func(i, j int) bool { - // sort by priority, i.e. decreasing order - return priorities[i] > priorities[j] - }) - - ensurePrioritized := func(reapedTxs types.Txs) { - reapedPriorities := make([]int64, len(reapedTxs)) - for i, rTx := range reapedTxs { - reapedPriorities[i] = txMap[rTx.Key()].priority - } - - require.Equal(t, priorities[:len(reapedPriorities)], reapedPriorities) - } - - // reap all transactions - reapedTxs := txmp.ReapMaxTxs(-1) - ensurePrioritized(reapedTxs) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - require.Len(t, reapedTxs, len(tTxs)) - - // reap a single transaction - reapedTxs = txmp.ReapMaxTxs(1) - ensurePrioritized(reapedTxs) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - require.Len(t, reapedTxs, 1) - - // reap half of the transactions - reapedTxs = txmp.ReapMaxTxs(len(tTxs) / 2) - ensurePrioritized(reapedTxs) - require.Equal(t, len(tTxs), txmp.Size()) - require.Equal(t, int64(5690), txmp.SizeBytes()) - require.Len(t, reapedTxs, len(tTxs)/2) -} - -func TestTxMempool_CheckTxExceedsMaxSize(t *testing.T) { - txmp := setup(t, 0) - - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - tx := make([]byte, txmp.config.MaxTxBytes+1) - _, err := rng.Read(tx) - require.NoError(t, err) - - require.Error(t, txmp.CheckTx(tx, nil, mempool.TxInfo{SenderID: 0})) - - tx = make([]byte, txmp.config.MaxTxBytes-1) - _, err = rng.Read(tx) - require.NoError(t, err) - - require.NoError(t, txmp.CheckTx(tx, nil, mempool.TxInfo{SenderID: 0})) -} - -func TestTxMempool_CheckTxSamePeer(t *testing.T) { - txmp := setup(t, 100) - peerID := uint16(1) - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - - prefix := make([]byte, 20) - _, err := rng.Read(prefix) - require.NoError(t, err) - - tx := []byte(fmt.Sprintf("sender-0=%X=%d", prefix, 50)) - - require.NoError(t, txmp.CheckTx(tx, nil, mempool.TxInfo{SenderID: peerID})) - require.Error(t, txmp.CheckTx(tx, nil, mempool.TxInfo{SenderID: peerID})) -} - -func TestTxMempool_CheckTxSameSender(t *testing.T) { - txmp := setup(t, 100) - peerID := uint16(1) - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - - prefix1 := make([]byte, 20) - _, err := rng.Read(prefix1) - require.NoError(t, err) - - prefix2 := make([]byte, 20) - _, err = rng.Read(prefix2) - require.NoError(t, err) - - tx1 := []byte(fmt.Sprintf("sender-0=%X=%d", prefix1, 50)) - tx2 := []byte(fmt.Sprintf("sender-0=%X=%d", prefix2, 50)) - - require.NoError(t, txmp.CheckTx(tx1, nil, mempool.TxInfo{SenderID: peerID})) - require.Equal(t, 1, txmp.Size()) - require.NoError(t, txmp.CheckTx(tx2, nil, mempool.TxInfo{SenderID: peerID})) - require.Equal(t, 1, txmp.Size()) -} - -func TestTxMempool_ConcurrentTxs(t *testing.T) { - txmp := setup(t, 100) - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - checkTxDone := make(chan struct{}) - - var wg sync.WaitGroup - - wg.Add(1) - go func() { - for i := 0; i < 20; i++ { - _ = checkTxs(t, txmp, 100, 0) - dur := rng.Intn(1000-500) + 500 - time.Sleep(time.Duration(dur) * time.Millisecond) - } - - wg.Done() - close(checkTxDone) - }() - - wg.Add(1) - go func() { - ticker := time.NewTicker(time.Second) - defer ticker.Stop() - defer wg.Done() - - var height int64 = 1 - - for range ticker.C { - reapedTxs := txmp.ReapMaxTxs(200) - if len(reapedTxs) > 0 { - responses := make([]*abci.ResponseDeliverTx, len(reapedTxs)) - for i := 0; i < len(responses); i++ { - var code uint32 - - if i%10 == 0 { - code = 100 - } else { - code = abci.CodeTypeOK - } - - responses[i] = &abci.ResponseDeliverTx{Code: code} - } - - txmp.Lock() - require.NoError(t, txmp.Update(height, reapedTxs, responses, nil, nil)) - txmp.Unlock() - - height++ - } else { - // only return once we know we finished the CheckTx loop - select { - case <-checkTxDone: - return - default: - } - } - } - }() - - wg.Wait() - require.Zero(t, txmp.Size()) - require.Zero(t, txmp.SizeBytes()) -} - -func TestTxMempool_ExpiredTxs_Timestamp(t *testing.T) { - txmp := setup(t, 5000) - txmp.config.TTLDuration = 5 * time.Millisecond - - added1 := checkTxs(t, txmp, 10, 0) - require.Equal(t, len(added1), txmp.Size()) - - // Wait a while, then add some more transactions that should not be expired - // when the first batch TTLs out. - // - // ms: 0 1 2 3 4 5 6 - // ^ ^ ^ ^ - // | | | +-- Update (triggers pruning) - // | | +------ first batch expires - // | +-------------- second batch added - // +-------------------------- first batch added - // - // The exact intervals are not important except that the delta should be - // large relative to the cost of CheckTx (ms vs. ns is fine here). - time.Sleep(3 * time.Millisecond) - added2 := checkTxs(t, txmp, 10, 1) - - // Wait a while longer, so that the first batch will expire. - time.Sleep(3 * time.Millisecond) - - // Trigger an update so that pruning will occur. - txmp.Lock() - defer txmp.Unlock() - require.NoError(t, txmp.Update(txmp.height+1, nil, nil, nil, nil)) - - // All the transactions in the original set should have been purged. - for _, tx := range added1 { - if _, ok := txmp.txByKey[tx.tx.Key()]; ok { - t.Errorf("Transaction %X should have been purged for TTL", tx.tx.Key()) - } - if txmp.cache.Has(tx.tx) { - t.Errorf("Transaction %X should have been removed from the cache", tx.tx.Key()) - } - } - - // All the transactions added later should still be around. - for _, tx := range added2 { - if _, ok := txmp.txByKey[tx.tx.Key()]; !ok { - t.Errorf("Transaction %X should still be in the mempool, but is not", tx.tx.Key()) - } - } -} - -func TestTxMempool_ExpiredTxs_NumBlocks(t *testing.T) { - txmp := setup(t, 500) - txmp.height = 100 - txmp.config.TTLNumBlocks = 10 - - tTxs := checkTxs(t, txmp, 100, 0) - require.Equal(t, len(tTxs), txmp.Size()) - - // reap 5 txs at the next height -- no txs should expire - reapedTxs := txmp.ReapMaxTxs(5) - responses := make([]*abci.ResponseDeliverTx, len(reapedTxs)) - for i := 0; i < len(responses); i++ { - responses[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK} - } - - txmp.Lock() - require.NoError(t, txmp.Update(txmp.height+1, reapedTxs, responses, nil, nil)) - txmp.Unlock() - - require.Equal(t, 95, txmp.Size()) - - // check more txs at height 101 - _ = checkTxs(t, txmp, 50, 1) - require.Equal(t, 145, txmp.Size()) - - // Reap 5 txs at a height that would expire all the transactions from before - // the previous Update (height 100). - // - // NOTE: When we reap txs below, we do not know if we're picking txs from the - // initial CheckTx calls or from the second round of CheckTx calls. Thus, we - // cannot guarantee that all 95 txs are remaining that should be expired and - // removed. However, we do know that that at most 95 txs can be expired and - // removed. - reapedTxs = txmp.ReapMaxTxs(5) - responses = make([]*abci.ResponseDeliverTx, len(reapedTxs)) - for i := 0; i < len(responses); i++ { - responses[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK} - } - - txmp.Lock() - require.NoError(t, txmp.Update(txmp.height+10, reapedTxs, responses, nil, nil)) - txmp.Unlock() - - require.GreaterOrEqual(t, txmp.Size(), 45) -} - -func TestTxMempool_CheckTxPostCheckError(t *testing.T) { - cases := []struct { - name string - err error - }{ - { - name: "error", - err: errors.New("test error"), - }, - { - name: "no error", - err: nil, - }, - } - for _, tc := range cases { - testCase := tc - t.Run(testCase.name, func(t *testing.T) { - postCheckFn := func(_ types.Tx, _ *abci.ResponseCheckTx) error { - return testCase.err - } - txmp := setup(t, 0, WithPostCheck(postCheckFn)) - rng := rand.New(rand.NewSource(time.Now().UnixNano())) - tx := make([]byte, txmp.config.MaxTxBytes-1) - _, err := rng.Read(tx) - require.NoError(t, err) - - callback := func(res *abci.Response) { - checkTxRes, ok := res.Value.(*abci.Response_CheckTx) - require.True(t, ok) - expectedErrString := "" - if testCase.err != nil { - expectedErrString = testCase.err.Error() - } - require.Equal(t, expectedErrString, checkTxRes.CheckTx.MempoolError) - } - require.NoError(t, txmp.CheckTx(tx, callback, mempool.TxInfo{SenderID: 0})) - }) - } -} diff --git a/mempool/v1/reactor.go b/mempool/v1/reactor.go deleted file mode 100644 index 406070460e7..00000000000 --- a/mempool/v1/reactor.go +++ /dev/null @@ -1,281 +0,0 @@ -package v1 - -import ( - "errors" - "fmt" - "time" - - cfg "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/libs/clist" - "github.com/cometbft/cometbft/libs/log" - cmtsync "github.com/cometbft/cometbft/libs/sync" - "github.com/cometbft/cometbft/mempool" - "github.com/cometbft/cometbft/p2p" - protomem "github.com/cometbft/cometbft/proto/tendermint/mempool" - "github.com/cometbft/cometbft/types" -) - -// Reactor handles mempool tx broadcasting amongst peers. -// It maintains a map from peer ID to counter, to prevent gossiping txs to the -// peers you received it from. -type Reactor struct { - p2p.BaseReactor - config *cfg.MempoolConfig - mempool *TxMempool - ids *mempoolIDs -} - -type mempoolIDs struct { - mtx cmtsync.RWMutex - peerMap map[p2p.ID]uint16 - nextID uint16 // assumes that a node will never have over 65536 active peers - activeIDs map[uint16]struct{} // used to check if a given peerID key is used, the value doesn't matter -} - -// Reserve searches for the next unused ID and assigns it to the -// peer. -func (ids *mempoolIDs) ReserveForPeer(peer p2p.Peer) { - ids.mtx.Lock() - defer ids.mtx.Unlock() - - curID := ids.nextPeerID() - ids.peerMap[peer.ID()] = curID - ids.activeIDs[curID] = struct{}{} -} - -// nextPeerID returns the next unused peer ID to use. -// This assumes that ids's mutex is already locked. -func (ids *mempoolIDs) nextPeerID() uint16 { - if len(ids.activeIDs) == mempool.MaxActiveIDs { - panic(fmt.Sprintf("node has maximum %d active IDs and wanted to get one more", mempool.MaxActiveIDs)) - } - - _, idExists := ids.activeIDs[ids.nextID] - for idExists { - ids.nextID++ - _, idExists = ids.activeIDs[ids.nextID] - } - curID := ids.nextID - ids.nextID++ - return curID -} - -// Reclaim returns the ID reserved for the peer back to unused pool. -func (ids *mempoolIDs) Reclaim(peer p2p.Peer) { - ids.mtx.Lock() - defer ids.mtx.Unlock() - - removedID, ok := ids.peerMap[peer.ID()] - if ok { - delete(ids.activeIDs, removedID) - delete(ids.peerMap, peer.ID()) - } -} - -// GetForPeer returns an ID reserved for the peer. -func (ids *mempoolIDs) GetForPeer(peer p2p.Peer) uint16 { - ids.mtx.RLock() - defer ids.mtx.RUnlock() - - return ids.peerMap[peer.ID()] -} - -func newMempoolIDs() *mempoolIDs { - return &mempoolIDs{ - peerMap: make(map[p2p.ID]uint16), - activeIDs: map[uint16]struct{}{0: {}}, - nextID: 1, // reserve unknownPeerID(0) for mempoolReactor.BroadcastTx - } -} - -// NewReactor returns a new Reactor with the given config and mempool. -func NewReactor(config *cfg.MempoolConfig, mempool *TxMempool) *Reactor { - memR := &Reactor{ - config: config, - mempool: mempool, - ids: newMempoolIDs(), - } - memR.BaseReactor = *p2p.NewBaseReactor("Mempool", memR) - return memR -} - -// InitPeer implements Reactor by creating a state for the peer. -func (memR *Reactor) InitPeer(peer p2p.Peer) p2p.Peer { - memR.ids.ReserveForPeer(peer) - return peer -} - -// SetLogger sets the Logger on the reactor and the underlying mempool. -func (memR *Reactor) SetLogger(l log.Logger) { - memR.Logger = l -} - -// OnStart implements p2p.BaseReactor. -func (memR *Reactor) OnStart() error { - if !memR.config.Broadcast { - memR.Logger.Info("Tx broadcasting is disabled") - } - return nil -} - -// GetChannels implements Reactor by returning the list of channels for this -// reactor. -func (memR *Reactor) GetChannels() []*p2p.ChannelDescriptor { - largestTx := make([]byte, memR.config.MaxTxBytes) - batchMsg := protomem.Message{ - Sum: &protomem.Message_Txs{ - Txs: &protomem.Txs{Txs: [][]byte{largestTx}}, - }, - } - - return []*p2p.ChannelDescriptor{ - { - ID: mempool.MempoolChannel, - Priority: 5, - RecvMessageCapacity: batchMsg.Size(), - MessageType: &protomem.Message{}, - }, - } -} - -// AddPeer implements Reactor. -// It starts a broadcast routine ensuring all txs are forwarded to the given peer. -func (memR *Reactor) AddPeer(peer p2p.Peer) { - if memR.config.Broadcast { - go memR.broadcastTxRoutine(peer) - } -} - -// RemovePeer implements Reactor. -func (memR *Reactor) RemovePeer(peer p2p.Peer, reason interface{}) { - memR.ids.Reclaim(peer) - // broadcast routine checks if peer is gone and returns -} - -// Receive implements Reactor. -// It adds any received transactions to the mempool. -func (memR *Reactor) Receive(e p2p.Envelope) { - memR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) - switch msg := e.Message.(type) { - case *protomem.Txs: - protoTxs := msg.GetTxs() - if len(protoTxs) == 0 { - memR.Logger.Error("received tmpty txs from peer", "src", e.Src) - return - } - txInfo := mempool.TxInfo{SenderID: memR.ids.GetForPeer(e.Src)} - if e.Src != nil { - txInfo.SenderP2PID = e.Src.ID() - } - - var err error - for _, tx := range protoTxs { - ntx := types.Tx(tx) - err = memR.mempool.CheckTx(ntx, nil, txInfo) - if errors.Is(err, mempool.ErrTxInCache) { - memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) - } else if err != nil { - memR.Logger.Info("Could not check tx", "tx", ntx.String(), "err", err) - } - } - default: - memR.Logger.Error("unknown message type", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) - memR.Switch.StopPeerForError(e.Src, fmt.Errorf("mempool cannot handle message of type: %T", e.Message)) - return - } - - // broadcasting happens from go routines per peer -} - -// PeerState describes the state of a peer. -type PeerState interface { - GetHeight() int64 -} - -// Send new mempool txs to peer. -func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) { - peerID := memR.ids.GetForPeer(peer) - var next *clist.CElement - - for { - // In case of both next.NextWaitChan() and peer.Quit() are variable at the same time - if !memR.IsRunning() || !peer.IsRunning() { - return - } - - // This happens because the CElement we were looking at got garbage - // collected (removed). That is, .NextWait() returned nil. Go ahead and - // start from the beginning. - if next == nil { - select { - case <-memR.mempool.TxsWaitChan(): // Wait until a tx is available - if next = memR.mempool.TxsFront(); next == nil { - continue - } - - case <-peer.Quit(): - return - - case <-memR.Quit(): - return - } - } - - // Make sure the peer is up to date. - peerState, ok := peer.Get(types.PeerStateKey).(PeerState) - if !ok { - // Peer does not have a state yet. We set it in the consensus reactor, but - // when we add peer in Switch, the order we call reactors#AddPeer is - // different every time due to us using a map. Sometimes other reactors - // will be initialized before the consensus reactor. We should wait a few - // milliseconds and retry. - time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond) - continue - } - - // Allow for a lag of 1 block. - memTx := next.Value.(*WrappedTx) - if peerState.GetHeight() < memTx.height-1 { - time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond) - continue - } - - // NOTE: Transaction batching was disabled due to - // https://github.com/tendermint/tendermint/issues/5796 - if !memTx.HasPeer(peerID) { - success := peer.Send(p2p.Envelope{ - ChannelID: mempool.MempoolChannel, - Message: &protomem.Txs{Txs: [][]byte{memTx.tx}}, - }) - if !success { - time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond) - continue - } - } - - select { - case <-next.NextWaitChan(): - // see the start of the for loop for nil check - next = next.Next() - - case <-peer.Quit(): - return - - case <-memR.Quit(): - return - } - } -} - -//----------------------------------------------------------------------------- -// Messages - -// TxsMessage is a Message containing transactions. -type TxsMessage struct { - Txs []types.Tx -} - -// String returns a string representation of the TxsMessage. -func (m *TxsMessage) String() string { - return fmt.Sprintf("[TxsMessage %v]", m.Txs) -} diff --git a/mempool/v1/reactor_test.go b/mempool/v1/reactor_test.go deleted file mode 100644 index e493aad5639..00000000000 --- a/mempool/v1/reactor_test.go +++ /dev/null @@ -1,187 +0,0 @@ -package v1 - -import ( - "encoding/hex" - "os" - "sync" - "testing" - "time" - - "github.com/go-kit/log/term" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/cometbft/cometbft/abci/example/kvstore" - "github.com/cometbft/cometbft/internal/test" - - cfg "github.com/cometbft/cometbft/config" - - "github.com/cometbft/cometbft/libs/log" - "github.com/cometbft/cometbft/mempool" - "github.com/cometbft/cometbft/p2p" - memproto "github.com/cometbft/cometbft/proto/tendermint/mempool" - "github.com/cometbft/cometbft/proxy" - "github.com/cometbft/cometbft/types" -) - -const ( - numTxs = 1000 - timeout = 120 * time.Second // ridiculously high because CircleCI is slow -) - -type peerState struct { - height int64 -} - -func (ps peerState) GetHeight() int64 { - return ps.height -} - -// Send a bunch of txs to the first reactor's mempool and wait for them all to -// be received in the others. -func TestReactorBroadcastTxsMessage(t *testing.T) { - config := cfg.TestConfig() - // if there were more than two reactors, the order of transactions could not be - // asserted in waitForTxsOnReactors (due to transactions gossiping). If we - // replace Connect2Switches (full mesh) with a func, which connects first - // reactor to others and nothing else, this test should also pass with >2 reactors. - const N = 2 - reactors := makeAndConnectReactors(config, N) - defer func() { - for _, r := range reactors { - if err := r.Stop(); err != nil { - assert.NoError(t, err) - } - } - }() - for _, r := range reactors { - for _, peer := range r.Switch.Peers().List() { - peer.Set(types.PeerStateKey, peerState{1}) - } - } - - txs := checkTxs(t, reactors[0].mempool, numTxs, mempool.UnknownPeerID) - transactions := make(types.Txs, len(txs)) - for idx, tx := range txs { - transactions[idx] = tx.tx - } - - waitForTxsOnReactors(t, transactions, reactors) -} - -func TestMempoolVectors(t *testing.T) { - testCases := []struct { - testName string - tx []byte - expBytes string - }{ - {"tx 1", []byte{123}, "0a030a017b"}, - {"tx 2", []byte("proto encoding in mempool"), "0a1b0a1970726f746f20656e636f64696e6720696e206d656d706f6f6c"}, - } - - for _, tc := range testCases { - tc := tc - - msg := memproto.Message{ - Sum: &memproto.Message_Txs{ - Txs: &memproto.Txs{Txs: [][]byte{tc.tx}}, - }, - } - bz, err := msg.Marshal() - require.NoError(t, err, tc.testName) - - require.Equal(t, tc.expBytes, hex.EncodeToString(bz), tc.testName) - } -} - -func makeAndConnectReactors(config *cfg.Config, n int) []*Reactor { - reactors := make([]*Reactor, n) - logger := mempoolLogger() - for i := 0; i < n; i++ { - app := kvstore.NewApplication() - cc := proxy.NewLocalClientCreator(app) - mempool, cleanup := newMempoolWithApp(cc) - defer cleanup() - - reactors[i] = NewReactor(config.Mempool, mempool) // so we dont start the consensus states - reactors[i].SetLogger(logger.With("validator", i)) - } - - p2p.MakeConnectedSwitches(config.P2P, n, func(i int, s *p2p.Switch) *p2p.Switch { - s.AddReactor("MEMPOOL", reactors[i]) - return s - - }, p2p.Connect2Switches) - return reactors -} - -// mempoolLogger is a TestingLogger which uses a different -// color for each validator ("validator" key must exist). -func mempoolLogger() log.Logger { - return log.TestingLoggerWithColorFn(func(keyvals ...interface{}) term.FgBgColor { - for i := 0; i < len(keyvals)-1; i += 2 { - if keyvals[i] == "validator" { - return term.FgBgColor{Fg: term.Color(uint8(keyvals[i+1].(int) + 1))} - } - } - return term.FgBgColor{} - }) -} - -func newMempoolWithApp(cc proxy.ClientCreator) (*TxMempool, func()) { - conf := test.ResetTestRoot("mempool_test") - - mp, cu := newMempoolWithAppAndConfig(cc, conf) - return mp, cu -} - -func newMempoolWithAppAndConfig(cc proxy.ClientCreator, conf *cfg.Config) (*TxMempool, func()) { - appConnMem, _ := cc.NewABCIClient() - appConnMem.SetLogger(log.TestingLogger().With("module", "abci-client", "connection", "mempool")) - err := appConnMem.Start() - if err != nil { - panic(err) - } - - mp := NewTxMempool(log.TestingLogger(), conf.Mempool, appConnMem, 0) - - return mp, func() { os.RemoveAll(conf.RootDir) } -} - -func waitForTxsOnReactors(t *testing.T, txs types.Txs, reactors []*Reactor) { - // wait for the txs in all mempools - wg := new(sync.WaitGroup) - for i, reactor := range reactors { - wg.Add(1) - go func(r *Reactor, reactorIndex int) { - defer wg.Done() - waitForTxsOnReactor(t, txs, r, reactorIndex) - }(reactor, i) - } - - done := make(chan struct{}) - go func() { - wg.Wait() - close(done) - }() - - timer := time.After(timeout) - select { - case <-timer: - t.Fatal("Timed out waiting for txs") - case <-done: - } -} - -func waitForTxsOnReactor(t *testing.T, txs types.Txs, reactor *Reactor, reactorIndex int) { - mempool := reactor.mempool - for mempool.Size() < len(txs) { - time.Sleep(time.Millisecond * 100) - } - - reapedTxs := mempool.ReapMaxTxs(len(txs)) - for i, tx := range txs { - assert.Equalf(t, tx, reapedTxs[i], - "txs at index %d on reactor %d don't match: %v vs %v", i, reactorIndex, tx, reapedTxs[i]) - } -} diff --git a/mempool/v1/tx.go b/mempool/v1/tx.go deleted file mode 100644 index 3e0e6558b52..00000000000 --- a/mempool/v1/tx.go +++ /dev/null @@ -1,87 +0,0 @@ -package v1 - -import ( - "sync" - "time" - - "github.com/cometbft/cometbft/types" -) - -// WrappedTx defines a wrapper around a raw transaction with additional metadata -// that is used for indexing. -type WrappedTx struct { - tx types.Tx // the original transaction data - hash types.TxKey // the transaction hash - height int64 // height when this transaction was initially checked (for expiry) - timestamp time.Time // time when transaction was entered (for TTL) - - mtx sync.Mutex - gasWanted int64 // app: gas required to execute this transaction - priority int64 // app: priority value for this transaction - sender string // app: assigned sender label - peers map[uint16]bool // peer IDs who have sent us this transaction -} - -// Size reports the size of the raw transaction in bytes. -func (w *WrappedTx) Size() int64 { return int64(len(w.tx)) } - -// SetPeer adds the specified peer ID as a sender of w. -func (w *WrappedTx) SetPeer(id uint16) { - w.mtx.Lock() - defer w.mtx.Unlock() - if w.peers == nil { - w.peers = map[uint16]bool{id: true} - } else { - w.peers[id] = true - } -} - -// HasPeer reports whether the specified peer ID is a sender of w. -func (w *WrappedTx) HasPeer(id uint16) bool { - w.mtx.Lock() - defer w.mtx.Unlock() - _, ok := w.peers[id] - return ok -} - -// SetGasWanted sets the application-assigned gas requirement of w. -func (w *WrappedTx) SetGasWanted(gas int64) { - w.mtx.Lock() - defer w.mtx.Unlock() - w.gasWanted = gas -} - -// GasWanted reports the application-assigned gas requirement of w. -func (w *WrappedTx) GasWanted() int64 { - w.mtx.Lock() - defer w.mtx.Unlock() - return w.gasWanted -} - -// SetSender sets the application-assigned sender of w. -func (w *WrappedTx) SetSender(sender string) { - w.mtx.Lock() - defer w.mtx.Unlock() - w.sender = sender -} - -// Sender reports the application-assigned sender of w. -func (w *WrappedTx) Sender() string { - w.mtx.Lock() - defer w.mtx.Unlock() - return w.sender -} - -// SetPriority sets the application-assigned priority of w. -func (w *WrappedTx) SetPriority(p int64) { - w.mtx.Lock() - defer w.mtx.Unlock() - w.priority = p -} - -// Priority reports the application-assigned priority of w. -func (w *WrappedTx) Priority() int64 { - w.mtx.Lock() - defer w.mtx.Unlock() - return w.priority -} diff --git a/node/node_test.go b/node/node_test.go index 6df23945852..ff80774a0fa 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -24,7 +24,6 @@ import ( cmtrand "github.com/cometbft/cometbft/libs/rand" mempl "github.com/cometbft/cometbft/mempool" mempoolv0 "github.com/cometbft/cometbft/mempool/v0" - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/p2p/conn" p2pmock "github.com/cometbft/cometbft/p2p/mock" @@ -282,15 +281,6 @@ func TestCreateProposalBlock(t *testing.T) { mempoolv0.WithMetrics(memplMetrics), mempoolv0.WithPreCheck(sm.TxPreCheck(state)), mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - case cfg.MempoolV1: - mempool = mempoolv1.NewTxMempool(logger, - config.Mempool, - proxyApp.Mempool(), - state.LastBlockHeight, - mempoolv1.WithMetrics(memplMetrics), - mempoolv1.WithPreCheck(sm.TxPreCheck(state)), - mempoolv1.WithPostCheck(sm.TxPostCheck(state)), - ) } // Make EvidencePool @@ -391,15 +381,6 @@ func TestMaxProposalBlockSize(t *testing.T) { mempoolv0.WithMetrics(memplMetrics), mempoolv0.WithPreCheck(sm.TxPreCheck(state)), mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - case cfg.MempoolV1: - mempool = mempoolv1.NewTxMempool(logger, - config.Mempool, - proxyApp.Mempool(), - state.LastBlockHeight, - mempoolv1.WithMetrics(memplMetrics), - mempoolv1.WithPreCheck(sm.TxPreCheck(state)), - mempoolv1.WithPostCheck(sm.TxPostCheck(state)), - ) } blockStore := store.NewBlockStore(dbm.NewMemDB()) diff --git a/node/setup.go b/node/setup.go index 4f325124171..55c2489fed6 100644 --- a/node/setup.go +++ b/node/setup.go @@ -26,7 +26,6 @@ import ( "github.com/cometbft/cometbft/light" mempl "github.com/cometbft/cometbft/mempool" mempoolv0 "github.com/cometbft/cometbft/mempool/v0" - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/p2p/pex" "github.com/cometbft/cometbft/privval" @@ -228,28 +227,6 @@ func createMempoolAndMempoolReactor( ) (mempl.Mempool, p2p.Reactor) { logger = logger.With("module", "mempool") switch config.Mempool.Version { - case cfg.MempoolV1: - mp := mempoolv1.NewTxMempool( - logger, - config.Mempool, - proxyApp.Mempool(), - state.LastBlockHeight, - mempoolv1.WithMetrics(memplMetrics), - mempoolv1.WithPreCheck(sm.TxPreCheck(state)), - mempoolv1.WithPostCheck(sm.TxPostCheck(state)), - ) - - reactor := mempoolv1.NewReactor( - config.Mempool, - mp, - ) - if config.Consensus.WaitForTxs() { - mp.EnableTxsAvailable() - } - reactor.SetLogger(logger) - - return mp, reactor - case cfg.MempoolV0: mp := mempoolv0.NewCListMempool( config.Mempool, diff --git a/test/fuzz/mempool/v1/checktx.go b/test/fuzz/mempool/v1/checktx.go deleted file mode 100644 index 135a9e72b6d..00000000000 --- a/test/fuzz/mempool/v1/checktx.go +++ /dev/null @@ -1,37 +0,0 @@ -package v1 - -import ( - "github.com/cometbft/cometbft/abci/example/kvstore" - "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/libs/log" - mempl "github.com/cometbft/cometbft/mempool" - "github.com/cometbft/cometbft/proxy" - - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" -) - -var mempool mempl.Mempool - -func init() { - app := kvstore.NewApplication() - cc := proxy.NewLocalClientCreator(app) - appConnMem, _ := cc.NewABCIClient() - err := appConnMem.Start() - if err != nil { - panic(err) - } - cfg := config.DefaultMempoolConfig() - cfg.Broadcast = false - log := log.NewNopLogger() - mempool = mempoolv1.NewTxMempool(log, cfg, appConnMem, 0) -} - -func Fuzz(data []byte) int { - - err := mempool.CheckTx(data, nil, mempl.TxInfo{}) - if err != nil { - return 0 - } - - return 1 -} diff --git a/test/fuzz/mempool/v1/fuzz_test.go b/test/fuzz/mempool/v1/fuzz_test.go deleted file mode 100644 index 9a63491b7a7..00000000000 --- a/test/fuzz/mempool/v1/fuzz_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package v1_test - -import ( - "io" - "os" - "path/filepath" - "testing" - - "github.com/stretchr/testify/require" - - mempoolv1 "github.com/cometbft/cometbft/test/fuzz/mempool/v1" -) - -const testdataCasesDir = "testdata/cases" - -func TestMempoolTestdataCases(t *testing.T) { - entries, err := os.ReadDir(testdataCasesDir) - require.NoError(t, err) - - for _, e := range entries { - entry := e - t.Run(entry.Name(), func(t *testing.T) { - defer func() { - r := recover() - require.Nilf(t, r, "testdata/cases test panic") - }() - f, err := os.Open(filepath.Join(testdataCasesDir, entry.Name())) - require.NoError(t, err) - input, err := io.ReadAll(f) - require.NoError(t, err) - mempoolv1.Fuzz(input) - }) - } -} diff --git a/test/fuzz/mempool/v1/testdata/cases/empty b/test/fuzz/mempool/v1/testdata/cases/empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/fuzz/tests/mempool_test.go b/test/fuzz/tests/mempool_test.go index 5e6e261afe0..2a7761ba355 100644 --- a/test/fuzz/tests/mempool_test.go +++ b/test/fuzz/tests/mempool_test.go @@ -8,15 +8,13 @@ import ( abciclient "github.com/cometbft/cometbft/abci/client" "github.com/cometbft/cometbft/abci/example/kvstore" "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/libs/log" cmtsync "github.com/cometbft/cometbft/libs/sync" mempool "github.com/cometbft/cometbft/mempool" - mempoolv1 "github.com/cometbft/cometbft/mempool/v1" + mempoolv0 "github.com/cometbft/cometbft/mempool/v0" ) func FuzzMempool(f *testing.F) { app := kvstore.NewApplication() - logger := log.NewNopLogger() mtx := new(cmtsync.Mutex) conn := abciclient.NewLocalClient(mtx, app) err := conn.Start() @@ -27,7 +25,7 @@ func FuzzMempool(f *testing.F) { cfg := config.DefaultMempoolConfig() cfg.Broadcast = false - mp := mempoolv1.NewTxMempool(logger, cfg, conn, 0) + mp := mempoolv0.NewCListMempool(cfg, conn, 0) f.Fuzz(func(t *testing.T, data []byte) { _ = mp.CheckTx(data, nil, mempool.TxInfo{}) From 93a9b62a13038660142c6735494c5bc2c4914df1 Mon Sep 17 00:00:00 2001 From: hvanz Date: Fri, 3 Feb 2023 13:26:04 -0300 Subject: [PATCH 02/13] Remove all mempool versions --- config/config.go | 8 ------- config/toml.go | 5 ---- consensus/byzantine_test.go | 17 ++++---------- consensus/common_test.go | 16 +++++-------- consensus/reactor_test.go | 18 ++++++--------- node/node_test.go | 33 ++++++++++---------------- node/setup.go | 42 +++++++++++++++------------------- spec/mempool/general.md | 32 ++++++++++++++++++++++++++ test/e2e/generator/generate.go | 1 - test/e2e/networks/ci.toml | 1 - test/e2e/pkg/manifest.go | 4 ---- test/e2e/pkg/testnet.go | 7 ------ test/e2e/runner/setup.go | 3 --- 13 files changed, 80 insertions(+), 107 deletions(-) create mode 100644 spec/mempool/general.md diff --git a/config/config.go b/config/config.go index 3a267ef09cb..c7b5a24d16a 100644 --- a/config/config.go +++ b/config/config.go @@ -27,9 +27,6 @@ const ( // DefaultLogLevel defines a default log level as INFO. DefaultLogLevel = "info" - // Mempool versions. v0 is the regular and default mempool. - MempoolV0 = "v0" - DefaultTendermintDir = ".cometbft" DefaultConfigDir = "config" DefaultDataDir = "data" @@ -708,10 +705,6 @@ func DefaultFuzzConnConfig() *FuzzConnConfig { // MempoolConfig defines the configuration options for the CometBFT mempool type MempoolConfig struct { - // Mempool version to use: - // 1) "v0" - (default) FIFO mempool. - // 2) "v1" - prioritized mempool. - Version string `mapstructure:"version"` // RootDir is the root directory for all data. This should be configured via // the $CMTHOME env variable or --home cmd flag rather than overriding this // struct field. @@ -773,7 +766,6 @@ type MempoolConfig struct { // DefaultMempoolConfig returns a default configuration for the CometBFT mempool func DefaultMempoolConfig() *MempoolConfig { return &MempoolConfig{ - Version: MempoolV0, Recheck: true, Broadcast: true, WalPath: "", diff --git a/config/toml.go b/config/toml.go index 68b3041da59..5ce1098fad7 100644 --- a/config/toml.go +++ b/config/toml.go @@ -349,11 +349,6 @@ dial_timeout = "{{ .P2P.DialTimeout }}" ####################################################### [mempool] -# Mempool version to use: -# 1) "v0" - (default) FIFO mempool. -# 2) "v1" - prioritized mempool. -version = "{{ .Mempool.Version }}" - # Recheck (default: true) defines whether CometBFT should recheck the # validity for all remaining transaction in the mempool after a block. # Since a block affects the application state, some transactions in the diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index 2df6a1ccd12..18652d08340 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -20,9 +20,7 @@ import ( "github.com/cometbft/cometbft/libs/log" "github.com/cometbft/cometbft/libs/service" cmtsync "github.com/cometbft/cometbft/libs/sync" - mempl "github.com/cometbft/cometbft/mempool" - cfg "github.com/cometbft/cometbft/config" mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/p2p" cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus" @@ -70,16 +68,11 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { proxyAppConnConMem := abcicli.NewLocalClient(mtx, app) // Make Mempool - var mempool mempl.Mempool - - switch thisConfig.Mempool.Version { - case cfg.MempoolV0: - mempool = mempoolv0.NewCListMempool(config.Mempool, - proxyAppConnConMem, - state.LastBlockHeight, - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - } + mempool := mempoolv0.NewCListMempool(config.Mempool, + proxyAppConnConMem, + state.LastBlockHeight, + mempoolv0.WithPreCheck(sm.TxPreCheck(state)), + mempoolv0.WithPostCheck(sm.TxPostCheck(state))) if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() diff --git a/consensus/common_test.go b/consensus/common_test.go index a2f932a87b8..6d6d8e27da4 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -402,17 +402,13 @@ func newStateWithConfigAndBlockStore( memplMetrics := mempl.NopMetrics() // Make Mempool - var mempool mempl.Mempool + mempool := mempoolv0.NewCListMempool(config.Mempool, + proxyAppConnConMem, + state.LastBlockHeight, + mempoolv0.WithMetrics(memplMetrics), + mempoolv0.WithPreCheck(sm.TxPreCheck(state)), + mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - switch config.Mempool.Version { - case cfg.MempoolV0: - mempool = mempoolv0.NewCListMempool(config.Mempool, - proxyAppConnConMem, - state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - } if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() } diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 8c0a9ae4087..acf60e022e8 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -162,17 +162,13 @@ func TestReactorWithEvidence(t *testing.T) { proxyAppConnConMem := abcicli.NewLocalClient(mtx, app) // Make Mempool - var mempool mempl.Mempool - - switch config.Mempool.Version { - case cfg.MempoolV0: - mempool = mempoolv0.NewCListMempool(config.Mempool, - proxyAppConnConMem, - state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - } + mempool := mempoolv0.NewCListMempool(config.Mempool, + proxyAppConnConMem, + state.LastBlockHeight, + mempoolv0.WithMetrics(memplMetrics), + mempoolv0.WithPreCheck(sm.TxPreCheck(state)), + mempoolv0.WithPostCheck(sm.TxPostCheck(state))) + if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() } diff --git a/node/node_test.go b/node/node_test.go index ff80774a0fa..52cd872fc3d 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -271,17 +271,12 @@ func TestCreateProposalBlock(t *testing.T) { // Make Mempool memplMetrics := mempl.NopMetrics() - var mempool mempl.Mempool - - switch config.Mempool.Version { - case cfg.MempoolV0: - mempool = mempoolv0.NewCListMempool(config.Mempool, - proxyApp.Mempool(), - state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - } + mempool := mempoolv0.NewCListMempool(config.Mempool, + proxyApp.Mempool(), + state.LastBlockHeight, + mempoolv0.WithMetrics(memplMetrics), + mempoolv0.WithPreCheck(sm.TxPreCheck(state)), + mempoolv0.WithPostCheck(sm.TxPostCheck(state))) // Make EvidencePool evidenceDB := dbm.NewMemDB() @@ -372,16 +367,12 @@ func TestMaxProposalBlockSize(t *testing.T) { // Make Mempool memplMetrics := mempl.NopMetrics() - var mempool mempl.Mempool - switch config.Mempool.Version { - case cfg.MempoolV0: - mempool = mempoolv0.NewCListMempool(config.Mempool, - proxyApp.Mempool(), - state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) - } + mempool := mempoolv0.NewCListMempool(config.Mempool, + proxyApp.Mempool(), + state.LastBlockHeight, + mempoolv0.WithMetrics(memplMetrics), + mempoolv0.WithPreCheck(sm.TxPreCheck(state)), + mempoolv0.WithPostCheck(sm.TxPostCheck(state))) blockStore := store.NewBlockStore(dbm.NewMemDB()) diff --git a/node/setup.go b/node/setup.go index 55c2489fed6..b95078ca95d 100644 --- a/node/setup.go +++ b/node/setup.go @@ -226,33 +226,27 @@ func createMempoolAndMempoolReactor( logger log.Logger, ) (mempl.Mempool, p2p.Reactor) { logger = logger.With("module", "mempool") - switch config.Mempool.Version { - case cfg.MempoolV0: - mp := mempoolv0.NewCListMempool( - config.Mempool, - proxyApp.Mempool(), - state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state)), - ) - - mp.SetLogger(logger) - - reactor := mempoolv0.NewReactor( - config.Mempool, - mp, - ) - if config.Consensus.WaitForTxs() { - mp.EnableTxsAvailable() - } - reactor.SetLogger(logger) + mp := mempoolv0.NewCListMempool( + config.Mempool, + proxyApp.Mempool(), + state.LastBlockHeight, + mempoolv0.WithMetrics(memplMetrics), + mempoolv0.WithPreCheck(sm.TxPreCheck(state)), + mempoolv0.WithPostCheck(sm.TxPostCheck(state)), + ) - return mp, reactor + mp.SetLogger(logger) - default: - return nil, nil + reactor := mempoolv0.NewReactor( + config.Mempool, + mp, + ) + if config.Consensus.WaitForTxs() { + mp.EnableTxsAvailable() } + reactor.SetLogger(logger) + + return mp, reactor } func createEvidenceReactor(config *cfg.Config, dbProvider cfg.DBProvider, diff --git a/spec/mempool/general.md b/spec/mempool/general.md new file mode 100644 index 00000000000..71f870cdaa2 --- /dev/null +++ b/spec/mempool/general.md @@ -0,0 +1,32 @@ + +```plantuml +@startuml +skinparam componentStyle rectangle +component Peer +component App +node Node { + component "ABCI" + component "Mempool" { + [Config] + [CList] + [IDs] + [Cache] + portout in + portout out + } + component "Consensus" + component "p2p" + component "rpc" + + + Consensus --> Mempool +} + +ABCI -up-> App +Peer -up-> rpc +rpc -up-> in : Receive +out --> p2p : broadcastTx +p2p --> Peer + +@enduml +``` \ No newline at end of file diff --git a/test/e2e/generator/generate.go b/test/e2e/generator/generate.go index add1e14ce8e..38f18726c49 100644 --- a/test/e2e/generator/generate.go +++ b/test/e2e/generator/generate.go @@ -267,7 +267,6 @@ func generateNode( Database: nodeDatabases.Choose(r).(string), PrivvalProtocol: nodePrivvalProtocols.Choose(r).(string), BlockSync: nodeBlockSyncs.Choose(r).(string), - Mempool: nodeMempools.Choose(r).(string), StateSync: nodeStateSyncs.Choose(r).(bool) && startAt > 0, PersistInterval: ptrUint64(uint64(nodePersistIntervals.Choose(r).(int))), SnapshotInterval: uint64(nodeSnapshotIntervals.Choose(r).(int)), diff --git a/test/e2e/networks/ci.toml b/test/e2e/networks/ci.toml index 8040124150c..3bd498ed3ee 100644 --- a/test/e2e/networks/ci.toml +++ b/test/e2e/networks/ci.toml @@ -65,7 +65,6 @@ block_sync = "v0" start_at = 1005 # Becomes part of the validator set at 1010 persistent_peers = ["validator01", "full01"] database = "cleveldb" -mempool_version = "v1" privval_protocol = "tcp" perturb = ["kill", "pause", "disconnect", "restart"] diff --git a/test/e2e/pkg/manifest.go b/test/e2e/pkg/manifest.go index cd44ccd5398..8db582957e4 100644 --- a/test/e2e/pkg/manifest.go +++ b/test/e2e/pkg/manifest.go @@ -125,10 +125,6 @@ type ManifestNode struct { // Defaults to disabled. BlockSync string `toml:"block_sync"` - // Mempool specifies which version of mempool to use. Either "v0" or "v1" - // This defaults to v0. - Mempool string `toml:"mempool_version"` - // StateSync enables state sync. The runner automatically configures trusted // block hashes and RPC servers. At least one node in the network must have // SnapshotInterval set to non-zero, and the state syncing node must have diff --git a/test/e2e/pkg/testnet.go b/test/e2e/pkg/testnet.go index 884eb509715..9c08151691b 100644 --- a/test/e2e/pkg/testnet.go +++ b/test/e2e/pkg/testnet.go @@ -94,7 +94,6 @@ type Node struct { StartAt int64 BlockSync string StateSync bool - Mempool string Database string ABCIProtocol Protocol PrivvalProtocol Protocol @@ -196,7 +195,6 @@ func LoadTestnet(manifest Manifest, fname string, ifd InfrastructureData) (*Test PrivvalProtocol: ProtocolFile, StartAt: nodeManifest.StartAt, BlockSync: nodeManifest.BlockSync, - Mempool: nodeManifest.Mempool, StateSync: nodeManifest.StateSync, PersistInterval: 1, SnapshotInterval: nodeManifest.SnapshotInterval, @@ -343,11 +341,6 @@ func (n Node) Validate(testnet Testnet) error { default: return fmt.Errorf("invalid block sync setting %q", n.BlockSync) } - switch n.Mempool { - case "", "v0", "v1": - default: - return fmt.Errorf("invalid mempool version %q", n.Mempool) - } switch n.Database { case "goleveldb", "cleveldb", "boltdb", "rocksdb", "badgerdb": default: diff --git a/test/e2e/runner/setup.go b/test/e2e/runner/setup.go index 619bd9323d9..a39f7baf4bb 100644 --- a/test/e2e/runner/setup.go +++ b/test/e2e/runner/setup.go @@ -208,9 +208,6 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) { default: return nil, fmt.Errorf("unexpected mode %q", node.Mode) } - if node.Mempool != "" { - cfg.Mempool.Version = node.Mempool - } if node.BlockSync == "" { cfg.BlockSyncMode = false From b1c9209e654db86b09030d80321fea988c198b26 Mon Sep 17 00:00:00 2001 From: hvanz Date: Mon, 6 Feb 2023 10:38:30 -0300 Subject: [PATCH 03/13] Remove TTLDuration and TTLNumBlocks --- config/config.go | 26 ++++---------------------- config/toml.go | 16 ---------------- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/config/config.go b/config/config.go index c7b5a24d16a..b6946bc1efa 100644 --- a/config/config.go +++ b/config/config.go @@ -745,22 +745,6 @@ type MempoolConfig struct { // Including space needed by encoding (one varint per transaction). // XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 MaxBatchBytes int `mapstructure:"max_batch_bytes"` - - // TTLDuration, if non-zero, defines the maximum amount of time a transaction - // can exist for in the mempool. - // - // Note, if TTLNumBlocks is also defined, a transaction will be removed if it - // has existed in the mempool at least TTLNumBlocks number of blocks or if it's - // insertion time into the mempool is beyond TTLDuration. - TTLDuration time.Duration `mapstructure:"ttl-duration"` - - // TTLNumBlocks, if non-zero, defines the maximum number of blocks a transaction - // can exist for in the mempool. - // - // Note, if TTLDuration is also defined, a transaction will be removed if it - // has existed in the mempool at least TTLNumBlocks number of blocks or if - // it's insertion time into the mempool is beyond TTLDuration. - TTLNumBlocks int64 `mapstructure:"ttl-num-blocks"` } // DefaultMempoolConfig returns a default configuration for the CometBFT mempool @@ -771,12 +755,10 @@ func DefaultMempoolConfig() *MempoolConfig { WalPath: "", // Each signature verification takes .5ms, Size reduced until we implement // ABCI Recheck - Size: 5000, - MaxTxsBytes: 1024 * 1024 * 1024, // 1GB - CacheSize: 10000, - MaxTxBytes: 1024 * 1024, // 1MB - TTLDuration: 0 * time.Second, - TTLNumBlocks: 0, + Size: 5000, + MaxTxsBytes: 1024 * 1024 * 1024, // 1GB + CacheSize: 10000, + MaxTxBytes: 1024 * 1024, // 1MB } } diff --git a/config/toml.go b/config/toml.go index 5ce1098fad7..a6ee895e965 100644 --- a/config/toml.go +++ b/config/toml.go @@ -394,22 +394,6 @@ max_tx_bytes = {{ .Mempool.MaxTxBytes }} # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 max_batch_bytes = {{ .Mempool.MaxBatchBytes }} -# ttl-duration, if non-zero, defines the maximum amount of time a transaction -# can exist for in the mempool. -# -# Note, if ttl-num-blocks is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if it's -# insertion time into the mempool is beyond ttl-duration. -ttl-duration = "{{ .Mempool.TTLDuration }}" - -# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction -# can exist for in the mempool. -# -# Note, if ttl-duration is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if -# it's insertion time into the mempool is beyond ttl-duration. -ttl-num-blocks = {{ .Mempool.TTLNumBlocks }} - ####################################################### ### State Sync Configuration Options ### ####################################################### From 2f8ee3c2258c6682eda4f0aa7bd227a0b4ed1f94 Mon Sep 17 00:00:00 2001 From: hvanz Date: Mon, 6 Feb 2023 10:52:33 -0300 Subject: [PATCH 04/13] Remove fields in ResponseCheckTx --- abci/types/types.pb.go | 514 +++++++++++------------------- proto/tendermint/abci/types.proto | 6 - 2 files changed, 186 insertions(+), 334 deletions(-) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index f06a16f1597..b73916b5a3c 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -2122,11 +2122,6 @@ type ResponseCheckTx struct { GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` - Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` - Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` - // mempool_error is set by CometBFT. - // ABCI applictions creating a ResponseCheckTX should not set mempool_error. - MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"` } func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } @@ -2218,27 +2213,6 @@ func (m *ResponseCheckTx) GetCodespace() string { return "" } -func (m *ResponseCheckTx) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *ResponseCheckTx) GetPriority() int64 { - if m != nil { - return m.Priority - } - return 0 -} - -func (m *ResponseCheckTx) GetMempoolError() string { - if m != nil { - return m.MempoolError - } - return "" -} - type ResponseDeliverTx struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -3461,196 +3435,193 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3010 bytes of a gzipped FileDescriptorProto + // 2966 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x3b, 0x73, 0x23, 0xc7, - 0xf1, 0xc7, 0xfb, 0xd1, 0x78, 0x72, 0x8e, 0xa2, 0x70, 0xd0, 0x89, 0xa4, 0xf6, 0x4a, 0xd2, 0xdd, - 0x49, 0x22, 0xf5, 0xa7, 0xfe, 0xa7, 0x47, 0xc9, 0xb2, 0x05, 0xe0, 0x70, 0x06, 0x45, 0x8a, 0xa4, - 0x97, 0xe0, 0xa9, 0xe4, 0xc7, 0xad, 0x16, 0xd8, 0x21, 0xb1, 0x3a, 0x60, 0x77, 0xb5, 0x3b, 0xa0, - 0x40, 0x85, 0x56, 0xb9, 0xca, 0xa5, 0x72, 0xa0, 0x50, 0x89, 0x02, 0x07, 0xfe, 0x0e, 0x8e, 0x1c, - 0x39, 0x50, 0xe0, 0x40, 0x81, 0x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x39, - 0xb1, 0x34, 0x95, 0xe0, 0x66, 0x8a, 0x4e, 0x57, 0x0e, 0x48, 0xa2, 0x67, 0xa0, 0xa2, 0x5a, 0x96, - 0xe2, 0x10, 0x95, 0x60, 0xa5, 0x77, 0x41, 0xb0, 0xc3, 0xfc, 0x74, 0x51, 0x2e, 0xa9, 0x96, 0x75, - 0x4c, 0xa9, 0x4d, 0x4a, 0x44, 0x4f, 0x43, 0x99, 0xfa, 0x64, 0x5d, 0x1d, 0x2a, 0x03, 0xac, 0x9f, - 0x0d, 0x08, 0xf3, 0xc7, 0x49, 0xb9, 0x24, 0xa8, 0x1d, 0x46, 0x94, 0x34, 0x6f, 0xc7, 0x99, 0x3f, - 0x46, 0x08, 0x52, 0x9a, 0x4a, 0x54, 0x66, 0xc9, 0xa2, 0xcc, 0xda, 0x94, 0x66, 0xa9, 0x64, 0x20, - 0xec, 0xc3, 0xda, 0x68, 0x0d, 0x32, 0x42, 0x6d, 0x92, 0xa9, 0x15, 0x3d, 0xb4, 0x0a, 0x69, 0xcb, - 0x36, 0xcf, 0x31, 0xdb, 0xba, 0x9c, 0xcc, 0x3b, 0xd2, 0xc7, 0x09, 0x58, 0x99, 0xf1, 0xdc, 0x54, - 0xef, 0x40, 0x75, 0x06, 0xee, 0x58, 0xb4, 0x8d, 0x5e, 0xa6, 0x7a, 0x55, 0x0d, 0xdb, 0x22, 0xda, - 0xd5, 0x66, 0x4d, 0xdd, 0x61, 0xdf, 0x85, 0x69, 0x04, 0x37, 0xda, 0x83, 0xea, 0x50, 0x75, 0x88, - 0xc2, 0x3d, 0xa1, 0x12, 0x88, 0x7c, 0x4f, 0xcc, 0x18, 0x99, 0xfb, 0x4d, 0x7a, 0xa0, 0x85, 0x92, - 0x32, 0x15, 0xf5, 0xa9, 0xe8, 0x04, 0x56, 0x7b, 0x17, 0x1f, 0xa9, 0x06, 0xd1, 0x0d, 0xac, 0xcc, - 0xec, 0xda, 0x6c, 0x28, 0x7d, 0x5b, 0x77, 0x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x73, 0xd4, + 0xcd, 0xc2, 0x17, 0x5f, 0x6d, 0x24, 0x3e, 0xfd, 0xcb, 0x46, 0x52, 0x61, 0x12, 0xe8, 0x06, 0xf5, + 0x17, 0x9a, 0x61, 0xaa, 0x86, 0xce, 0xa6, 0x5c, 0xa4, 0xce, 0x40, 0x33, 0xcc, 0x5d, 0x1d, 0xed, + 0x83, 0xd4, 0xb7, 0x4c, 0x17, 0x9b, 0xee, 0xd8, 0x55, 0x79, 0x20, 0x10, 0xce, 0x34, 0xe2, 0x12, + 0x78, 0x78, 0x69, 0x79, 0x9c, 0x47, 0x8c, 0x51, 0xa9, 0xf6, 0xa3, 0x04, 0x74, 0x1f, 0xe0, 0x5c, + 0x1b, 0x1a, 0xba, 0x46, 0x2c, 0xc7, 0xad, 0x65, 0x36, 0xd3, 0x73, 0xfd, 0xc2, 0x03, 0x8f, 0xe5, + 0xc4, 0xd6, 0x35, 0x82, 0x9b, 0x19, 0x3a, 0x5d, 0x25, 0x24, 0x89, 0x9e, 0x85, 0xaa, 0x66, 0xdb, + 0xaa, 0x4b, 0x34, 0x82, 0xd5, 0xde, 0x05, 0xc1, 0x2e, 0xf3, 0xd3, 0x2b, 0x4a, 0x59, 0xb3, 0xed, + 0x63, 0x4a, 0x6d, 0x52, 0x22, 0x7a, 0x06, 0x2a, 0xd4, 0x27, 0x1b, 0xda, 0x50, 0x1d, 0x60, 0xe3, + 0x6c, 0x40, 0x98, 0x3f, 0x4e, 0x2b, 0x65, 0x41, 0xed, 0x30, 0xa2, 0xac, 0xfb, 0x3b, 0xce, 0xfc, + 0x31, 0x42, 0x90, 0xd1, 0x35, 0xa2, 0x31, 0x4b, 0xae, 0x28, 0xac, 0x4d, 0x69, 0xb6, 0x46, 0x06, + 0xc2, 0x3e, 0xac, 0x8d, 0xae, 0x43, 0x4e, 0xa8, 0x4d, 0x33, 0xb5, 0xa2, 0x87, 0xd6, 0x20, 0x6b, + 0x3b, 0xd6, 0x39, 0x66, 0x5b, 0x57, 0x50, 0x78, 0x47, 0xfe, 0x45, 0x0a, 0x56, 0x67, 0x3c, 0x37, + 0xd5, 0x3b, 0xd0, 0xdc, 0x81, 0x37, 0x16, 0x6d, 0xa3, 0x57, 0xa8, 0x5e, 0x4d, 0xc7, 0x8e, 0x88, + 0x76, 0xb5, 0x59, 0x53, 0x77, 0xd8, 0x77, 0x61, 0x1a, 0xc1, 0x8d, 0xf6, 0x40, 0x1a, 0x6a, 0x2e, + 0x51, 0xb9, 0x27, 0x54, 0x43, 0x91, 0xef, 0x89, 0x19, 0x23, 0x73, 0xbf, 0x49, 0x0f, 0xb4, 0x50, + 0x52, 0xa1, 0xa2, 0x01, 0x15, 0x9d, 0xc0, 0x5a, 0xef, 0xe2, 0x63, 0xcd, 0x24, 0x86, 0x89, 0xd5, + 0x99, 0x5d, 0x9b, 0x0d, 0xa5, 0xef, 0x18, 0x6e, 0x0f, 0x0f, 0xb4, 0x73, 0xc3, 0xf2, 0xa6, 0x75, + 0xcd, 0x97, 0xf7, 0x77, 0xd4, 0x95, 0x15, 0xa8, 0x44, 0x43, 0x0f, 0xaa, 0x40, 0x8a, 0x4c, 0xc4, + 0xfa, 0x53, 0x64, 0x82, 0x5e, 0x82, 0x0c, 0x5d, 0x23, 0x5b, 0x7b, 0x65, 0xce, 0x40, 0x42, 0xae, + 0x7b, 0x61, 0x63, 0x85, 0x71, 0xca, 0xb2, 0x7f, 0x1b, 0xfc, 0x70, 0x34, 0xad, 0x55, 0xbe, 0x0d, + 0xd5, 0xa9, 0x78, 0x13, 0xda, 0xbe, 0x64, 0x78, 0xfb, 0xe4, 0x2a, 0x94, 0x23, 0xc1, 0x45, 0xbe, + 0x0e, 0x6b, 0xf3, 0x62, 0x85, 0x3c, 0xf0, 0xe9, 0x11, 0x9f, 0x8f, 0xee, 0x42, 0xc1, 0x0f, 0x16, + 0xfc, 0x36, 0xde, 0x98, 0x59, 0x85, 0xc7, 0xac, 0xf8, 0xac, 0xf4, 0x1a, 0xd2, 0x53, 0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, 0xcd, 0x7a, 0xe2, 0xc7, 0xcf, 0x9d, 0x19, + 0x64, 0x30, 0xee, 0x6d, 0xf5, 0xad, 0xd1, 0x76, 0xdf, 0x1a, 0x61, 0xd2, 0x3b, 0x25, 0x41, 0x23, + 0x78, 0x58, 0xd8, 0xcb, 0xb1, 0xf8, 0xf8, 0xf2, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xa3, + 0x23, 0x6c, 0x78, 0x28, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -6106,25 +6077,6 @@ func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.MempoolError) > 0 { - i -= len(m.MempoolError) - copy(dAtA[i:], m.MempoolError) - i = encodeVarintTypes(dAtA, i, uint64(len(m.MempoolError))) - i-- - dAtA[i] = 0x5a - } - if m.Priority != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Priority)) - i-- - dAtA[i] = 0x50 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x4a - } if len(m.Codespace) > 0 { i -= len(m.Codespace) copy(dAtA[i:], m.Codespace) @@ -7998,17 +7950,6 @@ func (m *ResponseCheckTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Priority != 0 { - n += 1 + sovTypes(uint64(m.Priority)) - } - l = len(m.MempoolError) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } return n } @@ -13017,89 +12958,6 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { } m.Codespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MempoolError", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MempoolError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index cf9927d796f..6c9dff89731 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -230,12 +230,6 @@ message ResponseCheckTx { repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8; - string sender = 9; - int64 priority = 10; - - // mempool_error is set by CometBFT. - // ABCI applictions creating a ResponseCheckTX should not set mempool_error. - string mempool_error = 11; } message ResponseDeliverTx { From 4c3b9feab4f8dcc31704fccebb5e86a8402fedee Mon Sep 17 00:00:00 2001 From: hvanz Date: Mon, 6 Feb 2023 10:53:16 -0300 Subject: [PATCH 05/13] Remove unused variable --- test/e2e/generator/generate.go | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/generator/generate.go b/test/e2e/generator/generate.go index 38f18726c49..64006d6d8de 100644 --- a/test/e2e/generator/generate.go +++ b/test/e2e/generator/generate.go @@ -39,7 +39,6 @@ var ( nodePrivvalProtocols = uniformChoice{"file", "unix", "tcp"} nodeBlockSyncs = uniformChoice{"v0"} // "v2" nodeStateSyncs = uniformChoice{false, true} - nodeMempools = uniformChoice{"v0", "v1"} nodePersistIntervals = uniformChoice{0, 1, 5} nodeSnapshotIntervals = uniformChoice{0, 3} nodeRetainBlocks = uniformChoice{ From 82918db4c3b417fbf073b7079ab0382370e16bbe Mon Sep 17 00:00:00 2001 From: hvanz Date: Mon, 6 Feb 2023 16:10:58 -0300 Subject: [PATCH 06/13] Move test/fuzz/mempool/v0 --- test/fuzz/mempool/{v0 => }/checktx.go | 0 test/fuzz/mempool/{v0 => }/fuzz_test.go | 0 test/fuzz/mempool/{v0 => }/testdata/cases/empty | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename test/fuzz/mempool/{v0 => }/checktx.go (100%) rename test/fuzz/mempool/{v0 => }/fuzz_test.go (100%) rename test/fuzz/mempool/{v0 => }/testdata/cases/empty (100%) diff --git a/test/fuzz/mempool/v0/checktx.go b/test/fuzz/mempool/checktx.go similarity index 100% rename from test/fuzz/mempool/v0/checktx.go rename to test/fuzz/mempool/checktx.go diff --git a/test/fuzz/mempool/v0/fuzz_test.go b/test/fuzz/mempool/fuzz_test.go similarity index 100% rename from test/fuzz/mempool/v0/fuzz_test.go rename to test/fuzz/mempool/fuzz_test.go diff --git a/test/fuzz/mempool/v0/testdata/cases/empty b/test/fuzz/mempool/testdata/cases/empty similarity index 100% rename from test/fuzz/mempool/v0/testdata/cases/empty rename to test/fuzz/mempool/testdata/cases/empty From d4f22a53ae3b2b64c42241cb0c63c3f5f17d14db Mon Sep 17 00:00:00 2001 From: hvanz Date: Wed, 8 Feb 2023 18:05:52 -0300 Subject: [PATCH 07/13] Undo adding incorrect file --- spec/mempool/general.md | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 spec/mempool/general.md diff --git a/spec/mempool/general.md b/spec/mempool/general.md deleted file mode 100644 index 71f870cdaa2..00000000000 --- a/spec/mempool/general.md +++ /dev/null @@ -1,32 +0,0 @@ - -```plantuml -@startuml -skinparam componentStyle rectangle -component Peer -component App -node Node { - component "ABCI" - component "Mempool" { - [Config] - [CList] - [IDs] - [Cache] - portout in - portout out - } - component "Consensus" - component "p2p" - component "rpc" - - - Consensus --> Mempool -} - -ABCI -up-> App -Peer -up-> rpc -rpc -up-> in : Receive -out --> p2p : broadcastTx -p2p --> Peer - -@enduml -``` \ No newline at end of file From 7b4a651bf3ff741765f78e004b867d65ddc9a564 Mon Sep 17 00:00:00 2001 From: hvanz Date: Thu, 9 Feb 2023 10:52:59 -0300 Subject: [PATCH 08/13] Update changelog --- .../breaking-changes/260-remove-priority-mempool.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/unreleased/breaking-changes/260-remove-priority-mempool.md diff --git a/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md b/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md new file mode 100644 index 00000000000..5d793b937f3 --- /dev/null +++ b/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md @@ -0,0 +1,4 @@ +- [mempool] Remove priority mempool. + ([\#260](https://github.com/cometbft/cometbft/issues/260)) +- [config] Remove `Version` field from `MempoolConfig`. + ([\#260](https://github.com/cometbft/cometbft/issues/260)) \ No newline at end of file From 5468f8320cba9fa0cbed7d4c410f9902955d57f5 Mon Sep 17 00:00:00 2001 From: hvanz Date: Thu, 9 Feb 2023 14:18:11 -0300 Subject: [PATCH 09/13] Move makeBlocks to consensus; remove unused functions --- consensus/replay_test.go | 28 +++++++++++++++++++++++++++- internal/test/block.go | 31 ------------------------------- internal/test/commit.go | 5 ----- 3 files changed, 27 insertions(+), 37 deletions(-) diff --git a/consensus/replay_test.go b/consensus/replay_test.go index c6ed68c6de9..23dee37e527 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -904,6 +904,32 @@ func buildTMStateFromChain( return state } +func makeBlocks(n int, state sm.State, privVals []types.PrivValidator) ([]*types.Block, error) { + blockID := test.MakeBlockID() + blocks := make([]*types.Block, n) + + for i := 0; i < n; i++ { + height := state.LastBlockHeight + 1 + int64(i) + lastCommit, err := test.MakeCommit(blockID, height-1, 0, state.LastValidators, privVals, state.ChainID, state.LastBlockTime) + if err != nil { + return nil, err + } + block := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, nil, state.LastValidators.Proposer.Address) + blocks[i] = block + state.LastBlockID = blockID + state.LastBlockHeight = height + state.LastBlockTime = state.LastBlockTime.Add(1 * time.Second) + state.LastValidators = state.Validators.Copy() + state.Validators = state.NextValidators.Copy() + state.NextValidators = state.NextValidators.CopyIncrementProposerPriority(1) + state.AppHash = test.RandomHash() + + blockID = test.MakeBlockIDWithHash(block.Hash()) + } + + return blocks, nil +} + func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { // 1. Initialize CometBFT and commit 3 blocks with the following app hashes: // - 0x01 @@ -922,7 +948,7 @@ func TestHandshakePanicsIfAppReturnsWrongAppHash(t *testing.T) { genDoc, _ := sm.MakeGenesisDocFromFile(config.GenesisFile()) state.LastValidators = state.Validators.Copy() // mode = 0 for committing all the blocks - blocks, err := test.MakeBlocks(3, state, []types.PrivValidator{privVal}) + blocks, err := makeBlocks(3, state, []types.PrivValidator{privVal}) require.NoError(t, err) store.chain = blocks diff --git a/internal/test/block.go b/internal/test/block.go index d79f081002a..5889ac3517d 100644 --- a/internal/test/block.go +++ b/internal/test/block.go @@ -8,7 +8,6 @@ import ( "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/tmhash" - sm "github.com/cometbft/cometbft/state" "github.com/cometbft/cometbft/types" "github.com/cometbft/cometbft/version" ) @@ -91,33 +90,3 @@ func MakeHeader(t *testing.T, h *types.Header) *types.Header { return h } - -func MakeBlock(state sm.State) *types.Block { - return state.MakeBlock(state.LastBlockHeight+1, MakeNTxs(state.LastBlockHeight+1, 10), new(types.Commit), nil, state.NextValidators.Proposer.Address) -} - -func MakeBlocks(n int, state sm.State, privVals []types.PrivValidator) ([]*types.Block, error) { - blockID := MakeBlockID() - blocks := make([]*types.Block, n) - - for i := 0; i < n; i++ { - height := state.LastBlockHeight + 1 + int64(i) - lastCommit, err := MakeCommit(blockID, height-1, 0, state.LastValidators, privVals, state.ChainID, state.LastBlockTime) - if err != nil { - return nil, err - } - block := state.MakeBlock(height, MakeNTxs(height, 10), lastCommit, nil, state.LastValidators.Proposer.Address) - blocks[i] = block - state.LastBlockID = blockID - state.LastBlockHeight = height - state.LastBlockTime = state.LastBlockTime.Add(1 * time.Second) - state.LastValidators = state.Validators.Copy() - state.Validators = state.NextValidators.Copy() - state.NextValidators = state.NextValidators.CopyIncrementProposerPriority(1) - state.AppHash = RandomHash() - - blockID = MakeBlockIDWithHash(block.Hash()) - } - - return blocks, nil -} diff --git a/internal/test/commit.go b/internal/test/commit.go index 07b288ae661..32d35fc833d 100644 --- a/internal/test/commit.go +++ b/internal/test/commit.go @@ -5,7 +5,6 @@ import ( "time" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - sm "github.com/cometbft/cometbft/state" "github.com/cometbft/cometbft/types" ) @@ -40,10 +39,6 @@ func MakeCommitFromVoteSet(blockID types.BlockID, voteSet *types.VoteSet, valida return voteSet.MakeCommit(), nil } -func MakeVoteSet(lastState sm.State, round int32) *types.VoteSet { - return types.NewVoteSet(lastState.ChainID, lastState.LastBlockHeight+1, round, cmtproto.PrecommitType, lastState.NextValidators) -} - func MakeCommit(blockID types.BlockID, height int64, round int32, valSet *types.ValidatorSet, privVals []types.PrivValidator, chainID string, now time.Time) (*types.Commit, error) { sigs := make([]types.CommitSig, len(valSet.Validators)) for i := 0; i < len(valSet.Validators); i++ { From 3834e47926263a9e8e26bf8a506de5209cb9967d Mon Sep 17 00:00:00 2001 From: hvanz Date: Thu, 9 Feb 2023 14:21:21 -0300 Subject: [PATCH 10/13] move mempool/v0 to mempool --- consensus/byzantine_test.go | 8 +-- consensus/common_test.go | 9 ++- consensus/reactor_test.go | 9 ++- mempool/{v0 => }/bench_test.go | 13 ++-- mempool/cache_test.go | 72 ++++++++++++++++++++ mempool/{v0 => }/clist_mempool.go | 39 ++++++----- mempool/{v0 => }/clist_mempool_test.go | 93 +++++++++++++------------- mempool/{v0 => }/doc.go | 2 +- mempool/{v0 => }/reactor.go | 21 +++--- mempool/{v0 => }/reactor_test.go | 19 +++--- mempool/v0/cache_test.go | 81 ---------------------- node/node_test.go | 17 +++-- node/setup.go | 11 ++- test/fuzz/mempool/checktx.go | 5 +- test/fuzz/mempool/fuzz_test.go | 6 +- test/fuzz/tests/mempool_test.go | 3 +- 16 files changed, 194 insertions(+), 214 deletions(-) rename mempool/{v0 => }/bench_test.go (82%) rename mempool/{v0 => }/clist_mempool.go (96%) rename mempool/{v0 => }/clist_mempool_test.go (88%) rename mempool/{v0 => }/doc.go (98%) rename mempool/{v0 => }/reactor.go (92%) rename mempool/{v0 => }/reactor_test.go (94%) delete mode 100644 mempool/v0/cache_test.go diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index 18652d08340..3e3c10a34c9 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -20,8 +20,8 @@ import ( "github.com/cometbft/cometbft/libs/log" "github.com/cometbft/cometbft/libs/service" cmtsync "github.com/cometbft/cometbft/libs/sync" + mempl "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/p2p" cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -68,11 +68,11 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { proxyAppConnConMem := abcicli.NewLocalClient(mtx, app) // Make Mempool - mempool := mempoolv0.NewCListMempool(config.Mempool, + mempool := mempl.NewCListMempool(config.Mempool, proxyAppConnConMem, state.LastBlockHeight, - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) + mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state))) if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() diff --git a/consensus/common_test.go b/consensus/common_test.go index 6d6d8e27da4..8eb9175619c 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -30,7 +30,6 @@ import ( cmtpubsub "github.com/cometbft/cometbft/libs/pubsub" cmtsync "github.com/cometbft/cometbft/libs/sync" mempl "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/privval" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -402,12 +401,12 @@ func newStateWithConfigAndBlockStore( memplMetrics := mempl.NopMetrics() // Make Mempool - mempool := mempoolv0.NewCListMempool(config.Mempool, + mempool := mempl.NewCListMempool(config.Mempool, proxyAppConnConMem, state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) + mempl.WithMetrics(memplMetrics), + mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state))) if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index acf60e022e8..fed34c3f7d9 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -29,7 +29,6 @@ import ( "github.com/cometbft/cometbft/libs/log" cmtsync "github.com/cometbft/cometbft/libs/sync" mempl "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/p2p" p2pmock "github.com/cometbft/cometbft/p2p/mock" cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus" @@ -162,12 +161,12 @@ func TestReactorWithEvidence(t *testing.T) { proxyAppConnConMem := abcicli.NewLocalClient(mtx, app) // Make Mempool - mempool := mempoolv0.NewCListMempool(config.Mempool, + mempool := mempl.NewCListMempool(config.Mempool, proxyAppConnConMem, state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) + mempl.WithMetrics(memplMetrics), + mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state))) if thisConfig.Consensus.WaitForTxs() { mempool.EnableTxsAvailable() diff --git a/mempool/v0/bench_test.go b/mempool/bench_test.go similarity index 82% rename from mempool/v0/bench_test.go rename to mempool/bench_test.go index 145836269a9..60fae7dcf61 100644 --- a/mempool/v0/bench_test.go +++ b/mempool/bench_test.go @@ -1,4 +1,4 @@ -package v0 +package mempool import ( "encoding/binary" @@ -6,7 +6,6 @@ import ( "testing" "github.com/cometbft/cometbft/abci/example/kvstore" - "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/proxy" ) @@ -22,7 +21,7 @@ func BenchmarkReap(b *testing.B) { for i := 0; i < size; i++ { tx := make([]byte, 8) binary.BigEndian.PutUint64(tx, uint64(i)) - if err := mp.CheckTx(tx, nil, mempool.TxInfo{}); err != nil { + if err := mp.CheckTx(tx, nil, TxInfo{}); err != nil { b.Fatal(err) } } @@ -48,7 +47,7 @@ func BenchmarkCheckTx(b *testing.B) { binary.BigEndian.PutUint64(tx, uint64(i)) b.StartTimer() - if err := mp.CheckTx(tx, nil, mempool.TxInfo{}); err != nil { + if err := mp.CheckTx(tx, nil, TxInfo{}); err != nil { b.Fatal(err) } } @@ -72,7 +71,7 @@ func BenchmarkParallelCheckTx(b *testing.B) { for pb.Next() { tx := make([]byte, 8) binary.BigEndian.PutUint64(tx, next()) - if err := mp.CheckTx(tx, nil, mempool.TxInfo{}); err != nil { + if err := mp.CheckTx(tx, nil, TxInfo{}); err != nil { b.Fatal(err) } } @@ -90,11 +89,11 @@ func BenchmarkCheckDuplicateTx(b *testing.B) { for i := 0; i < b.N; i++ { tx := make([]byte, 8) binary.BigEndian.PutUint64(tx, uint64(i)) - if err := mp.CheckTx(tx, nil, mempool.TxInfo{}); err != nil { + if err := mp.CheckTx(tx, nil, TxInfo{}); err != nil { b.Fatal(err) } - if err := mp.CheckTx(tx, nil, mempool.TxInfo{}); err == nil { + if err := mp.CheckTx(tx, nil, TxInfo{}); err == nil { b.Fatal("tx should be duplicate") } } diff --git a/mempool/cache_test.go b/mempool/cache_test.go index 44b2beb0140..0357a9e51ea 100644 --- a/mempool/cache_test.go +++ b/mempool/cache_test.go @@ -2,8 +2,13 @@ package mempool import ( "crypto/rand" + "crypto/sha256" "testing" + "github.com/cometbft/cometbft/abci/example/kvstore" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/proxy" + "github.com/cometbft/cometbft/types" "github.com/stretchr/testify/require" ) @@ -33,3 +38,70 @@ func TestCacheRemove(t *testing.T) { require.Equal(t, numTxs-(i+1), cache.list.Len()) } } + +func TestCacheAfterUpdate(t *testing.T) { + app := kvstore.NewApplication() + cc := proxy.NewLocalClientCreator(app) + mp, cleanup := newMempoolWithApp(cc) + defer cleanup() + + // reAddIndices & txsInCache can have elements > numTxsToCreate + // also assumes max index is 255 for convenience + // txs in cache also checks order of elements + tests := []struct { + numTxsToCreate int + updateIndices []int + reAddIndices []int + txsInCache []int + }{ + {1, []int{}, []int{1}, []int{1, 0}}, // adding new txs works + {2, []int{1}, []int{}, []int{1, 0}}, // update doesn't remove tx from cache + {2, []int{2}, []int{}, []int{2, 1, 0}}, // update adds new tx to cache + {2, []int{1}, []int{1}, []int{1, 0}}, // re-adding after update doesn't make dupe + } + for tcIndex, tc := range tests { + for i := 0; i < tc.numTxsToCreate; i++ { + tx := types.Tx{byte(i)} + err := mp.CheckTx(tx, nil, TxInfo{}) + require.NoError(t, err) + } + + updateTxs := []types.Tx{} + for _, v := range tc.updateIndices { + tx := types.Tx{byte(v)} + updateTxs = append(updateTxs, tx) + } + err := mp.Update(int64(tcIndex), updateTxs, abciResponses(len(updateTxs), abci.CodeTypeOK), nil, nil) + require.NoError(t, err) + + for _, v := range tc.reAddIndices { + tx := types.Tx{byte(v)} + _ = mp.CheckTx(tx, nil, TxInfo{}) + } + + cache := mp.cache.(*LRUTxCache) + node := cache.GetList().Front() + counter := 0 + for node != nil { + require.NotEqual(t, len(tc.txsInCache), counter, + "cache larger than expected on testcase %d", tcIndex) + + nodeVal := node.Value.(types.TxKey) + expectedBz := sha256.Sum256([]byte{byte(tc.txsInCache[len(tc.txsInCache)-counter-1])}) + // Reference for reading the errors: + // >>> sha256('\x00').hexdigest() + // '6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d' + // >>> sha256('\x01').hexdigest() + // '4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a' + // >>> sha256('\x02').hexdigest() + // 'dbc1b4c900ffe48d575b5da5c638040125f65db0fe3e24494b76ea986457d986' + + require.EqualValues(t, expectedBz, nodeVal, "Equality failed on index %d, tc %d", counter, tcIndex) + counter++ + node = node.Next() + } + require.Equal(t, len(tc.txsInCache), counter, + "cache smaller than expected on testcase %d", tcIndex) + mp.Flush() + } +} diff --git a/mempool/v0/clist_mempool.go b/mempool/clist_mempool.go similarity index 96% rename from mempool/v0/clist_mempool.go rename to mempool/clist_mempool.go index 9500a3fb46d..752e016becd 100644 --- a/mempool/v0/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -1,4 +1,4 @@ -package v0 +package mempool import ( "bytes" @@ -12,7 +12,6 @@ import ( "github.com/cometbft/cometbft/libs/log" cmtmath "github.com/cometbft/cometbft/libs/math" cmtsync "github.com/cometbft/cometbft/libs/sync" - "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/types" @@ -37,8 +36,8 @@ type CListMempool struct { // Exclusive mutex for Update method to prevent concurrent execution of // CheckTx or ReapMaxBytesMaxGas(ReapMaxTxs) methods. updateMtx cmtsync.RWMutex - preCheck mempool.PreCheckFunc - postCheck mempool.PostCheckFunc + preCheck PreCheckFunc + postCheck PostCheckFunc txs *clist.CList // concurrent linked-list of good txs proxyAppConn proxy.AppConnMempool @@ -55,13 +54,13 @@ type CListMempool struct { // Keep a cache of already-seen txs. // This reduces the pressure on the proxyApp. - cache mempool.TxCache + cache TxCache logger log.Logger - metrics *mempool.Metrics + metrics *Metrics } -var _ mempool.Mempool = &CListMempool{} +var _ Mempool = &CListMempool{} // CListMempoolOption sets an optional parameter on the mempool. type CListMempoolOption func(*CListMempool) @@ -83,13 +82,13 @@ func NewCListMempool( recheckCursor: nil, recheckEnd: nil, logger: log.NewNopLogger(), - metrics: mempool.NopMetrics(), + metrics: NopMetrics(), } if cfg.CacheSize > 0 { - mp.cache = mempool.NewLRUTxCache(cfg.CacheSize) + mp.cache = NewLRUTxCache(cfg.CacheSize) } else { - mp.cache = mempool.NopTxCache{} + mp.cache = NopTxCache{} } proxyAppConn.SetResponseCallback(mp.globalCb) @@ -114,19 +113,19 @@ func (mem *CListMempool) SetLogger(l log.Logger) { // WithPreCheck sets a filter for the mempool to reject a tx if f(tx) returns // false. This is ran before CheckTx. Only applies to the first created block. // After that, Update overwrites the existing value. -func WithPreCheck(f mempool.PreCheckFunc) CListMempoolOption { +func WithPreCheck(f PreCheckFunc) CListMempoolOption { return func(mem *CListMempool) { mem.preCheck = f } } // WithPostCheck sets a filter for the mempool to reject a tx if f(tx) returns // false. This is ran after CheckTx. Only applies to the first created block. // After that, Update overwrites the existing value. -func WithPostCheck(f mempool.PostCheckFunc) CListMempoolOption { +func WithPostCheck(f PostCheckFunc) CListMempoolOption { return func(mem *CListMempool) { mem.postCheck = f } } // WithMetrics sets the metrics. -func WithMetrics(metrics *mempool.Metrics) CListMempoolOption { +func WithMetrics(metrics *Metrics) CListMempoolOption { return func(mem *CListMempool) { mem.metrics = metrics } } @@ -203,7 +202,7 @@ func (mem *CListMempool) TxsWaitChan() <-chan struct{} { func (mem *CListMempool) CheckTx( tx types.Tx, cb func(*abci.Response), - txInfo mempool.TxInfo, + txInfo TxInfo, ) error { mem.updateMtx.RLock() @@ -217,7 +216,7 @@ func (mem *CListMempool) CheckTx( } if txSize > mem.config.MaxTxBytes { - return mempool.ErrTxTooLarge{ + return ErrTxTooLarge{ Max: mem.config.MaxTxBytes, Actual: txSize, } @@ -225,7 +224,7 @@ func (mem *CListMempool) CheckTx( if mem.preCheck != nil { if err := mem.preCheck(tx); err != nil { - return mempool.ErrPreCheck{ + return ErrPreCheck{ Reason: err, } } @@ -248,7 +247,7 @@ func (mem *CListMempool) CheckTx( // its non-trivial since invalid txs can become valid, // but they can spam the same tx with little cost to them atm. } - return mempool.ErrTxInCache + return ErrTxInCache } reqRes := mem.proxyAppConn.CheckTxAsync(abci.RequestCheckTx{Tx: tx}) @@ -354,7 +353,7 @@ func (mem *CListMempool) isFull(txSize int) error { ) if memSize >= mem.config.Size || int64(txSize)+txsBytes > mem.config.MaxTxsBytes { - return mempool.ErrMempoolIsFull{ + return ErrMempoolIsFull{ NumTxs: memSize, MaxTxs: mem.config.Size, TxsBytes: txsBytes, @@ -580,8 +579,8 @@ func (mem *CListMempool) Update( height int64, txs types.Txs, deliverTxResponses []*abci.ResponseDeliverTx, - preCheck mempool.PreCheckFunc, - postCheck mempool.PostCheckFunc, + preCheck PreCheckFunc, + postCheck PostCheckFunc, ) error { // Set height mem.height = height diff --git a/mempool/v0/clist_mempool_test.go b/mempool/clist_mempool_test.go similarity index 88% rename from mempool/v0/clist_mempool_test.go rename to mempool/clist_mempool_test.go index 8a313b68b90..6da540d47e0 100644 --- a/mempool/v0/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -1,4 +1,4 @@ -package v0 +package mempool import ( "crypto/rand" @@ -25,7 +25,6 @@ import ( "github.com/cometbft/cometbft/libs/log" cmtrand "github.com/cometbft/cometbft/libs/rand" "github.com/cometbft/cometbft/libs/service" - "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/types" ) @@ -96,9 +95,9 @@ func ensureFire(t *testing.T, ch <-chan struct{}, timeoutMS int) { } } -func checkTxs(t *testing.T, mp mempool.Mempool, count int, peerID uint16) types.Txs { +func checkTxs(t *testing.T, mp Mempool, count int, peerID uint16) types.Txs { txs := make(types.Txs, count) - txInfo := mempool.TxInfo{SenderID: peerID} + txInfo := TxInfo{SenderID: peerID} for i := 0; i < count; i++ { txBytes := make([]byte, 20) txs[i] = txBytes @@ -110,7 +109,7 @@ func checkTxs(t *testing.T, mp mempool.Mempool, count int, peerID uint16) types. // Skip invalid txs. // TestMempoolFilters will fail otherwise. It asserts a number of txs // returned. - if mempool.IsPreCheckError(err) { + if IsPreCheckError(err) { continue } t.Fatalf("CheckTx failed: %v while checking #%d tx", err, i) @@ -126,7 +125,7 @@ func TestReapMaxBytesMaxGas(t *testing.T) { defer cleanup() // Ensure gas calculation behaves as expected - checkTxs(t, mp, 1, mempool.UnknownPeerID) + checkTxs(t, mp, 1, UnknownPeerID) tx0 := mp.TxsFront().Value.(*mempoolTx) // assert that kv store has gas wanted = 1. require.Equal(t, app.CheckTx(abci.RequestCheckTx{Tx: tx0.tx}).GasWanted, int64(1), "KVStore had a gas value neq to 1") @@ -160,7 +159,7 @@ func TestReapMaxBytesMaxGas(t *testing.T) { {20, 20000, 30, 20}, } for tcIndex, tt := range tests { - checkTxs(t, mp, tt.numTxsToCreate, mempool.UnknownPeerID) + checkTxs(t, mp, tt.numTxsToCreate, UnknownPeerID) got := mp.ReapMaxBytesMaxGas(tt.maxBytes, tt.maxGas) assert.Equal(t, tt.expectedNumTxs, len(got), "Got %d txs, expected %d, tc #%d", len(got), tt.expectedNumTxs, tcIndex) @@ -182,26 +181,26 @@ func TestMempoolFilters(t *testing.T) { // each tx has 20 bytes tests := []struct { numTxsToCreate int - preFilter mempool.PreCheckFunc - postFilter mempool.PostCheckFunc + preFilter PreCheckFunc + postFilter PostCheckFunc expectedNumTxs int }{ {10, nopPreFilter, nopPostFilter, 10}, - {10, mempool.PreCheckMaxBytes(10), nopPostFilter, 0}, - {10, mempool.PreCheckMaxBytes(22), nopPostFilter, 10}, - {10, nopPreFilter, mempool.PostCheckMaxGas(-1), 10}, - {10, nopPreFilter, mempool.PostCheckMaxGas(0), 0}, - {10, nopPreFilter, mempool.PostCheckMaxGas(1), 10}, - {10, nopPreFilter, mempool.PostCheckMaxGas(3000), 10}, - {10, mempool.PreCheckMaxBytes(10), mempool.PostCheckMaxGas(20), 0}, - {10, mempool.PreCheckMaxBytes(30), mempool.PostCheckMaxGas(20), 10}, - {10, mempool.PreCheckMaxBytes(22), mempool.PostCheckMaxGas(1), 10}, - {10, mempool.PreCheckMaxBytes(22), mempool.PostCheckMaxGas(0), 0}, + {10, PreCheckMaxBytes(10), nopPostFilter, 0}, + {10, PreCheckMaxBytes(22), nopPostFilter, 10}, + {10, nopPreFilter, PostCheckMaxGas(-1), 10}, + {10, nopPreFilter, PostCheckMaxGas(0), 0}, + {10, nopPreFilter, PostCheckMaxGas(1), 10}, + {10, nopPreFilter, PostCheckMaxGas(3000), 10}, + {10, PreCheckMaxBytes(10), PostCheckMaxGas(20), 0}, + {10, PreCheckMaxBytes(30), PostCheckMaxGas(20), 10}, + {10, PreCheckMaxBytes(22), PostCheckMaxGas(1), 10}, + {10, PreCheckMaxBytes(22), PostCheckMaxGas(0), 0}, } for tcIndex, tt := range tests { err := mp.Update(1, emptyTxArr, abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, tt.postFilter) require.NoError(t, err) - checkTxs(t, mp, tt.numTxsToCreate, mempool.UnknownPeerID) + checkTxs(t, mp, tt.numTxsToCreate, UnknownPeerID) require.Equal(t, tt.expectedNumTxs, mp.Size(), "mempool had the incorrect size, on test case %d", tcIndex) mp.Flush() } @@ -217,15 +216,15 @@ func TestMempoolUpdate(t *testing.T) { { err := mp.Update(1, []types.Tx{[]byte{0x01}}, abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) - err = mp.CheckTx([]byte{0x01}, nil, mempool.TxInfo{}) + err = mp.CheckTx([]byte{0x01}, nil, TxInfo{}) if assert.Error(t, err) { - assert.Equal(t, mempool.ErrTxInCache, err) + assert.Equal(t, ErrTxInCache, err) } } // 2. Removes valid txs from the mempool { - err := mp.CheckTx([]byte{0x02}, nil, mempool.TxInfo{}) + err := mp.CheckTx([]byte{0x02}, nil, TxInfo{}) require.NoError(t, err) err = mp.Update(1, []types.Tx{[]byte{0x02}}, abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) @@ -234,13 +233,13 @@ func TestMempoolUpdate(t *testing.T) { // 3. Removes invalid transactions from the cache and the mempool (if present) { - err := mp.CheckTx([]byte{0x03}, nil, mempool.TxInfo{}) + err := mp.CheckTx([]byte{0x03}, nil, TxInfo{}) require.NoError(t, err) err = mp.Update(1, []types.Tx{[]byte{0x03}}, abciResponses(1, 1), nil, nil) require.NoError(t, err) assert.Zero(t, mp.Size()) - err = mp.CheckTx([]byte{0x03}, nil, mempool.TxInfo{}) + err = mp.CheckTx([]byte{0x03}, nil, TxInfo{}) require.NoError(t, err) } } @@ -268,7 +267,7 @@ func TestMempoolUpdateDoesNotPanicWhenApplicationMissedTx(t *testing.T) { reqRes.Response = abci.ToResponseCheckTx(abci.ResponseCheckTx{Code: abci.CodeTypeOK}) mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return(reqRes, nil) - err := mp.CheckTx(tx, nil, mempool.TxInfo{}) + err := mp.CheckTx(tx, nil, TxInfo{}) require.NoError(t, err) // ensure that the callback that the mempool sets on the ReqRes is run. @@ -311,7 +310,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { b := make([]byte, 8) binary.BigEndian.PutUint64(b, 1) - err := mp.CheckTx(b, nil, mempool.TxInfo{}) + err := mp.CheckTx(b, nil, TxInfo{}) require.NoError(t, err) // simulate new block @@ -322,15 +321,15 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { require.NoError(t, err) // a must be added to the cache - err = mp.CheckTx(a, nil, mempool.TxInfo{}) + err = mp.CheckTx(a, nil, TxInfo{}) if assert.Error(t, err) { - assert.Equal(t, mempool.ErrTxInCache, err) + assert.Equal(t, ErrTxInCache, err) } // b must remain in the cache - err = mp.CheckTx(b, nil, mempool.TxInfo{}) + err = mp.CheckTx(b, nil, TxInfo{}) if assert.Error(t, err) { - assert.Equal(t, mempool.ErrTxInCache, err) + assert.Equal(t, ErrTxInCache, err) } } @@ -342,7 +341,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { // remove a from the cache to test (2) mp.cache.Remove(a) - err := mp.CheckTx(a, nil, mempool.TxInfo{}) + err := mp.CheckTx(a, nil, TxInfo{}) require.NoError(t, err) } } @@ -360,7 +359,7 @@ func TestTxsAvailable(t *testing.T) { ensureNoFire(t, mp.TxsAvailable(), timeoutMS) // send a bunch of txs, it should only fire once - txs := checkTxs(t, mp, 100, mempool.UnknownPeerID) + txs := checkTxs(t, mp, 100, UnknownPeerID) ensureFire(t, mp.TxsAvailable(), timeoutMS) ensureNoFire(t, mp.TxsAvailable(), timeoutMS) @@ -375,7 +374,7 @@ func TestTxsAvailable(t *testing.T) { ensureNoFire(t, mp.TxsAvailable(), timeoutMS) // send a bunch more txs. we already fired for this height so it shouldnt fire again - moreTxs := checkTxs(t, mp, 50, mempool.UnknownPeerID) + moreTxs := checkTxs(t, mp, 50, UnknownPeerID) ensureNoFire(t, mp.TxsAvailable(), timeoutMS) // now call update with all the txs. it should not fire as there are no txs left @@ -386,7 +385,7 @@ func TestTxsAvailable(t *testing.T) { ensureNoFire(t, mp.TxsAvailable(), timeoutMS) // send a bunch more txs, it should only fire once - checkTxs(t, mp, 100, mempool.UnknownPeerID) + checkTxs(t, mp, 100, UnknownPeerID) ensureFire(t, mp.TxsAvailable(), timeoutMS) ensureNoFire(t, mp.TxsAvailable(), timeoutMS) } @@ -411,7 +410,7 @@ func TestSerialReap(t *testing.T) { // This will succeed txBytes := make([]byte, 8) binary.BigEndian.PutUint64(txBytes, uint64(i)) - err := mp.CheckTx(txBytes, nil, mempool.TxInfo{}) + err := mp.CheckTx(txBytes, nil, TxInfo{}) _, cached := cacheMap[string(txBytes)] if cached { require.NotNil(t, err, "expected error for cached tx") @@ -421,7 +420,7 @@ func TestSerialReap(t *testing.T) { cacheMap[string(txBytes)] = struct{}{} // Duplicates are cached and should return error - err = mp.CheckTx(txBytes, nil, mempool.TxInfo{}) + err = mp.CheckTx(txBytes, nil, TxInfo{}) require.NotNil(t, err, "Expected error after CheckTx on duplicated tx") } } @@ -530,7 +529,7 @@ func TestMempool_CheckTxChecksTxSize(t *testing.T) { tx := cmtrand.Bytes(testCase.len) - err := mempl.CheckTx(tx, nil, mempool.TxInfo{}) + err := mempl.CheckTx(tx, nil, TxInfo{}) bv := gogotypes.BytesValue{Value: tx} bz, err2 := bv.Marshal() require.NoError(t, err2) @@ -539,7 +538,7 @@ func TestMempool_CheckTxChecksTxSize(t *testing.T) { if !testCase.err { require.NoError(t, err, caseString) } else { - require.Equal(t, err, mempool.ErrTxTooLarge{ + require.Equal(t, err, ErrTxTooLarge{ Max: maxTxSize, Actual: testCase.len, }, caseString) @@ -561,7 +560,7 @@ func TestMempoolTxsBytes(t *testing.T) { assert.EqualValues(t, 0, mp.SizeBytes()) // 2. len(tx) after CheckTx - err := mp.CheckTx([]byte{0x01}, nil, mempool.TxInfo{}) + err := mp.CheckTx([]byte{0x01}, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 1, mp.SizeBytes()) @@ -571,7 +570,7 @@ func TestMempoolTxsBytes(t *testing.T) { assert.EqualValues(t, 0, mp.SizeBytes()) // 4. zero after Flush - err = mp.CheckTx([]byte{0x02, 0x03}, nil, mempool.TxInfo{}) + err = mp.CheckTx([]byte{0x02, 0x03}, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 2, mp.SizeBytes()) @@ -582,13 +581,13 @@ func TestMempoolTxsBytes(t *testing.T) { err = mp.CheckTx( []byte{0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, nil, - mempool.TxInfo{}, + TxInfo{}, ) require.NoError(t, err) - err = mp.CheckTx([]byte{0x05}, nil, mempool.TxInfo{}) + err = mp.CheckTx([]byte{0x05}, nil, TxInfo{}) if assert.Error(t, err) { - assert.IsType(t, mempool.ErrMempoolIsFull{}, err) + assert.IsType(t, ErrMempoolIsFull{}, err) } // 6. zero after tx is rechecked and removed due to not being valid anymore @@ -601,7 +600,7 @@ func TestMempoolTxsBytes(t *testing.T) { txBytes := make([]byte, 8) binary.BigEndian.PutUint64(txBytes, uint64(0)) - err = mp.CheckTx(txBytes, nil, mempool.TxInfo{}) + err = mp.CheckTx(txBytes, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 8, mp.SizeBytes()) @@ -629,7 +628,7 @@ func TestMempoolTxsBytes(t *testing.T) { assert.EqualValues(t, 8, mp.SizeBytes()) // 7. Test RemoveTxByKey function - err = mp.CheckTx([]byte{0x06}, nil, mempool.TxInfo{}) + err = mp.CheckTx([]byte{0x06}, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 9, mp.SizeBytes()) assert.Error(t, mp.RemoveTxByKey(types.Tx([]byte{0x07}).Key())) @@ -675,7 +674,7 @@ func TestMempoolRemoteAppConcurrency(t *testing.T) { tx := txs[txNum] // this will err with ErrTxInCache many times ... - mp.CheckTx(tx, nil, mempool.TxInfo{SenderID: uint16(peerID)}) //nolint: errcheck // will error + mp.CheckTx(tx, nil, TxInfo{SenderID: uint16(peerID)}) //nolint: errcheck // will error } require.NoError(t, mp.FlushAppConn()) diff --git a/mempool/v0/doc.go b/mempool/doc.go similarity index 98% rename from mempool/v0/doc.go rename to mempool/doc.go index 3b5d0d20d4e..7e6363e124f 100644 --- a/mempool/v0/doc.go +++ b/mempool/doc.go @@ -20,4 +20,4 @@ // broadcastTxRoutine(). // TODO: Better handle abci client errors. (make it automatically handle connection errors) -package v0 +package mempool diff --git a/mempool/v0/reactor.go b/mempool/reactor.go similarity index 92% rename from mempool/v0/reactor.go rename to mempool/reactor.go index 8b0e1bdacb7..ae6b2522029 100644 --- a/mempool/v0/reactor.go +++ b/mempool/reactor.go @@ -1,4 +1,4 @@ -package v0 +package mempool import ( "errors" @@ -9,7 +9,6 @@ import ( "github.com/cometbft/cometbft/libs/clist" "github.com/cometbft/cometbft/libs/log" cmtsync "github.com/cometbft/cometbft/libs/sync" - "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/p2p" protomem "github.com/cometbft/cometbft/proto/tendermint/mempool" "github.com/cometbft/cometbft/types" @@ -46,8 +45,8 @@ func (ids *mempoolIDs) ReserveForPeer(peer p2p.Peer) { // nextPeerID returns the next unused peer ID to use. // This assumes that ids's mutex is already locked. func (ids *mempoolIDs) nextPeerID() uint16 { - if len(ids.activeIDs) == mempool.MaxActiveIDs { - panic(fmt.Sprintf("node has maximum %d active IDs and wanted to get one more", mempool.MaxActiveIDs)) + if len(ids.activeIDs) == MaxActiveIDs { + panic(fmt.Sprintf("node has maximum %d active IDs and wanted to get one more", MaxActiveIDs)) } _, idExists := ids.activeIDs[ids.nextID] @@ -131,7 +130,7 @@ func (memR *Reactor) GetChannels() []*p2p.ChannelDescriptor { return []*p2p.ChannelDescriptor{ { - ID: mempool.MempoolChannel, + ID: MempoolChannel, Priority: 5, RecvMessageCapacity: batchMsg.Size(), MessageType: &protomem.Message{}, @@ -164,7 +163,7 @@ func (memR *Reactor) Receive(e p2p.Envelope) { memR.Logger.Error("received empty txs from peer", "src", e.Src) return } - txInfo := mempool.TxInfo{SenderID: memR.ids.GetForPeer(e.Src)} + txInfo := TxInfo{SenderID: memR.ids.GetForPeer(e.Src)} if e.Src != nil { txInfo.SenderP2PID = e.Src.ID() } @@ -173,7 +172,7 @@ func (memR *Reactor) Receive(e p2p.Envelope) { for _, tx := range protoTxs { ntx := types.Tx(tx) err = memR.mempool.CheckTx(ntx, nil, txInfo) - if errors.Is(err, mempool.ErrTxInCache) { + if errors.Is(err, ErrTxInCache) { memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) } else if err != nil { memR.Logger.Info("Could not check tx", "tx", ntx.String(), "err", err) @@ -227,14 +226,14 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) { // different every time due to us using a map. Sometimes other reactors // will be initialized before the consensus reactor. We should wait a few // milliseconds and retry. - time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond) + time.Sleep(PeerCatchupSleepIntervalMS * time.Millisecond) continue } // Allow for a lag of 1 block. memTx := next.Value.(*mempoolTx) if peerState.GetHeight() < memTx.Height()-1 { - time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond) + time.Sleep(PeerCatchupSleepIntervalMS * time.Millisecond) continue } @@ -243,11 +242,11 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) { if _, ok := memTx.senders.Load(peerID); !ok { success := peer.Send(p2p.Envelope{ - ChannelID: mempool.MempoolChannel, + ChannelID: MempoolChannel, Message: &protomem.Txs{Txs: [][]byte{memTx.tx}}, }) if !success { - time.Sleep(mempool.PeerCatchupSleepIntervalMS * time.Millisecond) + time.Sleep(PeerCatchupSleepIntervalMS * time.Millisecond) continue } } diff --git a/mempool/v0/reactor_test.go b/mempool/reactor_test.go similarity index 94% rename from mempool/v0/reactor_test.go rename to mempool/reactor_test.go index c370c1b7a36..6407164c17d 100644 --- a/mempool/v0/reactor_test.go +++ b/mempool/reactor_test.go @@ -1,4 +1,4 @@ -package v0 +package mempool import ( "encoding/hex" @@ -18,7 +18,6 @@ import ( cfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/libs/log" cmtrand "github.com/cometbft/cometbft/libs/rand" - "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/p2p/mock" memproto "github.com/cometbft/cometbft/proto/tendermint/mempool" @@ -62,7 +61,7 @@ func TestReactorBroadcastTxsMessage(t *testing.T) { } } - txs := checkTxs(t, reactors[0].mempool, numTxs, mempool.UnknownPeerID) + txs := checkTxs(t, reactors[0].mempool, numTxs, UnknownPeerID) waitForTxsOnReactors(t, txs, reactors) } @@ -92,7 +91,7 @@ func TestReactorConcurrency(t *testing.T) { // 1. submit a bunch of txs // 2. update the whole mempool - txs := checkTxs(t, reactors[0].mempool, numTxs, mempool.UnknownPeerID) + txs := checkTxs(t, reactors[0].mempool, numTxs, UnknownPeerID) go func() { defer wg.Done() @@ -109,7 +108,7 @@ func TestReactorConcurrency(t *testing.T) { // 1. submit a bunch of txs // 2. update none - _ = checkTxs(t, reactors[1].mempool, numTxs, mempool.UnknownPeerID) + _ = checkTxs(t, reactors[1].mempool, numTxs, UnknownPeerID) go func() { defer wg.Done() @@ -171,7 +170,7 @@ func TestReactor_MaxTxBytes(t *testing.T) { // Broadcast a tx, which has the max size // => ensure it's received by the second reactor. tx1 := cmtrand.Bytes(config.Mempool.MaxTxBytes) - err := reactors[0].mempool.CheckTx(tx1, nil, mempool.TxInfo{SenderID: mempool.UnknownPeerID}) + err := reactors[0].mempool.CheckTx(tx1, nil, TxInfo{SenderID: UnknownPeerID}) require.NoError(t, err) waitForTxsOnReactors(t, []types.Tx{tx1}, reactors) @@ -181,7 +180,7 @@ func TestReactor_MaxTxBytes(t *testing.T) { // Broadcast a tx, which is beyond the max size // => ensure it's not sent tx2 := cmtrand.Bytes(config.Mempool.MaxTxBytes + 1) - err = reactors[0].mempool.CheckTx(tx2, nil, mempool.TxInfo{SenderID: mempool.UnknownPeerID}) + err = reactors[0].mempool.CheckTx(tx2, nil, TxInfo{SenderID: UnknownPeerID}) require.Error(t, err) } @@ -253,7 +252,7 @@ func TestMempoolIDsPanicsIfNodeRequestsOvermaxActiveIDs(t *testing.T) { // 0 is already reserved for UnknownPeerID ids := newMempoolIDs() - for i := 0; i < mempool.MaxActiveIDs-1; i++ { + for i := 0; i < MaxActiveIDs-1; i++ { peer := mock.NewPeer(net.IP{127, 0, 0, 1}) ids.ReserveForPeer(peer) } @@ -281,10 +280,10 @@ func TestDontExhaustMaxActiveIDs(t *testing.T) { }() reactor := reactors[0] - for i := 0; i < mempool.MaxActiveIDs+1; i++ { + for i := 0; i < MaxActiveIDs+1; i++ { peer := mock.NewPeer(nil) reactor.Receive(p2p.Envelope{ - ChannelID: mempool.MempoolChannel, + ChannelID: MempoolChannel, Src: peer, Message: &memproto.Message{}, // This uses the wrong message type on purpose to stop the peer as in an error state in the reactor. }, diff --git a/mempool/v0/cache_test.go b/mempool/v0/cache_test.go deleted file mode 100644 index c25981183d5..00000000000 --- a/mempool/v0/cache_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package v0 - -import ( - "crypto/sha256" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cometbft/cometbft/abci/example/kvstore" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/mempool" - "github.com/cometbft/cometbft/proxy" - "github.com/cometbft/cometbft/types" -) - -func TestCacheAfterUpdate(t *testing.T) { - app := kvstore.NewApplication() - cc := proxy.NewLocalClientCreator(app) - mp, cleanup := newMempoolWithApp(cc) - defer cleanup() - - // reAddIndices & txsInCache can have elements > numTxsToCreate - // also assumes max index is 255 for convenience - // txs in cache also checks order of elements - tests := []struct { - numTxsToCreate int - updateIndices []int - reAddIndices []int - txsInCache []int - }{ - {1, []int{}, []int{1}, []int{1, 0}}, // adding new txs works - {2, []int{1}, []int{}, []int{1, 0}}, // update doesn't remove tx from cache - {2, []int{2}, []int{}, []int{2, 1, 0}}, // update adds new tx to cache - {2, []int{1}, []int{1}, []int{1, 0}}, // re-adding after update doesn't make dupe - } - for tcIndex, tc := range tests { - for i := 0; i < tc.numTxsToCreate; i++ { - tx := types.Tx{byte(i)} - err := mp.CheckTx(tx, nil, mempool.TxInfo{}) - require.NoError(t, err) - } - - updateTxs := []types.Tx{} - for _, v := range tc.updateIndices { - tx := types.Tx{byte(v)} - updateTxs = append(updateTxs, tx) - } - err := mp.Update(int64(tcIndex), updateTxs, abciResponses(len(updateTxs), abci.CodeTypeOK), nil, nil) - require.NoError(t, err) - - for _, v := range tc.reAddIndices { - tx := types.Tx{byte(v)} - _ = mp.CheckTx(tx, nil, mempool.TxInfo{}) - } - - cache := mp.cache.(*mempool.LRUTxCache) - node := cache.GetList().Front() - counter := 0 - for node != nil { - require.NotEqual(t, len(tc.txsInCache), counter, - "cache larger than expected on testcase %d", tcIndex) - - nodeVal := node.Value.(types.TxKey) - expectedBz := sha256.Sum256([]byte{byte(tc.txsInCache[len(tc.txsInCache)-counter-1])}) - // Reference for reading the errors: - // >>> sha256('\x00').hexdigest() - // '6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d' - // >>> sha256('\x01').hexdigest() - // '4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a' - // >>> sha256('\x02').hexdigest() - // 'dbc1b4c900ffe48d575b5da5c638040125f65db0fe3e24494b76ea986457d986' - - require.EqualValues(t, expectedBz, nodeVal, "Equality failed on index %d, tc %d", counter, tcIndex) - counter++ - node = node.Next() - } - require.Equal(t, len(tc.txsInCache), counter, - "cache smaller than expected on testcase %d", tcIndex) - mp.Flush() - } -} diff --git a/node/node_test.go b/node/node_test.go index 52cd872fc3d..2898a3bb3e7 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -23,7 +23,6 @@ import ( "github.com/cometbft/cometbft/libs/log" cmtrand "github.com/cometbft/cometbft/libs/rand" mempl "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/p2p/conn" p2pmock "github.com/cometbft/cometbft/p2p/mock" @@ -271,12 +270,12 @@ func TestCreateProposalBlock(t *testing.T) { // Make Mempool memplMetrics := mempl.NopMetrics() - mempool := mempoolv0.NewCListMempool(config.Mempool, + mempool := mempl.NewCListMempool(config.Mempool, proxyApp.Mempool(), state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) + mempl.WithMetrics(memplMetrics), + mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state))) // Make EvidencePool evidenceDB := dbm.NewMemDB() @@ -367,12 +366,12 @@ func TestMaxProposalBlockSize(t *testing.T) { // Make Mempool memplMetrics := mempl.NopMetrics() - mempool := mempoolv0.NewCListMempool(config.Mempool, + mempool := mempl.NewCListMempool(config.Mempool, proxyApp.Mempool(), state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state))) + mempl.WithMetrics(memplMetrics), + mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state))) blockStore := store.NewBlockStore(dbm.NewMemDB()) diff --git a/node/setup.go b/node/setup.go index b95078ca95d..da847bb288d 100644 --- a/node/setup.go +++ b/node/setup.go @@ -25,7 +25,6 @@ import ( "github.com/cometbft/cometbft/libs/log" "github.com/cometbft/cometbft/light" mempl "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/p2p" "github.com/cometbft/cometbft/p2p/pex" "github.com/cometbft/cometbft/privval" @@ -226,18 +225,18 @@ func createMempoolAndMempoolReactor( logger log.Logger, ) (mempl.Mempool, p2p.Reactor) { logger = logger.With("module", "mempool") - mp := mempoolv0.NewCListMempool( + mp := mempl.NewCListMempool( config.Mempool, proxyApp.Mempool(), state.LastBlockHeight, - mempoolv0.WithMetrics(memplMetrics), - mempoolv0.WithPreCheck(sm.TxPreCheck(state)), - mempoolv0.WithPostCheck(sm.TxPostCheck(state)), + mempl.WithMetrics(memplMetrics), + mempl.WithPreCheck(sm.TxPreCheck(state)), + mempl.WithPostCheck(sm.TxPostCheck(state)), ) mp.SetLogger(logger) - reactor := mempoolv0.NewReactor( + reactor := mempl.NewReactor( config.Mempool, mp, ) diff --git a/test/fuzz/mempool/checktx.go b/test/fuzz/mempool/checktx.go index fe2d91fffbe..7f74ab4801d 100644 --- a/test/fuzz/mempool/checktx.go +++ b/test/fuzz/mempool/checktx.go @@ -1,10 +1,9 @@ -package v0 +package reactor import ( "github.com/cometbft/cometbft/abci/example/kvstore" "github.com/cometbft/cometbft/config" mempl "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" "github.com/cometbft/cometbft/proxy" ) @@ -21,7 +20,7 @@ func init() { cfg := config.DefaultMempoolConfig() cfg.Broadcast = false - mempool = mempoolv0.NewCListMempool(cfg, appConnMem, 0) + mempool = mempl.NewCListMempool(cfg, appConnMem, 0) } func Fuzz(data []byte) int { diff --git a/test/fuzz/mempool/fuzz_test.go b/test/fuzz/mempool/fuzz_test.go index bc9004d19b6..215703206cb 100644 --- a/test/fuzz/mempool/fuzz_test.go +++ b/test/fuzz/mempool/fuzz_test.go @@ -1,4 +1,4 @@ -package v0_test +package reactor_test import ( "io" @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - mempoolv0 "github.com/cometbft/cometbft/test/fuzz/mempool/v0" + mempl "github.com/cometbft/cometbft/test/fuzz/mempool" ) const testdataCasesDir = "testdata/cases" @@ -28,7 +28,7 @@ func TestMempoolTestdataCases(t *testing.T) { require.NoError(t, err) input, err := io.ReadAll(f) require.NoError(t, err) - mempoolv0.Fuzz(input) + mempl.Fuzz(input) }) } } diff --git a/test/fuzz/tests/mempool_test.go b/test/fuzz/tests/mempool_test.go index 2a7761ba355..9dc72e435fc 100644 --- a/test/fuzz/tests/mempool_test.go +++ b/test/fuzz/tests/mempool_test.go @@ -10,7 +10,6 @@ import ( "github.com/cometbft/cometbft/config" cmtsync "github.com/cometbft/cometbft/libs/sync" mempool "github.com/cometbft/cometbft/mempool" - mempoolv0 "github.com/cometbft/cometbft/mempool/v0" ) func FuzzMempool(f *testing.F) { @@ -25,7 +24,7 @@ func FuzzMempool(f *testing.F) { cfg := config.DefaultMempoolConfig() cfg.Broadcast = false - mp := mempoolv0.NewCListMempool(cfg, conn, 0) + mp := mempool.NewCListMempool(cfg, conn, 0) f.Fuzz(func(t *testing.T, data []byte) { _ = mp.CheckTx(data, nil, mempool.TxInfo{}) From c94921913e3c7858c2bffe1ef96f54622a7cd1c3 Mon Sep 17 00:00:00 2001 From: hvanz Date: Wed, 22 Feb 2023 10:28:10 +0100 Subject: [PATCH 11/13] Update UPGRADING.md --- UPGRADING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UPGRADING.md b/UPGRADING.md index c10fd5e34b4..965db0efd2e 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -10,6 +10,12 @@ This guide provides instructions for upgrading to specific versions of CometBFT. adding a list of addresses to the addressbook upon initializing a node. This is an alternative to `PersistentPeers`. `PersistentPeers` shold be only used for nodes that you want to keep a constant connection with i.e. sentry nodes +* The field `Version` in the mempool section has been removed. The priority + mempool (what was called version `v1`) has been removed (see below), thus + there is only one implementation of the mempool available (what was called + `v0`). +* Fields `TTLDuration` and `TTLNumBlocks`, which were only used by the priority + mempool, have been removed. ### ABCI Changes @@ -37,3 +43,11 @@ This guide provides instructions for upgrading to specific versions of CometBFT. guidelines](https://developers.google.com/protocol-buffers/docs/proto3#updating), this should have no effect on the wire-level encoding for UTF8-encoded strings. +* In `ResponseCheckTx`, removed fields `sender`, `priority`, and + `mempool_error`, which were only used by the priority mempool. + +### Mempool + +* The priority mempool (what was referred in the code as version `v1`) has been + removed. There is now only one mempool (what was called version `v0`), that + is, the default implementation as a queue of transactions. From 013e332b7fd2476ea0cd2a85aa82022d9e0f86ef Mon Sep 17 00:00:00 2001 From: hvanz Date: Thu, 23 Feb 2023 10:27:58 +0100 Subject: [PATCH 12/13] Revert removing proto fields; mark them as reserved --- .../260-remove-priority-mempool.md | 4 +- UPGRADING.md | 9 +- abci/types/types.pb.go | 374 +++++++++--------- proto/tendermint/abci/types.proto | 5 + 4 files changed, 201 insertions(+), 191 deletions(-) diff --git a/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md b/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md index 5d793b937f3..5800158653e 100644 --- a/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md +++ b/.changelog/unreleased/breaking-changes/260-remove-priority-mempool.md @@ -1,4 +1,6 @@ - [mempool] Remove priority mempool. ([\#260](https://github.com/cometbft/cometbft/issues/260)) - [config] Remove `Version` field from `MempoolConfig`. - ([\#260](https://github.com/cometbft/cometbft/issues/260)) \ No newline at end of file + ([\#260](https://github.com/cometbft/cometbft/issues/260)) +- [protobuf] Remove fields `sender`, `priority`, and `mempool_error` from + `ResponseCheckTx`. ([\#260](https://github.com/cometbft/cometbft/issues/260)) \ No newline at end of file diff --git a/UPGRADING.md b/UPGRADING.md index 965db0efd2e..ec71c4f057f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -14,7 +14,7 @@ This guide provides instructions for upgrading to specific versions of CometBFT. mempool (what was called version `v1`) has been removed (see below), thus there is only one implementation of the mempool available (what was called `v0`). -* Fields `TTLDuration` and `TTLNumBlocks`, which were only used by the priority +* Config fields `TTLDuration` and `TTLNumBlocks`, which were only used by the priority mempool, have been removed. ### ABCI Changes @@ -43,11 +43,12 @@ This guide provides instructions for upgrading to specific versions of CometBFT. guidelines](https://developers.google.com/protocol-buffers/docs/proto3#updating), this should have no effect on the wire-level encoding for UTF8-encoded strings. -* In `ResponseCheckTx`, removed fields `sender`, `priority`, and - `mempool_error`, which were only used by the priority mempool. -### Mempool +### Mempool Changes * The priority mempool (what was referred in the code as version `v1`) has been removed. There is now only one mempool (what was called version `v0`), that is, the default implementation as a queue of transactions. +* In the protobuf message `ResponseCheckTx`, fields `sender`, `priority`, and + `mempool_error`, which were only used by the priority mempool, were removed + but still kept in the message as "reserved". diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index b73916b5a3c..8af03693984 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -3435,193 +3435,195 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 2966 bytes of a gzipped FileDescriptorProto + // 2995 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x3b, 0x73, 0x23, 0xc7, - 0xf1, 0xc7, 0xfb, 0xd1, 0x20, 0x80, 0xe5, 0x1c, 0x75, 0xc2, 0x41, 0x27, 0x92, 0x5a, 0x95, 0xa4, - 0xbb, 0x93, 0x44, 0xea, 0x4f, 0xfd, 0x4f, 0x8f, 0x92, 0x65, 0x0b, 0xc0, 0xe1, 0x0c, 0x8a, 0x14, - 0x49, 0x2f, 0xc1, 0x53, 0xc9, 0x8f, 0x5b, 0x2d, 0xb0, 0x43, 0x62, 0x75, 0xc0, 0xee, 0x6a, 0x77, - 0x40, 0x81, 0x0a, 0xed, 0x72, 0x95, 0x4b, 0xe5, 0x40, 0xa1, 0x12, 0x05, 0x0e, 0xfc, 0x1d, 0x1c, - 0x39, 0x72, 0xa0, 0xc0, 0x81, 0x02, 0x07, 0x8e, 0x64, 0x97, 0x94, 0xf9, 0x0b, 0x38, 0x70, 0x60,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, 0x30, 0x15, 0x9b, 0x91, 0xfb, 0x6c, 0xf4, 0xdd, 0x45, 0xe4, 0xb0, 0x68, + 0xa3, 0xd7, 0x20, 0xd3, 0x33, 0x47, 0x23, 0x9d, 0x54, 0x0b, 0x4c, 0x7a, 0x3d, 0x72, 0x01, 0x8c, + 0xab, 0x1d, 0x53, 0x04, 0x3f, 0x3a, 0x80, 0xf2, 0x50, 0x77, 0x88, 0xea, 0x18, 0x9a, 0xe5, 0x0c, + 0x4c, 0xe2, 0x54, 0x8b, 0x4c, 0xc3, 0x33, 0x51, 0x1a, 0xf6, 0x75, 0x87, 0x1c, 0xbb, 0xcc, 0xed, + 0x98, 0x52, 0x1a, 0x06, 0x09, 0x54, 0x9f, 0x79, 0x7a, 0x8a, 0x6d, 0x4f, 0x61, 0xb5, 0x74, 0xb9, + 0xbe, 0x43, 0xca, 0xed, 0xca, 0x53, 0x7d, 0x66, 0x90, 0x80, 0x7e, 0x02, 0xd7, 0x86, 0xa6, 0xd6, + 0xf7, 0xd4, 0xa9, 0xbd, 0xc1, 0xd8, 0x78, 0x54, 0x2d, 0x33, 0xa5, 0xb7, 0x22, 0x27, 0x69, 0x6a, + 0x7d, 0x57, 0x45, 0x93, 0x0a, 0xb4, 0x63, 0xca, 0xca, 0x70, 0x9a, 0x88, 0x1e, 0xc2, 0xaa, 0x66, + 0x59, 0xc3, 0x8b, 0x69, 0xed, 0x15, 0xa6, 0xfd, 0x76, 0x94, 0xf6, 0x3a, 0x95, 0x99, 0x56, 0x8f, + 0xb4, 0x19, 0x2a, 0xea, 0x80, 0x64, 0xd9, 0xd8, 0xd2, 0x6c, 0xac, 0x5a, 0xb6, 0x69, 0x99, 0x8e, + 0x36, 0xac, 0x4a, 0x4c, 0xf7, 0x73, 0x51, 0xba, 0x8f, 0x38, 0xff, 0x91, 0x60, 0x6f, 0xc7, 0x94, + 0x8a, 0x15, 0x26, 0x71, 0xad, 0x66, 0x0f, 0x3b, 0x8e, 0xaf, 0x75, 0x65, 0x91, 0x56, 0xc6, 0x1f, + 0xd6, 0x1a, 0x22, 0x35, 0xb2, 0x90, 0x3e, 0xd7, 0x86, 0x63, 0x7c, 0x3f, 0x95, 0x4b, 0x49, 0x69, + 0xf9, 0x39, 0x28, 0x04, 0x1c, 0x0b, 0xaa, 0x42, 0x76, 0x84, 0x1d, 0x47, 0x3b, 0xc3, 0xcc, 0x0f, + 0xe5, 0x15, 0xb7, 0x2b, 0x97, 0xa1, 0x18, 0x74, 0x26, 0xf2, 0xa7, 0x71, 0x4f, 0x92, 0xfa, 0x09, + 0x2a, 0x79, 0x8e, 0x6d, 0x47, 0x37, 0x0d, 0x57, 0x52, 0x74, 0xd1, 0xd3, 0x50, 0x62, 0x27, 0x5e, + 0x75, 0xbf, 0x53, 0x67, 0x95, 0x52, 0x8a, 0x8c, 0xf8, 0x40, 0x30, 0x6d, 0x40, 0xc1, 0xda, 0xb1, + 0x3c, 0x96, 0x24, 0x63, 0x01, 0x6b, 0xc7, 0x72, 0x19, 0x9e, 0x82, 0x22, 0x5d, 0xa9, 0xc7, 0x91, + 0x62, 0x83, 0x14, 0x28, 0x4d, 0xb0, 0xc8, 0x7f, 0x4c, 0x80, 0x34, 0xed, 0x80, 0xd0, 0x6b, 0x90, + 0xa2, 0xbe, 0x58, 0xb8, 0xd5, 0xda, 0x16, 0x77, 0xd4, 0x5b, 0xae, 0xa3, 0xde, 0xea, 0xb8, 0x8e, + 0xba, 0x91, 0xfb, 0xe2, 0xab, 0x8d, 0xd8, 0xa7, 0x7f, 0xd9, 0x88, 0x2b, 0x4c, 0x02, 0x5d, 0xa7, + 0xfe, 0x42, 0xd3, 0x0d, 0x55, 0xef, 0xb3, 0x29, 0xe7, 0xa9, 0x33, 0xd0, 0x74, 0x63, 0xb7, 0x8f, + 0xf6, 0x41, 0xea, 0x99, 0x86, 0x83, 0x0d, 0x67, 0xec, 0xa8, 0x3c, 0x10, 0x08, 0x67, 0x1a, 0x72, + 0x09, 0x3c, 0xbc, 0x34, 0x5d, 0xce, 0x23, 0xc6, 0xa8, 0x54, 0x7a, 0x61, 0x02, 0xba, 0x07, 0x70, + 0xae, 0x0d, 0xf5, 0xbe, 0x46, 0x4c, 0xdb, 0xa9, 0xa6, 0x36, 0x93, 0x73, 0xfd, 0xc2, 0x03, 0x97, + 0xe5, 0xc4, 0xea, 0x6b, 0x04, 0x37, 0x52, 0x74, 0xba, 0x4a, 0x40, 0x12, 0x3d, 0x0b, 0x15, 0xcd, + 0xb2, 0x54, 0x87, 0x68, 0x04, 0xab, 0xdd, 0x0b, 0x82, 0x1d, 0xe6, 0xa7, 0x8b, 0x4a, 0x49, 0xb3, + 0xac, 0x63, 0x4a, 0x6d, 0x50, 0x22, 0x7a, 0x06, 0xca, 0xd4, 0x27, 0xeb, 0xda, 0x50, 0x1d, 0x60, + 0xfd, 0x6c, 0x40, 0x98, 0x3f, 0x4e, 0x2a, 0x25, 0x41, 0x6d, 0x33, 0xa2, 0xdc, 0xf7, 0x76, 0x9c, + 0xf9, 0x63, 0x84, 0x20, 0xd5, 0xd7, 0x88, 0xc6, 0x2c, 0x59, 0x54, 0x58, 0x9b, 0xd2, 0x2c, 0x8d, + 0x0c, 0x84, 0x7d, 0x58, 0x1b, 0xad, 0x41, 0x46, 0xa8, 0x4d, 0x32, 0xb5, 0xa2, 0x87, 0x56, 0x21, + 0x6d, 0xd9, 0xe6, 0x39, 0x66, 0x5b, 0x97, 0x53, 0x78, 0x47, 0xfe, 0x38, 0x01, 0x2b, 0x33, 0x9e, + 0x9b, 0xea, 0x1d, 0x68, 0xce, 0xc0, 0x1d, 0x8b, 0xb6, 0xd1, 0x2b, 0x54, 0xaf, 0xd6, 0xc7, 0xb6, + 0x88, 0x76, 0xd5, 0x59, 0x53, 0xb7, 0xd9, 0x77, 0x61, 0x1a, 0xc1, 0x8d, 0xf6, 0x40, 0x1a, 0x6a, + 0x0e, 0x51, 0xb9, 0x27, 0x54, 0x03, 0x91, 0xef, 0x89, 0x19, 0x23, 0x73, 0xbf, 0x49, 0x0f, 0xb4, + 0x50, 0x52, 0xa6, 0xa2, 0x3e, 0x15, 0x9d, 0xc0, 0x6a, 0xf7, 0xe2, 0x23, 0xcd, 0x20, 0xba, 0x81, + 0xd5, 0x99, 0x5d, 0x9b, 0x0d, 0xa5, 0x6f, 0xeb, 0x4e, 0x17, 0x0f, 0xb4, 0x73, 0xdd, 0x74, 0xa7, + 0x75, 0xcd, 0x93, 0xf7, 0x76, 0xd4, 0x91, 0x15, 0x28, 0x87, 0x43, 0x0f, 0x2a, 0x43, 0x82, 0x4c, + 0xc4, 0xfa, 0x13, 0x64, 0x82, 0x5e, 0x82, 0x14, 0x5d, 0x23, 0x5b, 0x7b, 0x79, 0xce, 0x40, 0x42, + 0xae, 0x73, 0x61, 0x61, 0x85, 0x71, 0xca, 0xb2, 0x77, 0x1b, 0xbc, 0x70, 0x34, 0xad, 0x55, 0xbe, + 0x05, 0x95, 0xa9, 0x78, 0x13, 0xd8, 0xbe, 0x78, 0x70, 0xfb, 0xe4, 0x0a, 0x94, 0x42, 0xc1, 0x45, + 0x5e, 0x83, 0xd5, 0x79, 0xb1, 0x42, 0x1e, 0x78, 0xf4, 0x90, 0xcf, 0x47, 0x77, 0x20, 0xe7, 0x05, + 0x0b, 0x7e, 0x1b, 0xaf, 0xcf, 0xac, 0xc2, 0x65, 0x56, 0x3c, 0x56, 0x7a, 0x0d, 0xe9, 0xa9, 0x66, + 0xc7, 0x21, 0xc1, 0x26, 0x9e, 0xd5, 0x2c, 0xab, 0xad, 0x39, 0x03, 0xf9, 0x3d, 0xa8, 0x46, 0x05, + 0x82, 0xa9, 0x65, 0xa4, 0xbc, 0x53, 0xb8, 0x06, 0x99, 0x53, 0xd3, 0x1e, 0x69, 0x84, 0x29, 0x2b, + 0x29, 0xa2, 0x47, 0x4f, 0x27, 0x0f, 0x0a, 0x49, 0x46, 0xe6, 0x1d, 0x59, 0x85, 0xeb, 0x91, 0xc1, + 0x80, 0x8a, 0xe8, 0x46, 0x1f,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bb, + 0x19, 0x16, 0x1f, 0x5f, 0xfe, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0xbb, 0x1b, 0xa2, 0x9f, + 0x28, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 6c9dff89731..83ce24fe498 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -230,6 +230,11 @@ message ResponseCheckTx { repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8; + + // These reserved fields were used until v0.37 by the priority mempool (now + // removed). + reserved 9 to 11; + reserved "sender", "priority", "mempool_error"; } message ResponseDeliverTx { From f2c67e56aa7b87993d030a43a2da771ecc87689d Mon Sep 17 00:00:00 2001 From: hvanz Date: Thu, 23 Feb 2023 12:43:01 +0100 Subject: [PATCH 13/13] Add comment about versions to MempoolConfig --- config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/config.go b/config/config.go index b6946bc1efa..ccb7e9928ae 100644 --- a/config/config.go +++ b/config/config.go @@ -704,6 +704,11 @@ func DefaultFuzzConnConfig() *FuzzConnConfig { // MempoolConfig // MempoolConfig defines the configuration options for the CometBFT mempool +// +// Note: Until v0.37 there was a `Version` field to select which implementation +// of the mempool to use. Two versions used to exist: the current, default +// implementation (previously called v0), and a prioritized mempool (v1), which +// was removed (see https://github.com/cometbft/cometbft/issues/260). type MempoolConfig struct { // RootDir is the root directory for all data. This should be configured via // the $CMTHOME env variable or --home cmd flag rather than overriding this