Skip to content

ShipmentDependents grows without bound in instance storage and is never purged #786

Description

@dinahmaccodes

Tier: Hard
Description: Unlike every other per-shipment index (notes, evidence, recovery records, status hashes) which live in persistent storage and are purged on archival, ShipmentDependents(dependent_id) (storage.rs:2190-2208) lives in instance storage and is entirely absent from archive_shipment's cleanup block. Instance storage is a single shared ledger entry across the whole contract, making unbounded growth here a scalability risk larger in impact than a comparable persistent-key leak.
Files: contracts/shipment/src/storage.rs:2190-2208
Tasks:

  • Move ShipmentDependents to persistent storage and add it to archive_shipment's purge list
    Acceptance Criteria:
  • ShipmentDependents entries are purged on archival and no longer inflate instance storage indefinitely

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions