-
-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateT-enhancementType: Improvement to existing functionalityType: Improvement to existing functionality
Description
Context
PR #2814 migrated the store indexes (contracts, delegates, secrets) from the custom KEY_DATA append-only file format to ReDb. This fixes a stale file handle bug where data was lost after background compaction.
The PR includes migration code that:
- Reads existing
KEY_DATAfiles on startup - Writes all entries to the new ReDb tables
- Renames
KEY_DATAtoKEY_DATA.migrated
Task
After the next release (giving users time to upgrade and migrate their data), remove the migration code:
Files to clean up
-
crates/core/src/wasm_runtime/contract_store.rs
- Remove
migrate_from_legacy()function - Remove call to migration in
new() - Remove
legacy_key_data_pathfrom struct if unused
- Remove
-
crates/core/src/wasm_runtime/delegate_store.rs
- Remove
migrate_from_legacy()function - Remove call to migration in
new()
- Remove
-
crates/core/src/wasm_runtime/secrets_store.rs
- Remove
migrate_from_legacy()function - Remove call to migration in
new()
- Remove
-
crates/core/src/wasm_runtime/store.rs
- Remove or mark as dead code the legacy
SafeWriter,KeyDataReader, and related structs/functions that were only kept for migration - Remove the
KEY_DATAconstant if unused elsewhere
- Remove or mark as dead code the legacy
Verification
Before removing migration code, verify that:
- At least one release has shipped with the migration code
- Users have had reasonable time to upgrade (check release date)
- No reports of migration failures
[AI-assisted - Claude]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-contractsArea: Contract runtime, SDK, and executionArea: Contract runtime, SDK, and executionE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateT-enhancementType: Improvement to existing functionalityType: Improvement to existing functionality
Type
Projects
Status
Triage