Skip to content

core: implement idempotent transaction submission #26

@EmeditWeb

Description

@EmeditWeb

Problem

If a user submits a signed XDR and the API crashes
before confirming, the user might resubmit the same
transaction. No idempotency mechanism exists.

What To Build

  1. Add idempotency_key to transaction submission
  2. Create idempotency_records table
  3. Transaction hash deduplication
  4. XDR validation before submission

Files To Touch

  • src/modules/blockchain/blockchain.service.ts
  • src/modules/blockchain/blockchain.controller.ts
  • supabase/migrations/[ts]_idempotency_records.sql

Acceptance Criteria

  • Same idempotency key returns same response
  • Duplicate XDR hash rejected
  • XDR validated before submission
  • Records expire after 24 hours

Mandatory Checks Before PR

  • npm run build passes
  • No any types
  • PR references this issue

Metadata

Metadata

Assignees

No one assigned

    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