Repository navigation
test: add deterministic ledger sequence edge-case fixtures (#346) - #398
Merged
preshotta merged 1 commit intoOct 22, 2026
Merged
Conversation
|
@TheDEV111 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! 🚀 |
Collaborator
|
Merged as requested after the required Malware guard passed. Please fix and rerun the remaining non-security checks:
|
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.
Description
Oracle verification depends on precise ledger boundaries: the inclusion ledger counts as confirmation one, a stale RPC head must defer verification, and contract data remains live through its TTL ledger. Add a focused, reusable deterministic fixture corpus and tests for these existing behaviors.
Closes #346
Changes
docs/LEDGER_SEQUENCE_FIXTURES.md, linked from the contributor guide.Compatibility and scope
Test and documentation additions only. Existing production behavior, API responses, database schemas, and
fixtures:generateoutput remain unchanged. No migration is required. Reverting the additions needs no data or ledger rollback.The fixtures use unsigned envelopes and mocked SDK RPC methods. Authorization coverage checks RPC access refusal and submitter binding; it does not execute HTTP guards, on-chain signature checks, or contract allow-lists. The public deterministic identity and historical time bounds are for offline tests only.
Validation
Passed locally:
npm test -- --runInBand src/testing/fixtures src/blockchain/oracle/services/stellar-oracle.adapter.spec.ts src/blockchain/oracle/services/stellar-oracle.adapter.events.spec.ts src/blockchain/oracle/submission-verifier.service.spec.tsResult: 6 suites passed, 100 tests passed, including 21 new ledger-fixture tests.
ESLint and Prettier checks passed for both new TypeScript files;
git diff --checkpassed.Full repository type-check (
tsc --noEmit --incremental false --pretty false) fails in existing code, including unresolved imports in nonce management and submission-verifier controllers. The final output contains no errors referencing either new file. Contributor quick diagnostics also reports missing local.env,DATABASE_URL, andJWT_SECRET; the selected tests run offline without those services. No live ledger submission or full application startup was performed.