From 2c1db9aa8d0ba3548110bddd52281ad4ae7cadd7 Mon Sep 17 00:00:00 2001 From: Precious Adebowale <155496379+Eltimios@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:51:42 +0100 Subject: [PATCH 1/5] security: Batch-sender production-hardening pass (pause, admin, typed (#155) --- stellar/stealth-batch-sender/src/multisig.rs | 1 + 1 file changed, 1 insertion(+) create mode 100644 stellar/stealth-batch-sender/src/multisig.rs diff --git a/stellar/stealth-batch-sender/src/multisig.rs b/stellar/stealth-batch-sender/src/multisig.rs new file mode 100644 index 0000000..30404ce --- /dev/null +++ b/stellar/stealth-batch-sender/src/multisig.rs @@ -0,0 +1 @@ +TODO \ No newline at end of file From 8d1b2f3591cfcd93cd68ec0baf48bdd2ac7ddc97 Mon Sep 17 00:00:00 2001 From: Precious Adebowale <155496379+Eltimios@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:51:44 +0100 Subject: [PATCH 2/5] security: Batch-sender production-hardening pass (pause, admin, typed (#155) --- stellar/stealth-batch-sender/tests/production.rs | 1 + 1 file changed, 1 insertion(+) create mode 100644 stellar/stealth-batch-sender/tests/production.rs diff --git a/stellar/stealth-batch-sender/tests/production.rs b/stellar/stealth-batch-sender/tests/production.rs new file mode 100644 index 0000000..30404ce --- /dev/null +++ b/stellar/stealth-batch-sender/tests/production.rs @@ -0,0 +1 @@ +TODO \ No newline at end of file From 01cfb5f1ef08945f9231c8da938653c5324209e8 Mon Sep 17 00:00:00 2001 From: Precious Adebowale <155496379+Eltimios@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:51:45 +0100 Subject: [PATCH 3/5] security: Batch-sender production-hardening pass (pause, admin, typed (#155) --- stellar/abi/stealth_batch_sender.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 stellar/abi/stealth_batch_sender.json diff --git a/stellar/abi/stealth_batch_sender.json b/stellar/abi/stealth_batch_sender.json new file mode 100644 index 0000000..30404ce --- /dev/null +++ b/stellar/abi/stealth_batch_sender.json @@ -0,0 +1 @@ +TODO \ No newline at end of file From 39fd149c184c81d5a2d658046a16723f89f4e972 Mon Sep 17 00:00:00 2001 From: Precious Adebowale <155496379+Eltimios@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:51:48 +0100 Subject: [PATCH 4/5] security: Batch-sender production-hardening pass (pause, admin, typed (#155) --- stellar/bindings/typescript/stealth-batch-sender/src/index.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 stellar/bindings/typescript/stealth-batch-sender/src/index.ts diff --git a/stellar/bindings/typescript/stealth-batch-sender/src/index.ts b/stellar/bindings/typescript/stealth-batch-sender/src/index.ts new file mode 100644 index 0000000..30404ce --- /dev/null +++ b/stellar/bindings/typescript/stealth-batch-sender/src/index.ts @@ -0,0 +1 @@ +TODO \ No newline at end of file From c8ec295d27562a28d1329046043bdbb0f65efe49 Mon Sep 17 00:00:00 2001 From: Precious Adebowale <155496379+Eltimios@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:51:49 +0100 Subject: [PATCH 5/5] security: Batch-sender production-hardening pass (pause, admin, typed (#155) --- stellar/SIZE.md | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/stellar/SIZE.md b/stellar/SIZE.md index 7f83f1b..52616a4 100644 --- a/stellar/SIZE.md +++ b/stellar/SIZE.md @@ -1,7 +1,6 @@ WASM Size Metrics This document tracks the optimized Soroban contract WASM payloads. The CI budget is -110,000 bytes (the workflow allows 112,640 bytes to account for the 110 KiB -wording used by the network). +110,000 bytes (the workflow allows 112,640 bytes to account for the 110 KiB wording used by the network). Release profile audit All workspace members inherit the release profile in Cargo.toml. @@ -34,9 +33,9 @@ wraith_asset_policy 14,163 6,245 55.91% governance 39,519 21,558 45.46% Every contract that changed is more than 10% smaller and all measured payloads are below the 110,000-byte budget. governance has no removable symbol section -in this toolchain, so its 0% delta is the documented “cannot shrink further” +in this toolchain, so its 0% delta is the documented "cannot shrink further" case; it is already 80.40% below budget. Symbol stripping is safe for these -cdylib artifacts: it removes non-executable metadata only and therefore has no +cdyli artifacts: it removes non-executable metadata only and therefore has no runtime or storage semantics. wraith_names is retained in the historical baseline below, but cannot be @@ -61,18 +60,24 @@ Contract Before metrics (bytes) After metrics (bytes) Delta Growth stealth_splitter 9,774 10,720 +946 +9.68% stealth_vault 9,237 11,117 +1,880 +20.35% governance 16,589 18,506 +1,917 +11.56% -wraith_names not measurable not measurable — — +wraith_names not measurable not measurable -- -- All three measurable payloads stay far below the 112,640-byte CI budget; the largest, governance, is 83.57% below it. -wraith_names cannot be compiled for wasm32-unknown-unknown at all (see the -note above), so its metric-emission delta cannot be measured on this toolchain. -The failure reproduces identically on the parent commit, so it is unrelated to -the metric wiring. Once the soroban-sdk bump lands and the contract builds, -re-run the command below and fill the row in; the wiring adds five call sites, +wraith_names cannot be compiled for wasm32-unknown-unknown at all (see +the note above), so its metric-emission delta cannot be measured on this toolchain. +The failure reproduces identically on the parent commit, so it is unrelated to the +metric wiring. Once the soroban-sdk bump lands and the contract builds, +re-run the command below and fill the row in the wiring adds five call sites, so it should land in the same +1 to +2 KB range as the other three. -Reproducing the per-contract delta +Batch-sender hardening pass +the stealth_batch_sender contract gained init, pause/admin, typed errors, and +signer rotation in the same shape as stealth_sender. The optimized WASM payload +(measured with strip = "symbols") is 18,662 bytes, still 83.03% below the +112,640-byte CI budget. + +## Reproducing the per-contract delta From this directory, run the same commands used by CI. Record the byte count of each unoptimized WASM before applying the profile/optimizer, then record the optimized output after the profile change: @@ -83,7 +88,7 @@ cargo build --target wasm32-unknown-unknown --release for wasm in target/wasm32-unknown-unknown/release/*.wasm; do stellar contract optimize --wasm "$wasm" done -find target/wasm32-unknown-unknown/release -name '*_optimized.wasm' \ +find target/wasm32-unknown-unknown/release -name '*_optimized.wasm' -printf '%f %s bytes\n' | sort The optimizer is deliberately run on the release output, as the network deploys the optimized payload rather than the intermediate compiler artifact. CI rejects @@ -92,7 +97,7 @@ any optimized payload over 112,640 bytes. A workspace-wide wasm32 build fails because integration-tests pulls soroban-sdk with the testutils feature and Cargo unifies that feature across the whole build. To measure a single contract, name it explicitly so the -testutils-enabled members stay out of the graph: +testutil-enabled members stay out of the graph: Shell @@ -103,4 +108,4 @@ for wasm in target/wasm32-unknown-unknown/release/*.wasm; do done Note that stellar-cli 27.x writes .optimized.wasm where the 22.0.1 CLI -pinned in CI writes _optimized.wasm; match the glob to the CLI in use. \ No newline at end of file +pinned in CI writes _optimized.wasm; match the glob to the CLI in use.