PoC: registration lifecycle (offboard vote + reporting-state wiring) - #12
Open
timwu20 wants to merge 1 commit into
Open
PoC: registration lifecycle (offboard vote + reporting-state wiring)#12timwu20 wants to merge 1 commit into
timwu20 wants to merge 1 commit into
Conversation
1 task
timwu20
force-pushed
the
multi-sync-poc-registration-lifecycle
branch
from
August 4, 2026 19:19
40d8b4a to
f5a7cb0
Compare
timwu20
force-pushed
the
multi-sync-poc-reward-reporting
branch
from
August 4, 2026 19:19
2bb23d4 to
7ae0c9b
Compare
…ate wiring [ci] - DsoRules_ArchiveSynchronizerRegistration (vote-dispatched via appended SRARC constructor): archives a RegisteredSynchronizer and its DedicatedSynchronizerState in one governed action, validating the state belongs to the registration; recovery path for duplicate registrations. Hard archive by design: an archived registration cannot be disclosed, so the buy gate closes with no new checks; authorized reward processing for past rounds completes, new work stops. - DsoRules_RegisterSynchronizer now creates the reporting state, so the operator can report from its first round. - Tests: archive-via-vote, mismatched-state negative, registration-creates- state assertion; vote test reports against the vote-created state. Signed-off-by: Timothy Wu <tim.wu@chainsafe.io>
timwu20
force-pushed
the
multi-sync-poc-registration-lifecycle
branch
from
August 4, 2026 19:23
f5a7cb0 to
c85a34a
Compare
timwu20
force-pushed
the
multi-sync-poc-reward-reporting
branch
from
August 4, 2026 19:23
7ae0c9b to
39cfab1
Compare
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.
Daml PoC, stacked on the reward-reporting rung (#8). Completes the registration story create-to-archive: the offboard vote requested in review (#1 thread), plus the production wiring for the reporting state.
What this does
DsoRules_ArchiveSynchronizerRegistration(new choice, vote-dispatched via appendedSRARC_ArchiveSynchronizerRegistration): archives aRegisteredSynchronizerand itsDedicatedSynchronizerStatein one governed action, validating that the state belongs to the registration. This is also the recovery path for a duplicate registration that slips past the SV-UI uniqueness check.DsoRules_RegisterSynchronizercreates theDedicatedSynchronizerStatealongside the registration, so an operator can report from its first round (production wiring for PoC: extension reward reporting + expansion (Daml) #8's report flow, following its assumption 2).Offboarding semantics (design position — flagging for review)
Hard archive, no lifecycle-state field. Archival is the state: an archived registration cannot be disclosed, so the buy gate closes with no new checks anywhere; the archived state contract ends reporting the same way. Deliberately untouched:
MemberTrafficrecords (history), and reward processing already authorized for past rounds (ProcessRewardsV2contracts complete) — authorized work finishes, new work stops. A suspend-style status field stays addable later if wanted; it would put a new check into every reader, so it is not included here.Two edges of this shape, named rather than found:
optStateCid = Nonefor a registration that has a state leaves that state active (Daml cannot check contract absence). No choice in this PR archives a state standalone; the cleanup path is the state's implicit signatoryArchiveexercised as the DSO party — the usual admin-archive precedent.lastReportedRound = None), so rounds already reported under the old registration could be reported again. Processing stays vote-gated per report, which is the backstop; a re-registration vote can also carry the old high-water mark forward if the SVs prefer.How it's verified (Daml Script)
test_RegisterSynchronizer_viaVote(extended): registration creates the reporting state.test_ArchiveSynchronizerRegistration_viaVote: register then offboard via 4-SV votes; both contracts gone.test_ArchiveSynchronizerRegistration_mismatchedState: archiving with another synchronizer's state is rejected; the same exercise with the matching state then succeeds (positive control).test_ArchiveSynchronizerRegistration_duplicateSynchronizerId: two registrations sharing a synchronizer id under different operators (the duplicate-recovery scenario) — archiving one cannot take the other operator's state, so the state check matches on operator as well as synchronizer id.test_ArchiveSynchronizerRegistration_noState: a registration predating the reporting state offboards withoptStateCid = None.TestExtensionRewardVote(updated): reports against the vote-created state instead of a test-created one.Full amulet, wallet, and dso-governance suites pass.
Tracked in
Implements E1-4 (ChainSafe/canton-extending-mainnet#30); the SV-UI duplicate check that pairs with this as the uniqueness mechanism is #54.