perf: replace in-guest ed25519-dalek with host ed25519_verify - #832
Closed
Gonness-Codes wants to merge 29 commits into
Closed
perf: replace in-guest ed25519-dalek with host ed25519_verify#832Gonness-Codes wants to merge 29 commits into
Gonness-Codes wants to merge 29 commits into
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR re-evaluates the in-guest
ed25519-dalekdependency against the 200 KB WASM size budget and the strict sub-50 KB target from #525. It measures both verification paths, records a 44.0 KiB delta, removes the heavy dependency in favor of the hosted25519_verifyprimitive, and enforces the smaller binary with a CI size check.Related Issue
Part of #525 — moves the guest binary toward the strict sub-50 KB WASM size target.
Changes
📏 WASM Size Re-Evaluation
src/signature.rsed25519-dalekverification with the hoste.crypto().ed25519_verifyprimitive.Error(Crypto, InvalidInput)host trap and the client-side error mapping.Cargo.tomled25519-dalek = "=3.0.0"pin and itscurve25519-dalek/sha2guest transitive dependencies.PROXY_PATTERN_DECISION.mdError(Crypto, InvalidInput)client-side..github/workflows/ci.yml.github/wasm-size-limit..github/wasm-size-limit200000to50000to enforce the [Advanced] Deeply optimize the WebAssembly binary size to be strictly under 50KB (usingwasm-optandno_stdtweaks) #525 sub-50 KB target.Verification Results
PROXY_PATTERN_DECISION.mdrecords the measured delta and host-trap tradeoff.github/wasm-size-limit(50 KB)ed25519-dalek = "=3.0.0"pin rationale is re-verified against the currentsoroban-env-hostsoroban-env-host 22.1.0Closes #721