Skip to content

Add deterministic contract event replay metadata #52

Description

@grantfox-oss

Impact: Contract events currently emit raw payloads without deterministic replay metadata, making it difficult for backend consumers and indexers to reconcile repeated or replayed event deliveries.

Affected areas: app/contract/contracts/Folder/src/events.rs, app/contract/contracts/Folder/src/metadata.rs, app/backend/src/ingestion/soroban-event.parser.ts, app/backend/src/ingestion/event.repository.ts, ingestion tests/docs.

Implementation scope:

  • Add explicit replay metadata to emitted events, such as originating transaction hash, sequence number, and stable event version.
  • Ensure event payloads include enough identity to safely deduplicate repeated deliveries.
  • Update backend event parser to persist and validate replay metadata.
  • Add tests for event replay, duplicate delivery, and out-of-order handling.

Acceptance criteria:

  • Backend indexer can detect duplicate event deliveries using contract-provided metadata.
  • Event replay metadata is included in all persisted contract events.
  • Tests prove idempotent ingestion on repeated Horizon deliveries.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions