Feat/ledger monitor tx signer 627 630#696
Merged
emdevelopa merged 2 commits intoApr 23, 2026
Merged
Conversation
…hic signature verification to Transaction Signer Issue emdevelopa#627 — Enhance error recovery for Ledger Monitor (horizon-poller.js): - Circuit breaker: trips after MAX_CONSECUTIVE_FAILURES (5) DB fetch failures, pauses polling for CIRCUIT_BREAKER_RESET_MS (5 min) before auto-recovery - Exponential back-off: [5s, 15s, 30s, 60s] schedule applied after each DB error - Per-payment isolation: Horizon errors during lookup are caught individually so one bad payment never aborts the full cycle - Signature verification gate: payments with invalid/unverifiable signatures are skipped (not failed) so they can be re-checked next cycle - Duplicate tx_id guard: atomic update with .is('tx_id', null) prevents double-claim - Underpayment/overpayment detection via findAnyRecentPayment with graceful fallback - Structured logging on every error path for observability - Exposed pollOnce() for deterministic unit testing without timer loops - getPollerHealth() / resetPollerState() for health-check endpoints and tests - Full test coverage: 15 tests covering all error paths (horizon-poller.test.js) Issue emdevelopa#630 — Add cryptographic signature verification to Transaction Signer (stellar.js): - verifyTransactionSignature() performs full Ed25519 cryptographic verification: 1. Fetch transaction envelope from Horizon 2. Deserialise XDR and confirm signatures present 3. Load source account signers and medium threshold 4. Verify each signature against known signers using hint-narrowing + Ed25519 5. Accumulate signing weight and check against medium threshold - Returns rich SignatureVerificationResult: { valid, reason, isMultiSig, signatureCount, thresholdMet } instead of a plain boolean - Graceful fallback on every failure path (never throws, always returns valid=false) - Multi-sig support: detects accounts with multiple signers or threshold > 1 - Full test coverage: 16 tests covering all verification paths (transaction-signer.test.js) - Updated signature-verification.test.js to match new rich-object return type
…eat/ledger-monitor-tx-signer-627-630
|
@OlaGreat is attempting to deploy a commit to the Emmanuel's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@OlaGreat 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.
closes #632
closes #627
closes #630
closes #631
Feat/ledger monitor tx signe