Skip to content

[Testing] Fuzz Testing for XDR Transaction Builder Payload Parsing #171

Description

@AlAfiz

Description: Implement property-based fuzz testing on the /transactions/batch-build payload parser to ensure malformed, unexpectedly large, or maliciously structured JSON arrays cannot crash the XDR builder logic.
Context / Motivation: The transaction builder endpoint processes complex nested arrays of routing intents. Edge cases in user input (like missing fields, negative amounts, or recursive objects) must be caught safely by validation logic, rather than panicking the Stellar SDK.
Acceptance Criteria: - [ ] Integrate a fuzzing library such as fast-check.

  • Define arbitrary schemas that generate highly randomized arrays of swap intents.
  • Assert that the endpoint consistently returns a 400 Bad Request for invalid schemas and never returns a 500 Internal Server Error.
    Technical Pointers: Focus the fuzzers on the asset amount properties. Test how the TypeScript logic handles Javascript's MAX_SAFE_INTEGER, NaN, and extremely long string lengths for Stellar addresses.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaignhelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions