-
Notifications
You must be signed in to change notification settings - Fork 17
Tree-shaking audit + per-chain bundle size budget #17
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programauditProduces a written report as primary deliverableProduces a written report as primary deliverabledripsFunded via Drips NetworkFunded via Drips Networkhelp wantedExtra attention is neededExtra attention is neededperfPerformance / optimizationPerformance / optimizationstellarTouches Stellar / Soroban codeTouches Stellar / Soroban code
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programauditProduces a written report as primary deliverableProduces a written report as primary deliverabledripsFunded via Drips NetworkFunded via Drips Networkhelp wantedExtra attention is neededExtra attention is neededperfPerformance / optimizationPerformance / optimizationstellarTouches Stellar / Soroban codeTouches Stellar / Soroban code
Type
Fields
Give feedbackNo fields configured for issues without a type.
Labels:
Stellar Wave,stellar,perf,audit,drips,help-wantedTier: M (2–4 days)
Type: perf / audit
Context
The SDK ships subpath exports per chain so consumers can import only what they need. In theory, a consumer who only uses
@wraith-protocol/sdk/chains/stellarshould not pay the bundle cost of EVM, Solana, or CKB code. In practice, we've never verified this. Shared utility files, accidental cross-imports between chains, and noble-curves' multi-curve bundles could be silently leaking unused code into every consumer's bundle.Scope
index,chains/evm,chains/stellar,chains/solana,chains/ckb, build a minimal consumer (oneimport { something } from '@wraith-protocol/sdk/chains/X') and measure the resulting bundle with both Vite and esbuild.rollup-plugin-visualizeroresbuild-analyzerand identify any non-obvious crossover (e.g., Stellar code being pulled into a CKB-only consumer).package.json:{ "size-limit": [ { "path": "dist/chains/stellar/*", "limit": "40 KB" }, { "path": "dist/chains/evm/*", "limit": "35 KB" }, ... ] }Where crossover is expected
chains/solanare-useschains/stellarcrypto. That's intentional and should be measured + budgeted accordingly.chains/ckbre-useschains/evmkeys. Same story.Crossover that is NOT expected:
chains/evmaccidentally importing fromchains/stellar.utils/module that pulls in chain-specific code viaimport * as.Acceptance criteria
BUNDLE_SIZE.md.size-limitor equivalent.Why this matters
Frontend consumers (the demo, the console, any third-party integrator's web app) directly feel SDK bundle size. A 50 KB savings on the Stellar entry is a measurable LCP improvement for every user of every Wraith-powered site.
Resources
size-limitpackage: https://github.com/ai/size-limit