-
Notifications
You must be signed in to change notification settings - Fork 32
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: add sodium-native #161
Conversation
benchmarks/crypto.js
Outdated
|
||
for(const {id, crypto} of [ | ||
{id: 'stablelib decrypt', crypto: stablelib}, | ||
{id: 'sodium-native decrypt', crypto: sodiumNative} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tuyennhv please do benchmarks for a range of data sizes. Research what the range of paquet sizes for eth2 objects and bechmark against them, for example: [200, 500, 1000, 1e4, 1e5, 1e6]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dapplion for eth2, most of the chunk size is 0-500, per 100 chunks like that there's a big chunk size at 20000. I updated the benchmark below
with a
for decryption, sodium-native's performance flips at a Buffer size of 20000 |
Please note that the crypto operations might not be the only meaningful metric. |
@ShogunPanda my understanding is sodium also blocks the event loop unless it provides some async apis |
This profile result shows that |
decided to go with https://github.com/ChainSafe/as-chacha20poly1305 |
Motivation
Description