Repository navigation
perf(sdk): reuse immutable action hashing and wire serialization - #166
Merged
Merged
Conversation
This was referenced Oct 6, 2026
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.
Reusing a validated bulk action currently repeats serialization, hashing, and deep copying on every signature. This change keeps SDK-owned immutable action payloads reusable across execution and separate signing/submission, while generating a fresh nonce, signature, vault address, and expiration for each request.
signAction/submitAction/executeActionstages, including client equivalents. Existing exchange methods keep their behavior. Required narrow exports and published-package build support preserve shared nonce, error, and ownership identities across entry points.Measured locally with reused 1,000-order actions and fresh WASM signatures, staged HTTP signing/submission fell from 1.01 ms to 73 µs on Bun and 1.41 ms to 158 µs on Node. These are CPU measurements using mocks that materialize outgoing UTF-8, excluding network latency; changed order fields require rebuilding the action.
Validation: 2,008 offline tests passed (242 live tests skipped), aggregate formatting/lint/docs checks, TypeScript 5 and 7, JSDoc/export/import-graph gates, and the build with relocated consumer checks on Bun and Node. CI also runs the unchanged paired performance regression suite.
Unrelated runtime injection, bounded dispatch, batching, and docs tooling changes in the original working tree are preserved outside this PR.