Controller rotation reconciliation: single-writer baseline and multi-process boundary #440
yshyn-iohk
started this conversation in
General
Replies: 1 comment
|
The proposed baseline is approved for the current API:
PR #432 now records this decision in the API README, 0.6 migration guide, method specification, changelog, and tracked retrospective at exact head Exact-head review and CI have been requested for the updated PR. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
PR #432 addresses the partial-failure hazards tracked by #240, including controller rotation/recovery when a transaction may have finalized but the client loses the receipt or finality connection.
The current implementation persists a replacement controller secret before submission, retains it after an ambiguous outcome, and uses a process-local fail-fast reservation to prevent overlapping mutation of the same DID private state.
This discussion asks maintainers and integrators to confirm the intended deployment and reconciliation model before we add distributed coordination complexity.
Proposed near-term architecture
Adopt a single-writer-per-DID invariant for the current API baseline:
Under this invariant, an external coordinator is not required for the normal supported deployment. An integrator that intentionally permits multiple processes to update the same DID must provide a distributed lock/fencing design; that is a separate architecture with separate operational complexity and should not be implied by the basic API.
Ambiguous rotation/recovery outcome
A successful method return or transaction receipt is useful evidence, but the authoritative success criterion should be the latest trusted finalized smart-contract state.
When submission/finality fails because connectivity is lost:
controllerPublicKey.The important invariant is: never discard the only secret that may correspond to the finalized on-ledger controller key.
Explicit boundary
The current private-state provider exposes no cross-process compare-and-set operation. Therefore this proposal does not claim transparent safety for multiple independent writer processes.
If multi-process DID writers become a requirement, the design should explicitly add a distributed lock or provider-enforced fencing/CAS mechanism, including ownership, lease renewal, stale-owner rejection, recovery, and operational monitoring. That should be designed and reviewed separately rather than hidden inside the single-process API.
Questions for maintainers and integrators
rotationFinalized: true/falseassertions with areconcilePendingControllerOperationhelper that reads and classifies ledger state?Related: #432, #240.
All reactions