Skip to content
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

Validate block_body_in_isolation txs in parrallel #603

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

D-Stacks
Copy link
Collaborator

@D-Stacks D-Stacks commented Nov 25, 2024

Refactor block_body_in_isolation to use parallel iteration of txs, to speed up validation time.

Benching command:

./simpa --testnet11 --input-dir=./simpa_out

some data on the input-dir:

2024-11-25 15:18:33.401+01:00 [INFO ] simpa v0.15.3
2024-11-25 15:18:33.403+01:00 [INFO ] Using kaspa-testnet-11 configuration (GHOSTDAG K=124, DAA window size=661, Median time window size=27)
2024-11-25 15:18:34.872+01:00 [INFO ] [DELAY=2, BPS=10, GHOSTDAG K=124]
2024-11-25 15:18:34.872+01:00 [INFO ] [Average stats of generated DAG] blues: 21.791184041184042, reds: 0, parents: 15.75627413127413, txs: 39.25997425997426
2024-11-25 15:18:34.872+01:00 [INFO ] Validating 6216 blocks with 244040 transactions overall...2024-11-25

with PR:

1)2024-11-25 15:18:48.862+01:00 [INFO ] Total validation time: 13.989542405s, block processing rate: 444.33 (b/s), transaction processing rate: 17444.46 (t/s)
2)2024-11-25 15:19:42.918+01:00 [INFO ] Total validation time: 13.685405374s, block processing rate: 454.21 (b/s), transaction processing rate: 17832.14 (t/s)
3) 2024-11-25 15:20:24.598+01:00 [INFO ] Total validation time: 12.599037163s, block processing rate: 493.37 (b/s), transaction processing rate: 19369.73 (t/s)
4) 2024-11-25 15:20:54.279+01:00 [INFO ] Total validation time: 13.826378759s, block processing rate: 449.58 (b/s), transaction processing rate: 17650.32 (t/s)
5) 2024-11-25 15:21:29.589+01:00 [INFO ] Total validation time: 16.116823038s, block processing rate: 385.68 (b/s), transaction processing rate: 15141.94 (t/s)

Average with PR: 14.043437348s, 445.42 (b/s), 17487.72 (t/s)


on master:

1) 2024-11-25 15:26:16.382+01:00 [INFO ] Total validation time: 19.454850488s, block processing rate: 319.51 (b/s), transaction processing rate: 12543.92 (t/s)
2) 2024-11-25 15:26:50.036+01:00 [INFO ] Total validation time: 15.547193094s, block processing rate: 399.81 (b/s), transaction processing rate: 15696.72 (t/s)
3) 2024-11-25 15:27:17.203+01:00 [INFO ] Total validation time: 15.161808406s, block processing rate: 409.98 (b/s), transaction processing rate: 16095.71 (t/s)
4) 2024-11-25 15:27:43.617+01:00 [INFO ] Total validation time: 12.748401478s, block processing rate: 487.59 (b/s), transaction processing rate: 19142.79 (t/s)
5) 2024-11-25 15:28:11.910+01:00 [INFO ] Total validation time: 15.626396019s, block processing rate: 397.79 (b/s), transaction processing rate: 15617.16 (t/s)

Averages on master: 15.707729897s, 402.94 (b/s), 15819.26 (t/s)


This amounts to a ~10% decrease of validation time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant