Conversation
This fixes a bug where the same tx is enqueued multiple times for submission into the mempool by the same peer.
Previous generator would filter out all duplicate tx's and hence all downstream/outbound clients would have distinct mempools. The new mempool implementation does not allow duplicates, so this approach also allows detecting when duplicates are attempted to be added to the mempool Tracing improvements.
0c7bd95 to
d0cda58
Compare
Improve TxLogic benchmark by using the default policy and realistic TXs sizes.
2c75366 to
97df304
Compare
Reduce resource consumption by waiting at least 200ms before issueing the next request for the same tx.
97df304 to
bf03196
Compare
Avoid scheduling more jobs on peers that already have outstanding decisions.
e414f7f to
f5bb003
Compare
Fix a bug where we would call makeDecisions with an old timestamp.
Use a generation counter to track changes to SharedStateVar and only call the expensive makeDecisions if a timer has expired or the shared state has changed.
Send lists of TXs to the mempool when possible. This mimics the behaviour of the V1 tx submission.
If state change wait at most 25ms for additional changes in order to coalece TX events together.
Move tx counter tracing to drainRejectionThread where it will be run at most once per second.
Cut down on the number of wakeups by only depending on the debouncer.
Merge countRejectedTxs and updateBufferedTx calls into the same atomic operation so that submitTxsToMempool only bumps the generation number once.
Avoid building temporary Maps and Sets in pickTxsToDownload and filterActivePeers.
Avoid tmp allocations in acknowledgeTxIds by folding acknowledged txids once for mempool queueing and refcount updates.
Avoid tmp allocations in receivedTxIdsImpl by updating available/buffered tx maps in one pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Checklist
Quality
Maintenance
ouroboros-networkproject.