Skip to content

[CT-77] POST /submit has no idempotency test for a duplicate hash submission #1201

Description

@mftee

Overview

contract/src/handlers/submit.rs anchors a document hash (CT-01/CT-31), but there's no evident test for submitting the exact same hash twice — it should either return the existing anchor's result or reject as a duplicate, not create two separate anchoring transactions for the same document.

Tasks

  • Decide and implement the intended behavior for a duplicate submit (return existing record vs. explicit conflict error)
  • Add a test submitting the same hash twice and asserting the chosen behavior, not a second Stellar transaction

Acceptance Criteria

  • Submitting an already-anchored hash a second time does not create a duplicate on-chain anchor

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingcontract

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions