Skip to content

docs(postage): add storage key migration notes and discriminant tests - #1907

Open
oladeeayo wants to merge 1 commit into
Stellar-Mail:mainfrom
oladeeayo:docs/postage-storage-key-migration-1394
Open

docs(postage): add storage key migration notes and discriminant tests#1907
oladeeayo wants to merge 1 commit into
Stellar-Mail:mainfrom
oladeeayo:docs/postage-storage-key-migration-1394

Conversation

@oladeeayo

Copy link
Copy Markdown

Improve contracts/soroban/postage/src/lib.rs by adding storage key migration documentation and discriminant pinning tests to reduce ledger integration risk.

Changes

  • Storage migration notes added as doc comments above \DataKey\ enum — documents storage layout, #[contracttype]\ encoding rules, hazards of renaming/removing variants, and a 4-step migration procedure
  • \storage_keys\ test module pins discriminant names for all three \DataKey\ variants (\Config, \Guard, \Postage) and verifies distinct message ids produce distinct storage keys
  • *\docs/storage.md* — standalone reference for storage layout, encoding semantics, migration plan, and test coverage

Closes #1394

Add storage migration documentation to the DataKey enum in lib.rs,
create a dedicated docs/storage.md reference, and pin all three
DataKey discriminants (Config, Guard, Postage) in a storage_keys
test module to prevent accidental renames from orphaning ledger state.

Closes Stellar-Mail#1394
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 key migration notes for Soroban postage contract

2 participants