Skip to content

fix(curio): import PDP SP miner worker key into shared Lotus daemon - #186

Merged
beck-8 merged 2 commits into
mainfrom
fix/import-pdp-sp-worker-key
Aug 26, 2026
Merged

fix(curio): import PDP SP miner worker key into shared Lotus daemon#186
beck-8 merged 2 commits into
mainfrom
fix/import-pdp-sp-worker-key

Conversation

@beck-8

@beck-8 beck-8 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

new-cluster registers the miner's address but never imports its key, so BalanceCheck permanently flags the wallet missing and /pdp/ping returns 503.

`new-cluster` registers the miner's address but never imports its key,
so BalanceCheck permanently flags the wallet missing and /pdp/ping
returns 503.
@beck-8 beck-8 self-assigned this Aug 26, 2026
@beck-8
beck-8 requested a review from rvagg as a code owner August 26, 2026 12:34
Copilot AI lite review requested due to automatic review settings August 26, 2026 12:34
@FilOzzy FilOzzy added this to FOC Aug 26, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Aug 26, 2026

Copilot AI 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.

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-sectors directory into the Curio DB-setup container.
  • Extend the base-layer setup command to import pre-seal-<miner_id>.key into the shared Lotus wallet after new-cluster.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/commands/start/curio/db_setup.rs
Comment thread src/commands/start/curio/db_setup.rs
@FilOzzy FilOzzy moved this from 📌 Triage to 🔎 Awaiting review in FOC Aug 26, 2026

@rvagg rvagg 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.

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!)

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Aug 26, 2026

Copilot AI 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.

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 version succeeds, so the newly added import can still race and leave the worker key missing. Create the container, attach both networks, then start it (as start_curio_container does), 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'",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Before it was like this logic. It should be unified changed later.

@beck-8
beck-8 merged commit 6242d1a into main Aug 26, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Aug 26, 2026
@beck-8
beck-8 deleted the fix/import-pdp-sp-worker-key branch August 26, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants