From 4884f7e8d79e842034984d9dbb73c8b2ec683b2e Mon Sep 17 00:00:00 2001 From: mfrankovi Date: Wed, 10 May 2023 15:05:58 +0200 Subject: [PATCH] chore: transaction pool overflow improvements --- .../consensus/include/transaction/transaction_queue.hpp | 2 +- .../core_libs/consensus/src/transaction/transaction_manager.cpp | 2 +- .../core_libs/network/include/network/tarcap/taraxa_peer.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/core_libs/consensus/include/transaction/transaction_queue.hpp b/libraries/core_libs/consensus/include/transaction/transaction_queue.hpp index 2b1d167989..eff42ef513 100644 --- a/libraries/core_libs/consensus/include/transaction/transaction_queue.hpp +++ b/libraries/core_libs/consensus/include/transaction/transaction_queue.hpp @@ -144,7 +144,7 @@ class TransactionQueue { // If transactions are dropped within last kTransactionOverflowTimeLimit seconds, dag blocks with missing transactions // will not be treated as malicious - const std::chrono::seconds kTransactionOverflowTimeLimit{300}; + const std::chrono::seconds kTransactionOverflowTimeLimit{600}; // Limit when non proposable transactions expire const size_t kNonProposableTransactionsPeriodExpiryLimit = 10; diff --git a/libraries/core_libs/consensus/src/transaction/transaction_manager.cpp b/libraries/core_libs/consensus/src/transaction/transaction_manager.cpp index 725978795b..0e1c9ce7ac 100644 --- a/libraries/core_libs/consensus/src/transaction/transaction_manager.cpp +++ b/libraries/core_libs/consensus/src/transaction/transaction_manager.cpp @@ -380,7 +380,7 @@ std::optional TransactionManager::getBlockTransactions(DagBl transactions.emplace_back(std::move(trx)); } } else { - LOG(log_er_) << "Block " << blk.getHash() << " has missing transaction " << finalizedTransactions.second; + LOG(log_nf_) << "Block " << blk.getHash() << " has missing transaction " << finalizedTransactions.second; return std::nullopt; } diff --git a/libraries/core_libs/network/include/network/tarcap/taraxa_peer.hpp b/libraries/core_libs/network/include/network/tarcap/taraxa_peer.hpp index 8defcb5886..34df483adc 100644 --- a/libraries/core_libs/network/include/network/tarcap/taraxa_peer.hpp +++ b/libraries/core_libs/network/include/network/tarcap/taraxa_peer.hpp @@ -127,7 +127,7 @@ class TaraxaPeer : public boost::noncopyable { const uint64_t kMaxSuspiciousPacketPerMinute = 1000; // Performance extensive dag syncing is only allowed to be requested once each kDagSyncingLimit seconds - const uint64_t kDagSyncingLimit = 300; + const uint64_t kDagSyncingLimit = 60; // Packets stats for packets sent by *this TaraxaPeer PacketsStats sent_packets_stats_;