Skip to content

perf: use absorb chain bbapi in sponge blob - #195

Draft
IlyasRidhuan wants to merge 1 commit into
mainfrom
ir/pos-chain-absorb
Draft

IlyasRidhuan wants to merge 1 commit into
mainfrom
ir/pos-chain-absorb

Conversation

@IlyasRidhuan

Copy link
Copy Markdown
Collaborator

We added a new bbapi endpoint that hashes a sequence of 3-element blocks with one call (rather than per permutation calls).

Because of the overhead of IPC, native hashing is actually always slower than Wasm today. This change significantly improves the performance of native hashing - which is intuitively correct. Wasm has lower overhead costs and is bottlenecked by computation but it still benefits slightly from this.

I've implemented a change in the spongeblob hashing code since that is where the most hashing is likely to happen. For resyncing of busy sections of the chain, the savings are in the order of minutes.

Comparison of current native and wasm times to new times.

Screenshot 2026-09-11 at 15 22 24

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