Skip to content

perf: Implement storage cleanup for expired and completed escrows #511

Description

@nanaf6203-bit

Description

Escrow data (documents, conditions, signatures, audit logs) persists indefinitely after completion, bloating on-chain storage. Implement cleanup mechanism.

Acceptance Criteria

  • Add cleanup_escrow(escrow_id) message (any participant or admin after completion)
  • Remove documents, conditions, signatures for completed/released/refunded escrows
  • Preserve minimal EscrowSummary: id, property_id, buyer, seller, amount, status, completed_at
  • Keep audit trail for compliance but move to compressed format
  • Emit EscrowCleanedUp event
  • Add get_escrow_summary(escrow_id) query for cleaned-up escrows
  • Test: cleanup removes detailed data but preserves summary
  • Test: cannot cleanup active escrow
  • Measure storage savings for typical escrow lifecycle

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestperformanceperformance related issues

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