fix(curio): import PDP SP miner worker key into shared Lotus daemon - #186
Conversation
`new-cluster` registers the miner's address but never imports its key, so BalanceCheck permanently flags the wallet missing and /pdp/ping returns 503.
There was a problem hiding this comment.
Pull request overview
This PR addresses Curio PDP SP setup failures by ensuring that when curio config new-cluster registers a miner address, the corresponding worker key is also imported into the shared Lotus daemon wallet, preventing downstream “wallet missing” checks and /pdp/ping failures.
Changes:
- Mount the PDP SP’s run-specific
genesis-sectorsdirectory into the Curio DB-setup container. - Extend the base-layer setup command to import
pre-seal-<miner_id>.keyinto the shared Lotus wallet afternew-cluster.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rvagg
left a comment
There was a problem hiding this comment.
as per slack this seems like an OK workaround to an unideal situation - the miner functionality is now coupled to PDP functionality in Curio through the health check, we shouldn't need to set up a full miner in foc-devnet, just PDP (but we still do, though it shouldn't cause PDP to fail cause we do!)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
src/commands/start/curio/db_setup.rs:234
- Mandatory: this container is started on the PDP network and only connected to the Lotus network afterward (lines 262–263). The fixed three-second sleep does not guarantee that Docker has attached that network or that
lotus versionsucceeds, so the newly added import can still race and leave the worker key missing. Create the container, attach both networks, then start it (asstart_curio_containerdoes), and wait for Lotus readiness before importing.
"sleep 3 && /usr/local/bin/lotus-bins/curio config new-cluster {miner_id} && \
| "sleep 3 && /usr/local/bin/lotus-bins/curio config new-cluster {miner_id} && \ | ||
| out=$(/usr/local/bin/lotus-bins/lotus wallet import /genesis-sectors/pre-seal-{miner_id}.key 2>&1); \ | ||
| echo \"$out\"; \ | ||
| echo \"$out\" | grep -qE 'imported key|key already exists'", |
There was a problem hiding this comment.
Before it was like this logic. It should be unified changed later.
new-clusterregisters the miner's address but never imports its key, so BalanceCheck permanently flags the wallet missing and /pdp/ping returns 503.