Skip to content

Contract Event Replay Index #274

@Luluameh

Description

@Luluameh

Contract Event Replay Index
Background
If the off-chain indexer misses events (downtime, reorg), it needs a way to re-fetch historical events without re-scanning the entire chain.
Goal
Maintain an on-chain event log ring buffer (DataKey::EventLog(index)) storing the last 1000 event summaries in Temporary storage.
Acceptance Criteria

  • Every state-change event writes a summary entry to the ring buffer.
  • get_event_log(from_index, limit) read function returns paginated results.
  • Ring buffer wraps around after 1000 entries.
  • Buffer entries use Temporary storage to keep rent costs low.
    Key Files
    contracts/src/events.rs, contracts/src/lib.rs

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
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