Skip to content

[High] Add versioned event envelopes across all contracts, with a completeness test #422

Description

@james2177

Description:
Event topics and payloads are ad hoc tuples that differ between contracts, and some state changes emit nothing. Introduce a versioned envelope (topic ("vortex", contract, event_name, v1)), migrate every event, and add a test asserting that every storage-mutating entrypoint emits at least one event.

Problem Statement & Context:
Indexers, monitors, and the solver bots reconstruct state from events (#107, #217). Silent mutations and unversioned payloads break them on every upgrade.

Scope & Acceptance Criteria:

  • A shared event helper in vortex-common.
  • All four contracts migrated, and docs/event-schema.md regenerated.
  • A completeness test that wraps each mutating entrypoint and asserts env.events().all() grew.
  • The reference indexer's expectations updated. A test fixture in Rust is enough, because this is contract-only.
  • Out of scope: indexer code changes.

Implementation Guidelines:

  1. Key Files/Modules: all src/lib.rs, docs/event-schema.md, docs/113-event-topic-naming-conventions.md.
  2. Design/Architecture: Topic ordering must support filtering by contract and event name.
  3. Edge Cases/Constraints: Event size limits, and backward compatibility during a transition period (dual-emit behind a flag, or document the break).
  4. Testing: As described in the scope.

Definition of "Done":

  • CI green, and the schema docs updated.
  • Reviewed and approved.

Resources:

Complexity: High (200 points)

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programhigh (200 pts)Drips Wave complexity: high, 200 pointssecuritySecurity hardening or audit finding

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions