Skip to content

SC-022: Implement on-chain event architecture and indexing standard - #341

Merged
dDevAhmed merged 25 commits into
DigiNodes:mainfrom
Adedoyinjr:feature/sc-022-event-architecture
Jul 30, 2026
Merged

SC-022: Implement on-chain event architecture and indexing standard#341
dDevAhmed merged 25 commits into
DigiNodes:mainfrom
Adedoyinjr:feature/sc-022-event-architecture

Conversation

@Adedoyinjr

Copy link
Copy Markdown
Contributor

Summary

Implements SC-022 by introducing a canonical, versioned on-chain event architecture for TruthBounty protocol indexers.

Changes

  • Added ITruthBountyEvents as the canonical event interface
  • Added explicit V1 event names to avoid conflicts with legacy contract events
  • Added indexed identifiers, timestamps, and schema version fields
  • Integrated canonical events into:
    • TruthBountyWeighted
    • VerifierSlashing
    • RewardEngine
    • GovernanceController
    • TruthBounty
    • BootstrapController
    • MigrationManager
  • Added event architecture, indexing, ordering, consumer, schema, and gas benchmark documentation
  • Added event harness and focused event tests
  • Preserved existing legacy events for backward compatibility

Validation

  • npm run compile passes
  • Focused validation result: 45 passing, 1 failing
  • The remaining failure is the existing minStakeAmount token-supply validation test in TruthBountyWeighted.test.ts, unrelated to the event architecture changes

Indexer Compatibility

  • Canonical events use explicit V1 names
  • Event payloads include schema version and block timestamp
  • High-value identifiers are indexed
  • Existing legacy event ABI remains available

Closes #302

@Adedoyinjr

Copy link
Copy Markdown
Contributor Author

Hi maintainers, the implementation for SC-022 is ready for review. The required GitHub Actions workflows are currently awaiting maintainer approval because this PR comes from a fork. Please approve the workflows when convenient. Thank you.

@dDevAhmed

Copy link
Copy Markdown
Contributor

resolve conflicts @Adedoyinjr

@dDevAhmed
dDevAhmed merged commit 8442a78 into DigiNodes:main Jul 30, 2026
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.

SC-022 — Implement On-Chain Event Architecture & Indexing Standard

2 participants