Skip to content

Add storage-tier documentation for validators - #1

Open
Manta-Byte wants to merge 1 commit into
mainfrom
feature/storage-tier-docs-719
Open

Add storage-tier documentation for validators#1
Manta-Byte wants to merge 1 commit into
mainfrom
feature/storage-tier-docs-719

Conversation

@Manta-Byte

Copy link
Copy Markdown
Owner

Summary

Documents every storage key used in the validators contract, organized by Soroban storage tier (Instance / Persistent / Temporary), with rationale for each tier classification.

Changes

  • Added contracts/validators/docs/storage.md: a full tier reference covering all storage keys used by the contract (Admin, StorageVersion, AuthorisedUpgrade — all Instance tier), including a tier-overview table, per-key access metadata, TTL management strategy, and explicit rationale for why the Persistent and Temporary tiers are unused here.
  • Enhanced inline /// rustdoc on the StorageKey enum in migrate.rs with per-variant tier rationale matching the docs.
  • Added 10 new unit tests (20 → 30 total) covering tier segregation (confirming reads/writes stay on the Instance tier), TTL bump-path behavior, an upgrade-overwrite case, and an enum exhaustiveness guard.

Security checklist

  • require_auth on all state-changing entrypoints
  • No unwrap() in production paths (only unwrap_or/unwrap_or_else with safe defaults)
  • Overflow-safe arithmetic (checked_add)
  • Rustdoc present on all storage-related public items

Closes CalloraOrg#719## Summary
Documents every storage key used in the validators contract, organized by Soroban storage tier (Instance / Persistent / Temporary), with rationale for each tier classification.

Changes

  • Added contracts/validators/docs/storage.md: a full tier reference covering all storage keys used by the contract (Admin, StorageVersion, AuthorisedUpgrade — all Instance tier), including a tier-overview table, per-key access metadata, TTL management strategy, and explicit rationale for why the Persistent and Temporary tiers are unused here.
  • Enhanced inline /// rustdoc on the StorageKey enum in migrate.rs with per-variant tier rationale matching the docs.
  • Added 10 new unit tests (20 → 30 total) covering tier segregation (confirming reads/writes stay on the Instance tier), TTL bump-path behavior, an upgrade-overwrite case, and an enum exhaustiveness guard.

Security checklist

  • require_auth on all state-changing entrypoints
  • No unwrap() in production paths (only unwrap_or/unwrap_or_else with safe defaults)
  • Overflow-safe arithmetic (checked_add)
  • Rustdoc present on all storage-related public items

Closes CalloraOrg#719## Summary
Documents every storage key used in the validators contract, organized by Soroban storage tier (Instance / Persistent / Temporary), with rationale for each tier classification.

Changes

  • Added contracts/validators/docs/storage.md: a full tier reference covering all storage keys used by the contract (Admin, StorageVersion, AuthorisedUpgrade — all Instance tier), including a tier-overview table, per-key access metadata, TTL management strategy, and explicit rationale for why the Persistent and Temporary tiers are unused here.
  • Enhanced inline /// rustdoc on the StorageKey enum in migrate.rs with per-variant tier rationale matching the docs.
  • Added 10 new unit tests (20 → 30 total) covering tier segregation (confirming reads/writes stay on the Instance tier), TTL bump-path behavior, an upgrade-overwrite case, and an enum exhaustiveness guard.

Security checklist

  • require_auth on all state-changing entrypoints
  • No unwrap() in production paths (only unwrap_or/unwrap_or_else with safe defaults)
  • Overflow-safe arithmetic (checked_add)
  • Rustdoc present on all storage-related public items

Closes CalloraOrg#719## Summary
Documents every storage key used in the validators contract, organized by Soroban storage tier (Instance / Persistent / Temporary), with rationale for each tier classification.

Changes

  • Added contracts/validators/docs/storage.md: a full tier reference covering all storage keys used by the contract (Admin, StorageVersion, AuthorisedUpgrade — all Instance tier), including a tier-overview table, per-key access metadata, TTL management strategy, and explicit rationale for why the Persistent and Temporary tiers are unused here.
  • Enhanced inline /// rustdoc on the StorageKey enum in migrate.rs with per-variant tier rationale matching the docs.
  • Added 10 new unit tests (20 → 30 total) covering tier segregation (confirming reads/writes stay on the Instance tier), TTL bump-path behavior, an upgrade-overwrite case, and an enum exhaustiveness guard.

Security checklist

  • require_auth on all state-changing entrypoints
  • No unwrap() in production paths (only unwrap_or/unwrap_or_else with safe defaults)
  • Overflow-safe arithmetic (checked_add)
  • Rustdoc present on all storage-related public items

Closes CalloraOrg#719

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add storage-tier documentation for validators

2 participants