Skip to content

docs: design Soroban event topic strategy for Stellar announcer#26

Merged
truthixify merged 2 commits into
wraith-protocol:developfrom
David-patrick-chuks:fix/issue-23-soroban-event-topics
Jun 1, 2026
Merged

docs: design Soroban event topic strategy for Stellar announcer#26
truthixify merged 2 commits into
wraith-protocol:developfrom
David-patrick-chuks:fix/issue-23-soroban-event-topics

Conversation

@David-patrick-chuks
Copy link
Copy Markdown

@David-patrick-chuks David-patrick-chuks commented May 27, 2026

Overview

This PR adds the Stellar design note for issue #23 and recommends a new Soroban event topic strategy for stealth-announcer so indexers can filter announcements server-side via getEvents. The proposal moves toward a four-topic indexed schema centered on scheme_id and view_tag_bucket, quantifies the expected scan-bandwidth savings, and documents the privacy trade-off explicitly.

Related Issue

Closes #23

Changes

⚙️ Event Topic Design

  • [ADD] stellar/EVENT_TOPIC_DESIGN.md
  • Added a design doc for a new indexed Soroban event topic schema.
  • Proposed topic layout: ("announce", scheme_id, view_tag_bucket, metadata_kind).
  • Recommended moving stealth_address, ephemeral_pub_key, and metadata into event data.
  • Documented why stealth_address should no longer consume an indexed topic slot.
  • Included expected client query shapes for Stellar RPC getEvents filtering.

📊 Savings Model

  • Added a back-of-the-envelope model for a mainnet scenario with 50 announcements/sec and 10,000 scanners.
  • Quantified the expected improvement from bucketed filtering at roughly 256x less scan traffic.
  • Estimated aggregate savings at about 21.5 TB/day of response traffic avoided.

🔐 Privacy + Compatibility Analysis

  • Documented the privacy cost of exposing a one-byte view_tag_bucket in public topics.
  • Compared the two rollout paths discussed in the issue.
  • Recommended path A: deploy a new v2 announcer with scheme_id = 2 and let SDKs read both versions during migration.

📝 Docs

  • [MODIFY] README.md
  • Added a pointer to stellar/EVENT_TOPIC_DESIGN.md in the Stellar section.

Verification Results

Acceptance Criteria Status
Design doc at stellar/EVENT_TOPIC_DESIGN.md
Quantified savings model included
Recommendation is explicit
Privacy trade-off is explicit and unambiguous
Follow-up issue filed for contract change
Follow-up issue filed for SDK fetch change
Stellar workspace tests pass

Screenshots / Command Results

cargo test --workspace ✅ passed
image

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@David-patrick-chuks 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 truthixify changed the base branch from main to develop June 1, 2026 15:00
@truthixify
Copy link
Copy Markdown
Contributor

This is the kind of design doc I want to see — a clean problem statement, the 256× back-of-envelope, and the migration path argued in both directions before landing on a recommendation. The "Why stealth_address should leave topics" section is sharp; the 4-slot budget framing makes the trade-offs obvious.

Good call filing #24 and #25 as the contract + SDK follow-ups. Merging.

Thanks @David-patrick-chuks.

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.

Soroban event topic strategy: indexed topics for efficient scan filtering

2 participants