Skip to content

Add sponsored announcements to Stellar sender - #133

Open
OlyraCreations wants to merge 3 commits into
wraith-protocol:developfrom
OlyraCreations:feature/101-sponsored-announcement
Open

Add sponsored announcements to Stellar sender#133
OlyraCreations wants to merge 3 commits into
wraith-protocol:developfrom
OlyraCreations:feature/101-sponsored-announcement

Conversation

@OlyraCreations

Copy link
Copy Markdown

Summary

Adds the fee-payer/sponsored announcement pattern requested in #101. Platforms can submit multiple independently authenticated announcement entries in one Soroban invocation while a sponsor supplies the transaction fee through Stellar fee-bump mechanics.

Fixes #101

What changed

  • Added SponsoredEntry to stellar/stealth-sender/src/lib.rs with the per-entry sender, token, amount, scheme ID, stealth address, ephemeral public key, and metadata.
  • Added sponsored_announce(sponsor, entries).
  • Requires the sponsor to authorize the invocation and requires every entry sender to authorize its own transfer and announcement.
  • Preserves the existing asset-policy checks, protocol-fee handling, token transfers, announcements, TTL extension, and sender metrics.
  • Added SponsoredBatchTooLarge = 6 and enforced a maximum of 20 entries.
  • Added successful and negative unit tests for sponsored announcements.
  • Added stellar/integration-tests/sponsored.rs to verify a submitted futurenet transaction records the sponsor as Horizon's fee_account.
  • Added sponsored batch cases to stellar/bench/src/main.rs.
  • Recorded measured Soroban resource usage for 1, 5, 10, and 20 entry batches in stellar/PERF.md.
  • Regenerated the Stellar sender TypeScript binding with the new method, entry type, and error.

Acceptance criteria

  • Optimized sender WASM remains below 110 KB.
    • Measured optimized size: 15,732 bytes.
  • Size cap is enforced with a dedicated error type.
    • 21 entries return SenderError::SponsoredBatchTooLarge.
  • Per-entry resource cost is recorded in PERF.md.
  • Sender bindings were regenerated and verified with no binding drift.
  • Futurenet fee-source verification test added.
    • The test is ignored by default and runs with FUTURENET_TX_HASH and FUTURENET_SPONSOR_ADDRESS against Horizon after a fee-bumped transaction is submitted.

Validation

  • cargo test -p stealth-sender: passed.
    • Sender unit, fee, property, SAC compatibility, and upgrade-authority tests passed.
  • Optimized WASM build and size check passed: 15,732 bytes.
  • Binding regeneration produced no diff.
  • New integration test passed Rust formatting/syntax validation.

Known repository issue

The full cargo test --workspace check is currently blocked by pre-existing unrelated errors in stealth-registry/src/lib.rs (mismatched closing delimiter). Workspace-wide formatting also reports existing formatting differences outside the files changed by this PR.

The pre-existing untracked root package-lock.json was not included in this PR.

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@OlyraCreations 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! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

Rebase on latest develop and force-push. Your branch was pushed before the CI trigger was updated to run on develop PRs, so CI hasn't validated it yet.

@OlyraCreations

Copy link
Copy Markdown
Author

Thanks so much for the feed back

@truthixify

Copy link
Copy Markdown
Contributor

Merge conflicts against develop after the merge cascade. Rebase and CI should look different against the fixed workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fee-payer / sponsored announcement pattern

2 participants