Repository navigation
feat: replace a registered Piri's delegation in sprue on onboarding - #287
Merged
Merged
Conversation
sprue kept the delegation it got at registration for good, so a delegation the node reissued with new commands never reached it. When sprue already holds the provider and the request carries the Piri proof, onboarding now replaces sprue's copy through /admin/provider/proofs/set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alanshaw
force-pushed
the
ash/feat/onboard-sets-sprue-proofs
branch
from
October 20, 2026 15:49
585aa75 to
c4aa01e
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Human confirmation is needed that every stage supports the new sprue API before the updated Lambda rolls out.
No open issues 🎉
What changed in this PR
Updates Piri onboarding to replace an existing provider’s delegation in sprue without deregistering it or resetting its weights.
Changes:
- Adds proof replacement when a registered provider’s request includes
PIRI_PROOF. - Adds regression tests and documents the delegation refresh workflow.
- Updates sprue and related dependencies for the new API.
| File | Description |
|---|---|
| internal/onboard/sprue.go | Adds the proof-replacement client method. |
| internal/onboard/onboard.go | Plans and applies delegation replacement. |
| internal/onboard/onboard_test.go | Tests replacement and fresh-registration behavior. |
| go.sum | Updates dependency checksums. |
| go.mod | Updates sprue and related dependency versions. |
| docs/appliance-onboarding.md | Documents delivering reissued delegations. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Onboarding a Piri that sprue already holds now replaces sprue's copy of its delegation with the one in the request. This is how a delegation the node reissued reaches sprue. Before this, sprue kept the delegation it got at registration for good, and the only way to change it was to deregister the provider, which resets its weights.
fil-forge/infra-nodes#192 added
/blob/releaseand/blob/rejectto the delegation, and fil-forge/infra-nodes#194 makeskeygen.shreissue it when its commands change. With this change an existing node gets the new grants into sprue by runningkeygen.shandonboarding-request.sh, then onboarding again with the new proof.PIRI_PROOF, the plan includes "replace did:…'s delegation in sprue with the one in the request" andApplycalls the newSprueClient.SetProofs(/admin/provider/proofs/set). sprue has no read of the proofs it holds, so this happens on every run that carries one, the same way weights are written on every run.PIRI_PROOFleaves sprue's copy alone, so a second run still needs no proof.docs/appliance-onboarding.mddescribes the replacement and how to deliver a reissued delegation.Depends on fil-forge/sprue#149.
go.modpins sprue to that PR's commit (db351b7), the only placeAdminProviderProofsSetexists yet. The pin also brings ucantone from 2026-08-27 to 2026-09-28 and libforge to 2026-10-01. Everything builds and the tests pass, including the hilt client. Before merging:PIRI_PROOFfails on the unknown command, including re-runs for other reasons such as adding a Piri to a region.Tests: plan and apply for a registered provider with a proof (replaced, not re-registered), and a fresh provider (not replaced). Four existing tests that assert exact action lists for unrelated cases now leave the proof out of their request.
go test ./...passes.🤖 Generated with Claude Code