Skip to content

feat: add core upgrade migration path#533

Closed
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/core-upgrade-migrate-465
Closed

feat: add core upgrade migration path#533
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/core-upgrade-migrate-465

Conversation

@dangelo352

Copy link
Copy Markdown

Summary

  • add commitment_core version storage with get_version, admin-only upgrade, and admin-only migrate entrypoints
  • reject all-zero WASM hashes and invalid/replayed migrations
  • backfill legacy counters/indexes/guard without changing commitment state
  • document the commitment_core upgrade and migration path

Fixes #465

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-core-upgrade-target cargo test -p commitment_core migrate -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-core-upgrade-target cargo test -p commitment_core upgrade -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-core-upgrade-target cargo test -p commitment_core settle -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-core-upgrade-target cargo test -p commitment_core early_exit -- --nocapture

Note: I also ran cargo test -p commitment_core create_commitment -- --nocapture; it exercised the create suite but hit two pre-existing event/id expectation failures unrelated to this migration change.

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 upgrade and migrate entrypoints to commitment_core with version storage

2 participants