-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Use faster Ed25519 impl for gossip crypto #3465
Comments
@mpetrunic does libp2p-noise must use libp2p-crypto to comply with some interface or can we just import any implementation that we want? |
libp2p decided to drop switch to ed-wasm, see discussion here: libp2p/js-libp2p-crypto#215 |
If I follow correctly the result has been to drop all PRs and stay on the pure-js impl right? We should count how many ops Lodestar does per second since this has been a bottleneck for us. |
For the record I'm not against switching to a WASM ed25519 implementation in the future, it's just that in the testing I did, it didn't seem to be a bottleneck. If @dapplion is seeing evidence to the contrary then this is certainly something we can re-evaluate if some benchmarks can be created that reflect realistic workflows so we can measure the difference in implementations. |
Now we can use a faster implementation thanks to plug-gable crypto here ChainSafe/js-libp2p-noise#133 |
Sample impl of native version from @ShogunPanda
|
the current js implementation is way faster than
|
We are using a dedicated implementation for noise |
@achingbrain has identified alternative implementations of Ed25519 crypto. This issue is a tracker to ensure we timely upgrade our deps once a faster impl lands. See benchmarks in libp2p/js-libp2p-crypto#211
I don't have data right now to show but historically gossip crypto has appeared in CPU profiles taking ~5% of total CPU time in the main thread
TODO:
libp2p-crypto
libp2p-noise
and release https://github.com/ChainSafe/js-libp2p-noiseThe text was updated successfully, but these errors were encountered: