Repository navigation
Conversation
ad3657e to
e1af87e
Compare
moritzkiefer-da
left a comment
There was a problem hiding this comment.
thanks for the pr! It's not quite clear to me how you expect this to be used, this gives us a parameter but that parameter is unused as of this pr. How will it get picked up to allow the outage overage?
Fair question. This PR is only the Daml half, nothing reads it yet. The sync operator app picks it up in a follow-up that closes (ChainSafe/canton-extending-mainnet#129):
Outside an outage this costs one time fetch per polling interval, and the app walks the members only when an outage starts and ends. Canton accepts any limit, so the cap binds an honest operator app, like any grant today; on the registration it's SV-voted and public. Is a stale synchronizer time the signal you'd use here? I went with it over |
`GovernanceParameters` gains `outageAdvance : Int`, the traffic in bytes the operator may grant each member beyond what it has purchased while its connection to the global synchronizer is down, and takes back when it returns. It lives on the same record as the discount, so the registration vote and the set-parameters vote carry it with no new vote action. 0 disables it, and the registration's `ensure` rejects a negative amount. The record has not shipped in a release, so the field is mandatory rather than an appended Optional, as with the switch to mandatory parameters. Tests that built the record now update `defaultGovernanceParameters`, so the next field does not touch them again. DARs, dars.lock and DarResources regenerated. Towards ChainSafe/canton-extending-mainnet#129. Signed-off-by: Timothy Wu <tim.wu@chainsafe.io>
…n [ci] The registration form gains the advance, prefilled with 0 and validated as a whole number of bytes, and the review step and vote details show it. The generated type requires the field; sending a hard-coded 0 instead would leave no vote able to set one. Signed-off-by: Timothy Wu <tim.wu@chainsafe.io>
… [ci] The check rejects 'global' and a bare 'member' in Daml code, so the comment now says 'decentralized synchronizer' and 'participant'. The DAR is rebuilt because it bundles the source; its package id is unchanged. Signed-off-by: Timothy Wu <tim.wu@chainsafe.io>
e1af87e to
f8f413c
Compare
|
I see, that could work but it's unclear to me if this is the exact approach we want. A few points:
I think this is a case where we are better off first sketching out the plan in the design doc and aligning there between us on what exactly the requirements are and what approach we want to pick. |
|
Replying to your comment. The operator side that uses this cap is now up as draft #66, with an integration test that cuts the operator off the global synchronizer and checks both the advance and the take-back.
Per synchronizer because the operator carries the credit, and the bytes that buy a useful runway depend on its members' throughput: the same amount is minutes on a busy synchronizer and hours on a quiet one. A single network-wide rule works if it is expressed as time rather than bytes, say N minutes of a member's recent consumption, but measuring that means sampling every member's consumption continuously, which the current design avoids.
Yes, that is the bound on the operator's unpaid exposure. Covering an outage of any length means letting a member's balance run below zero and settling it afterwards, which needs negative traffic balances in Canton itself. So the Phase 2 question is how long an outage it has to survive: if a few hours is enough, a bounded advance covers it, and if not, Phase 2 is prepaid runway alone and longer outages wait for negative balances.
Synchronizer time is what Splice already uses to tell that an app is behind its synchronizer (
Agreed. I'll write up the requirements and options in the design doc and link it here. Any cap is a Daml change, so it has to be settled by mid-October to make the 0.10.0 cut, and I'll get the write-up out this week. |
|
Closing this following what we agreed in today's sync: the outage allowance won't be an SV-voted parameter on the registration, so there is no Daml change and nothing for 0.10.0. Instead, during a global-synchronizer outage the operator sets an allowance in the sync operator app's local config, following the runbook, and removes it once the global synchronizer is back. While it's set, the app raises each member's limit to its purchased total plus the allowance. Once it's removed, the app sets each limit back to the purchased total. The app also warns while the allowance is set, and when a purchase lands while it's still set, since that means the global synchronizer is reachable again. A new PR will implement this in the sync operator app, together with the validator top-up buying a member's shortfall in one purchase. It's tracked in ChainSafe/canton-extending-mainnet#129. |
Towards ChainSafe/canton-extending-mainnet#129. This is the Daml half, so it can make the 0.10.0 cut; the operator app's advance and take-back, the top-up change and the LocalNet test follow on the 0.10.3 train.
Summary:
GovernanceParametersgainsoutageAdvance : Int, the traffic in bytes the operator may grant each member beyond what it has purchased while its connection to the global synchronizer is down, and takes back when it returns. A member keeps transacting through a global-synchronizer outage and repays by purchase afterwards, which is FR-3's settle-on-restoration without negative balances in Canton.It is set by SV vote on the same record as the discount, so the registration vote and the set-parameters vote carry it with no new vote action. 0 disables the advance, and the registration's
ensurerejects a negative amount. The operator app applies it off-ledger; the sequencer accepts any limit, so the cap binds an honest operator, the same trust model as every traffic grant.Upgrade compatibility.
GovernanceParametershas not shipped in a release, so the field is mandatory rather than an appendedOptional, as when the parameters became mandatory. The same six DARs rebuild as then.SV UI. The registration form gains the field, prefilled with 0 and validated as a whole number of bytes, and the review step and vote details show it. The generated type requires the field, and sending a hard-coded 0 would leave no vote able to set an advance.
How it's verified
splice-amulet-test,splice-dso-governance-testandsplice-wallet-testdamlTest green, with no Daml warnings. New tests: a registration carries the advance, a set-parameters vote changes it and leaves the discount alone, and the template rejects a negative amount, with a positive control.dars.lockandDarResourcesregenerated;apps-wallet,apps-scan,apps-syncoperatorandapps-appTest/compilegreen.tsc, eslint and prettier clean; the governance tests pass, including new prefill and validation tests for the field.