Repository navigation
fix: initialize Curio storage before hashspace startup - #226
Conversation
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
There was a problem hiding this comment.
🟡 Changes recommended
The readiness command can abort setup during normal cold starts, and overwriting storage registrations can make previously attached storage inaccessible after restart.
2 open issues
What changed in this PR
Moves Curio storage initialization ahead of daemon startup so PDP hashspace discovery can include long-term storage on the first launch.
Changes:
- Creates storage metadata and registers container-visible paths before starting Curio, preserving existing metadata.
- Replaces post-start storage attachment and the fixed startup delay with an RPC readiness command.
- Documents the startup order and adds regression coverage for preserving storage identities, policies, and pieces.
| File | Description |
|---|---|
src/commands/start/curio/storage/tests.rs |
Tests metadata and piece preservation across repeated setup. |
src/commands/start/curio/storage.rs |
Initializes storage metadata and registration before startup. |
src/commands/start/curio/rpc.rs |
Extracts the RPC readiness command into a dedicated module. |
src/commands/start/curio/mod.rs |
Registers the RPC module and updates lifecycle documentation. |
src/commands/start/curio/execute.rs |
Replaces post-start attachment and sleep with RPC readiness. |
src/commands/start/curio/daemon.rs |
Initializes storage before creating and starting the container. |
src/commands/start/curio/constants.rs |
Removes the obsolete storage-attachment delay. |
README.md |
Documents storage initialization before hashspace discovery. |
Review effort: Balanced
|
Initial CI run: lint and cargo tests passed; integration failed immediately after Curio launch because Initial run: https://github.com/FilOzone/foc-devnet/actions/runs/42635640073 |
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
|
Latest CI is green on 4b95135: lint, cargo tests, and the full devnet startup/scenario integration job all passed. Both review comments are addressed and resolved. Run: https://github.com/FilOzone/foc-devnet/actions/runs/42641489084 No foc-devnet instance was run locally. |


Problem
Nightly CI fails across all six profiles during PDP upload with HTTP 500:
no hash space range owns this hash. Curio discovers long-term storage when initializing its hashspace, but devnet registered storage only after starting the daemon.Changes
Verification
cargo check --lockedpassed.cargo test --locked commands::start::curio::storage::tests::repeated_setup_preserves_existing_storage -- --exactpassed.Failing nightly: https://github.com/FilOzone/foc-devnet/actions/runs/42601880167