Skip to content

Conversation

nazar-pc
Copy link
Member

PoT verification is a big part of the block verification cost, especially when syncing otherwise mostly empty blocks.

Before:

verify                  time:   [220.72 ms 225.27 ms 229.55 ms]

After:

verify                  time:   [204.92 ms 205.10 ms 205.30 ms]

Tested on Zen 4 CPU.

This change avoids std for AES-NI CPU feature detection on x86-64 and avoids heap allocation during verification, allowing for better data locality and overall better cache utilization, while also doing physically less work.

I also changed crate authorship since it was almost completely rewritten by me since its introduction in #1601, only some of the tests are still mostly the same.

Code contributor checklist:

Copy link
Member

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Looks fairly straightforward, thanks!

@nazar-pc nazar-pc added this pull request to the merge queue May 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 28, 2025
@nazar-pc nazar-pc added this pull request to the merge queue May 28, 2025
Merged via the queue into main with commit 8d0c178 May 28, 2025
12 checks passed
@nazar-pc nazar-pc deleted the faster-pot-verification branch May 28, 2025 13:00
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.

2 participants