Summary
Update the registry_contract to optionally enforce that new document/project entries have strictly increasing (monotonic) timestamps and cannot be backdated, ensuring historical integrity and preventing manipulation of project/document history.
Social Media Link
Let's collaborate on Discord. And ensure to star our repo.
Technical Context
- Motivation: Allowing backdated or non-monotonic timestamps can undermine the trustworthiness of the registry, enabling actors to rewrite history or create ambiguous document orderings. Enforcing monotonicity and anti-backdating protects the integrity of the registry timeline.
- Current State: The contract does not enforce any ordering or anti-backdating checks on timestamps for new entries.
Requirements
Contract Changes
- Add an optional (configurable) flag to enable strict monotonic timestamp enforcement.
- When enabled, require that each new document/project entry has a timestamp strictly greater than the previous entry for the same project.
- Reject any entry with a timestamp less than or equal to the last recorded timestamp (anti-backdate).
- Return clear error messages for violations.
Acceptance Criteria
- When enabled, contract enforces strict monotonicity and anti-backdating for timestamps.
- Violations are rejected with clear errors.
- Unit tests cover:
- Successful addition of monotonic entries
- Rejection of backdated or duplicate-timestamp entries
- Toggle of the enforcement flag
Definition of Done
- PR with contract code changes and tests
- Documentation updated to describe the enforcement option
- Team review completed
Working Directory:
stellar-core/verifiable-registry/contracts/registry_contract
Summary
Update the
registry_contractto optionally enforce that new document/project entries have strictly increasing (monotonic) timestamps and cannot be backdated, ensuring historical integrity and preventing manipulation of project/document history.Social Media Link
Let's collaborate on Discord. And ensure to star our repo.
Technical Context
Requirements
Contract Changes
Acceptance Criteria
Definition of Done
Working Directory:
stellar-core/verifiable-registry/contracts/registry_contract