Skip to content

feat(sv-ui): render and propose a RegisterSynchronizer vote - #52

Draft
timwu20 wants to merge 2 commits into
feat/register-with-governance-parametersfrom
feat/sv-ui-register-synchronizer
Draft

timwu20 wants to merge 2 commits into
feat/register-with-governance-parametersfrom
feat/sv-ui-register-synchronizer

Conversation

@timwu20

@timwu20 timwu20 commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Closes ChainSafe/canton-extending-mainnet#121

Stacked on #47, which adds the governance parameters to the registration choice.

Summary: the SV governance UI can now display and propose a SRARC_RegisterSynchronizer
vote. Two commits, because the first is a defect fix on its own.

Render (83c7834). The UI's action list is a closed union, so a registration vote was
an unknown action to it: voteRequestDetails returned "Error, something went wrong.
Unsupported Action: SRARC_RegisterSynchronizer" and the listing showed an undefined action
name. Every SV asked to vote on a registration saw a broken row and an error page instead
of the synchronizer id and operator it was approving. The detail view now shows the
synchronizer id, the operator, and the traffic discount the registration would carry.

Propose (ee91987). A registration vote had to be assembled as an
ActionRequiringConfirmation through the API, which is what
LocalNetDedicatedSyncIntegrationTest does. The create-proposal page now offers
"Register Dedicated Synchronizer" and builds the same action that test constructs.

Two checks the form adds beyond the Daml choice, which only requires a non-empty id:

  • the synchronizer id must be name::fingerprint, the shape agreed on the design doc
    thread
  • the traffic discount, if given, must be in (0, 1], matching the template's ensure.
    Leaving it empty registers at the full price

Setting the discount here is the point of the stack: the proposal that registers a
synchronizer carries the parameters it is registered with, so an agreed discount does not
need a second vote while the synchronizer runs at full price.

How it's verified

apps-common-frontend/npmTest green, including a new
register-synchronizer-form.test.tsx: fields render, an empty form reports its required
fields and re-enables submit once filled with the discount left empty, a malformed
synchronizer id is rejected, and 1.5 is rejected where 0.5 is accepted.
apps-frontends/npmLint green.

Not in scope: the duplicate-id warning, which needs a Scan client in the SV frontend
(ChainSafe/canton-extending-mainnet#54).

The governance UI did not know SRARC_RegisterSynchronizer, so a registration vote
rendered as an unsupported-action error in the detail view and an undefined action
name in the listing: every SV was asked to vote on a proposal it could not display.

The detail view now shows the synchronizer id, its operator, and the traffic discount
the registration would carry.

Signed-off-by: Timothy Wu <tim.wu@chainsafe.io>
…UI [ci]

A registration vote had to be built as an ActionRequiringConfirmation through the API,
which is how the end-to-end test does it. The create-proposal page now offers it as a
proposal type, with the synchronizer id checked for the name::fingerprint shape rather
than only for being non-empty, and the optional traffic discount bounded to (0, 1] as
the template's ensure does.

Setting the discount here is what keeps registration one vote: the same proposal that
registers the synchronizer carries the parameters it is registered with.

Signed-off-by: Timothy Wu <tim.wu@chainsafe.io>
@timwu20
timwu20 marked this pull request as draft September 18, 2026 18:31
@timwu20
timwu20 requested a review from sadiq1971 September 18, 2026 19:16
@timwu20
timwu20 marked this pull request as ready for review September 18, 2026 21:06
@timwu20
timwu20 marked this pull request as draft September 18, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant