feat: resolve issues #586 #588 #589 (bundle guard, footprint optimizer, signing vault) - #604
Open
boss572 wants to merge 1 commit into
Open
feat: resolve issues #586 #588 #589 (bundle guard, footprint optimizer, signing vault)#604boss572 wants to merge 1 commit into
boss572 wants to merge 1 commit into
Conversation
…t#589 (boss572) Stellar-split#586 SDK bundle size regression guard: scripts/bundle-size-guard.ts + bundle-size-config.ts + baseline; npm run bundle:check / bundle:update-baseline guarded by BUNDLE_BASELINE_UPDATE=true; add esbuild + tsx devDeps Stellar-split#588 Soroban footprint optimizer: optimizeFootprint (soroban/footprint.ts) + footprintDiff (utils/footprintDiff.ts) + opt-out submitTransaction (transaction/submit.ts) Stellar-split#589 Pluggable signing vault: Signer interface + KeypairSigner / EncryptedFileSigner (AES-256-GCM + WeakRef) / CloudKmsSigner; StellarSplitClient accepts signer option Supporting fixes for pre-existing main breakage: 10 missing error classes in errors.ts, reminder/rollback snapshot helpers, InvoiceCloneabilityValidator + InvoiceNotCloneableError imports in client.ts, index.ts export dedupe, ES2021.WeakRef lib, cloneInvoice tests skipValidation
|
@boss572 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This was referenced Aug 1, 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.
Summary
Resolves all three open issues assigned to boss572 (Stellar Wave program):
#589 — Pluggable Signing Key Vault Adapter
src/signing/signer.ts:Signerinterface (sign(txHash: Buffer): Promise<Buffer>)src/signing/adapters/KeypairSigner.ts: wraps stellar-sdkKeypairsrc/signing/adapters/EncryptedFileSigner.ts: AES-256-GCM encrypted PEM file, decrypts on first use, plaintext held in aWeakRef(re-reads the file after GC /clearCache())src/signing/adapters/CloudKmsSigner.ts: delegates to an injectedKmsClient { sign(keyId, digest) }StellarSplitClientacceptssigner: Signer(exposed viaclient.signer)src/index.ts; tests: round-trip signing, wrong-key rejection, re-read-after-GC (explicit null), mock KMS#588 — Soroban Transaction Footprint Optimizer
src/soroban/footprint.ts:optimizeFootprint(tx, sim)rebuilds viaSorobanDataBuilder/TransactionBuilder.cloneFrom, prunes surplus ledger keys, logs each removed key at debug levelsrc/utils/footprintDiff.ts:footprintDiffreturns{ added, removed, unchanged }(exported as a public utility)src/transaction/submit.ts:submitTransactionwires the optimizer in as an opt-out step ({ optimizeFootprint: false }disables it)#586 — SDK Bundle Size Regression Guard
scripts/bundle-size-guard.ts(viatsx) +scripts/bundle-size-config.ts+ committedscripts/bundle-size-baseline.jsonnpm run bundle:check: one-shot esbuild ESM bundle ofsrc/index.ts, minified + gzipped measurement, reports size/delta/% and writesbundle-size-report.json; exits 0/1npm run bundle:update-baseline: rewrites the baseline, guarded byBUNDLE_BASELINE_UPDATE=trueesbuild+tsxdevDependenciesSupporting fixes (pre-existing breakage on main)
src/errors.ts: added 10 missing error classes (PaymentExpiredError,InsufficientSponsorReserveError,InvalidTransactionTypeError,UnknownSplitError,MetadataValidationError,InvoiceIntegrityError,ApprovalTimeoutError,FinalityTimeoutError,InvalidPathQueryError,InvoiceNotCloneableError) that multiple modules import but were never definedsrc/snapshot.ts: addedloadReminderSchedules/saveReminderSchedules/snapshotSplitRollback/SplitRollbackRecord(imported but missing)src/client.ts: importedInvoiceCloneabilityValidator+InvoiceNotCloneableError(fixesReferenceErrorincloneInvoice)src/index.ts: removed duplicateFinalityChecker/RateCachere-exportstsconfig.json: addedES2021.WeakReflib for the WeakRef-based signertest/client.test.ts: cloneInvoice tests now passskipValidation: true(fixture is not cloneable; tests exercise the submission path)Verification
npm test— 96/96 passing (was 2 failing on main)npm run bundle:check— green (395 KB gzipped baseline)Note on remaining pre-existing breakage
tsc --noEmitandnpm run build(DTS) were already failing onmainbefore this PR: many modules import types that don't exist anywhere insrc(e.g.PathQuery,FinalityStatus,MultiSigPolicy,ApprovalSessionResult,BatchPaymentResult,ChunkSubmitter,AccountEffectSummary,AssetDelta,InvoicePaymentProgress,RecipientPaymentState,PriceOracleAdapter,CoinGeckoPriceOracle*). Fixing those is a separate refactor and out of scope for these three issues.Closes #586 #588 #589