Skip to content

test(backend): cover Stellar envelope validation and replay edge cases - #2224

Open
ranjan1969x wants to merge 1 commit into
LabsCrypt:mainfrom
ranjan1969x:test/stellar-envelope-replay-checks-2088
Open

ranjan1969x wants to merge 1 commit into
LabsCrypt:mainfrom
ranjan1969x:test/stellar-envelope-replay-checks-2088

Conversation

@ranjan1969x

Copy link
Copy Markdown

Summary

Adds comprehensive deterministic unit tests covering Stellar envelope validation and replay edge cases in parseAndValidateSignedEnvelope:

  • Valid envelope parsing asserting correct signature count and source public key.
  • Multi-signed envelope support with exact signature count verification.
  • FeeBumpTransaction parsing asserting inner transaction source and inner signature count.
  • Rejection of FeeBumpTransaction with unsigned inner transactions (HTTP 400).
  • Boundary sequence numbers including zero sequence and high 64-bit integer sequences.
  • Multi-network passphrase behavior and network configuration error propagation.
  • Malformed XDR handling including non-base64 input, empty/whitespace strings, non-transaction valid XDR structures, and truncated transaction envelopes (HTTP 400).

Test Coverage

  • npm test -- src/utils/__tests__/stellarEnvelope.test.ts: 12/12 tests passing 100% green.
  • Full suite: 125 test suites passing, 1081 tests green.
  • npm run build: 0 errors.
  • npm run lint: 0 errors.

Closes #2088

This branch has not been deployed

No deployments
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.

[test] Cover Stellar envelope replay checks

1 participant