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

feat: improve header validation speed #6510

Merged

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Aug 30, 2024

Description

Improves the header validation speed by caching the gen block hash creation.

Motivation and Context

This is very noticeable during sync, but it takes about 10ms to create the gen block, and if you only want the hash, this can speed up validation a lot if you do this repeatedly.

After this pr, the validation of
Sha3x: 10ms -> 10us
RandomX: 20ms -> 10ms

How Has This Been Tested?

Manual

@SWvheerden SWvheerden requested a review from a team as a code owner August 30, 2024 08:35
@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Aug 30, 2024
@SWvheerden SWvheerden changed the title feat: Improve header validation speed feat: improve header validation speed Aug 30, 2024
Copy link

github-actions bot commented Aug 30, 2024

Test Results (CI)

    3 files    129 suites   36m 37s ⏱️
1 306 tests 1 305 ✅ 0 💤 1 ❌
3 904 runs  3 903 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 552ec22.

♻️ This comment has been updated with latest results.

Copy link

Test Results (Integration tests)

 2 files  + 2  11 suites  +11   32m 50s ⏱️ + 32m 50s
36 tests +36  34 ✅ +34  0 💤 ±0  2 ❌ +2 
38 runs  +38  36 ✅ +36  0 💤 ±0  2 ❌ +2 

For more details on these failures, see this check.

Results for commit 552ec22. ± Comparison against base commit 169572a.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@SWvheerden SWvheerden merged commit da5b443 into tari-project:development Aug 30, 2024
15 of 18 checks passed
@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Aug 30, 2024
@SWvheerden SWvheerden deleted the sw_up_header_sync_speed branch September 11, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants