-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimized Rothschild performance on high TPS #371
Merged
michaelsutton
merged 10 commits into
kaspanet:master
from
coderofstuff:rothschild-unleashed
Jan 3, 2024
Merged
Optimized Rothschild performance on high TPS #371
michaelsutton
merged 10 commits into
kaspanet:master
from
coderofstuff:rothschild-unleashed
Jan 3, 2024
Conversation
This file contains 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
So we can compare the performance difference between serial generation and parallel generation
1. Parallelize TX generation - hashing is a bottleneck so generating TXs seriallize will slow the entire loop down significantly 2. Optimize UTXO selection - previously it was running at O(UTXO) due to filtering logic
b96fbf1
to
ecac582
Compare
Due to integer divide, when tps is < 100, we end up creating no tx
ecac582
to
7f24784
Compare
18ebc5b
to
aef51ab
Compare
michaelsutton
approved these changes
Jan 3, 2024
KashProtocol
pushed a commit
to Kash-Protocol/rusty-kash
that referenced
this pull request
Jan 5, 2024
KashProtocol
pushed a commit
to Kash-Protocol/rusty-kash
that referenced
this pull request
Jan 6, 2024
KashProtocol
pushed a commit
to Kash-Protocol/rusty-kash
that referenced
this pull request
Jan 8, 2024
KashProtocol
pushed a commit
to Kash-Protocol/rusty-kash
that referenced
this pull request
Jan 9, 2024
D-Stacks
pushed a commit
to D-Stacks/rusty-kaspa
that referenced
this pull request
Jan 23, 2024
* Add rothschild tx benchmark So we can compare the performance difference between serial generation and parallel generation * Optimize high TPS generation 1. Parallelize TX generation - hashing is a bottleneck so generating TXs seriallize will slow the entire loop down significantly 2. Optimize UTXO selection - previously it was running at O(UTXO) due to filtering logic * Move criterion to dev-dependency * Some more rothschild improvements * Fix from_fmillis typo * Add flags * Parallelize txid hashing in simpa * Moving ClientPool to grpc/client * Fix rothschild sending less than 100 txs Due to integer divide, when tps is < 100, we end up creating no tx * Remove obsolete temp init comment --------- Co-authored-by: Ori Newman <orinewman1@gmail.com>
smartgoo
pushed a commit
to smartgoo/rusty-kaspa
that referenced
this pull request
Jun 18, 2024
* Add rothschild tx benchmark So we can compare the performance difference between serial generation and parallel generation * Optimize high TPS generation 1. Parallelize TX generation - hashing is a bottleneck so generating TXs seriallize will slow the entire loop down significantly 2. Optimize UTXO selection - previously it was running at O(UTXO) due to filtering logic * Move criterion to dev-dependency * Some more rothschild improvements * Fix from_fmillis typo * Add flags * Parallelize txid hashing in simpa * Moving ClientPool to grpc/client * Fix rothschild sending less than 100 txs Due to integer divide, when tps is < 100, we end up creating no tx * Remove obsolete temp init comment --------- Co-authored-by: Ori Newman <orinewman1@gmail.com>
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.
Two bottlenecks were found:
O(N)
time whereN
= # of utxos. Effectively, this means that each iteration runs anO(N x M)
time, whereM
is the passed TPS.Solutions implemented:
Executed with
--tps=1000
Sample performance of new implementation: