feat: implement version registry and name-service event metadata (#403) - #497
Open
Tekgodfrey wants to merge 1 commit into
Open
feat: implement version registry and name-service event metadata (#403)#497Tekgodfrey wants to merge 1 commit into
Tekgodfrey wants to merge 1 commit into
Conversation
…iven17#403) - Dual emit tls_crt2 and name_reg2 events with schema version alongside old events - Add UnsupportedVersionError to off-chain TypeScript parser - Update event fixtures and tests to verify decoding and rejection of unsupported versions - Document new events and fix fee_chg table formatting in README.md
|
@Tekgodfrey is attempting to deploy a commit to the Cankat's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
tls_crt2andname_reg2events with schema version alongside old eventsUnsupportedVersionErrorto off-chain TypeScript parserfee_chgtable formatting inREADME.mdSummary
This PR addresses the need for the on-chain event consumers to be resilient to future contract schema changes without breaking the existing indexing infrastructure. It implements a dual-emission strategy for the
talos_registryandtalos_name_servicecontracts, where version-aware events (tls_crt2andname_reg2) are now emitted alongside the originaltls_crtandname_regevents. A newversionfield (u32) was explicitly added to these v2 payloads.Furthermore, strict rejection handling (
UnsupportedVersionError) was added to the TypeScript off-chain decoder inevent-query.tsto ensure that it explicitly rejects any event version it doesn't recognize rather than attempting to decode it with outdated schema logic.Related Issues
Closes #403
Test Plan
cargo testexecuted incontracts/talos_registry(76/76 tests passing).cargo testexecuted incontracts/talos_name_service(42/42 tests passing).pnpm --dir contracts test:fixturesexecuted (36/36 tests passing).version: 2) insideevent_fixtures.json.UnsupportedVersionErrorwhen iterating over the new malformed fixture.README.mdandEVENTS.mdwith new schema properties).Visual Changes (if applicable)
N/A (Backend / Smart Contract event schema updates only)
Checklist
.env.examplefiles and documentation if I changed environment variables.