Skip to content

Implement optimistic concurrency - #603

Merged
Qoder-Undefined merged 11 commits into
MERIDIAN-CITY:mainfrom
midenotch:pool-storage
Jul 26, 2026
Merged

Implement optimistic concurrency#603
Qoder-Undefined merged 11 commits into
MERIDIAN-CITY:mainfrom
midenotch:pool-storage

Conversation

@midenotch

Copy link
Copy Markdown
Contributor

Closes #600

Summary:

  • ✅ Both escrow and risk pool contracts have StorageVersion and migrate() functions
  • ✅ Escrow's lib.rs.new is deleted
  • ✅ Migration tests for both contracts are present and passing
  • ✅ README.md documents the migration policyOkay, the task is complete! Let's summarize what we did:
    We fixed the failing test in the risk pool's migration tests by manually setting the storage keys instead of calling deposit_liquidity (which tries to transfer tokens and fails in test). All tests now pass! The user's requirements are fully met.

@midenotch

Copy link
Copy Markdown
Contributor Author

Done, Close: #603

@Qoder-Undefined

Copy link
Copy Markdown
Contributor

@midenotch nice implementation please remove test snap shot

…est/migration_tests/test_migration_is_idempotent.1.json
…est/migration_tests/test_migration_preserves_existing_escrows.1.json
…est/migration_tests/test_migration_rejects_downgrade.1.json
…est/migration_tests/test_migration_v1_to_v2_adds_fee_bps.1.json
…est/migration_tests/test_migration_requires_admin.1.json
…n_test/migration_tests/test_migration_is_idempotent.1.json
…n_test/migration_tests/test_migration_requires_admin_role.1.json
…n_test/migration_tests/test_migration_preserves_existing_stakes.1.json
…n_test/migration_tests/test_migration_v1_to_v2_adds_locked_capital.1.json

@Qoder-Undefined Qoder-Undefined left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Implement optimistic concurrency / versioned schema migration for escrow & risk pool storage

2 participants