Repository navigation
feat(ingestion): add schema versioning, decoder registry, raw fallbac… - #1067
Merged
Abd-Standard merged 1 commit intoOct 17, 2026
Merged
Conversation
…ks, and RPC startup checks
|
@wavyboy-build 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces robust event schema versioning, graceful raw payload fallbacks, a centralized decoder registry, and RPC startup capability verification for NotifyChain. Together, these updates eliminate scattered decoding conditionals, prevent ingestion pipeline crashes on unfamiliar contract deployments, and ensure early detection of incompatible RPC node configurations.
Key Changes
Schema Resolution: Associated supported event schemas with contract versions to enable deterministic version checking per contract.
Structured Diagnostics: Introduced structured error diagnostics when encountering unsupported or mismatched schema versions.
Testing: Added test coverage for schema compatibility validation and diagnostic reporting.
Raw Event Retention: Preserved source identifiers (contract address, block, tx hash) and original raw payloads for unrecognized or newly deployed contracts.
API Distinction: Updated the event data model and API responses to explicitly distinguish between decoded and undecoded (raw) events.
Testing: Added integration tests verifying that unfamiliar contract events pass through the pipeline without data loss.
Registry Pattern: Replaced scattered conditional/switch statements with a modular DecoderRegistry allowing decoders to be registered independently.
Resilient Ingestion: Ensured unknown event types return fallback raw objects instead of throwing exceptions or disrupting pipeline ingestion.
Testing: Added unit tests covering decoder registration, dynamic lookup, and unknown event handling.
Fail-Fast Validation: Implemented pre-flight RPC endpoint capability checks on service startup to verify required RPC methods and response features.
Actionable Errors: Configured explicit, actionable diagnostic messages when an endpoint is missing required capability support.
Testing: Added isolated mock unit tests for startup capability validation.
Acceptance Criteria Verification
[x] Schema versions can be resolved per contract with structured diagnostics on mismatches.
[x] Unknown events retain source IDs and raw payloads while distinguishing decoded vs. undecoded states.
[x] Decoders register independently; ingestion gracefully handles unknown events.
[x] Service performs testable RPC startup checks and fails fast with actionable errors if capabilities are missing.
Closes #933
Closes #935
Closes #936
Closes #937