chore: transaction pool overflow improvements #2473
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the current DAG and PBFT gas limit we are able to process about 400 transactions per second. Once the transaction pool is filled and some of the transactions are dropped on some of the nodes, those transactions might be included in some DAG block after the time to process full transactions pool. This would take (200000 transactions)/(400 transactions per second) which equals about 500 seconds. Because of this kTransactionOverflowTimeLimit is increased from 300 seconds to 600 seconds. This prevents malicious node exception for this cases while doing stress test on devnet.
Error log in TransactionManager::getBlockTransactions changed to info since there is a normal case when transactions could be missed. The actual error is logged in functions that invoke this one if needed for an actual error.
The recent limitations to dag and pbft gas limit significantly reduces the size of dag blocks. This makes dag syncing less performance extensive so reducing kDagSyncingLimit from 300 seconds to 60 seconds to allow more frequent dag syncing in case transactions are overflown and missing.