feat: bootstrap a dedicated synchronizer - #33
Conversation
ee11c3b to
3dd7eca
Compare
The operator keeps traffic control on for the synchronizer it serves, at a zero base traffic amount so that all of its traffic is paid for. Enforcement waits for the DSO registration, since members onboard with charged topology transactions and traffic cannot be bought for an unregistered synchronizer. Its store ingests that registration, and it now waits for Scan instead of failing when Scan is still initializing. On LocalNet the operator runs behind the sync-operator profile, which splice-localnet-compose.sh -O turns on, since it cannot start until the app-synchronizer has been bootstrapped. Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
3dd7eca to
4855555
Compare
The two reward-accounting BFT reads already have their 'disagreed with consensus' warning ignored by trigger. They emit 'Consensus not reached.' when no peer converges at all, which was ignored only for named suites, so SvTimeBasedAmuletPriceIntegrationTest failed the simtime shard. Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
1cbb4cb to
4855555
Compare
It is unrelated to this PR: the simtime shard flake it silences comes from SvTimeBasedAmuletPriceIntegrationTest, not from anything here. Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
Look the registration up with findAnyContractWithOffset rather than a one-element listContracts. Make the traffic control parameters configurable, the same four the SV exposes through SynchronizerFeesConfig, defaulting to Canton's own values. The trigger applies those four and leaves the rest as the synchronizer has them. Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
…end to end [ci] The app-synchronizer is bootstrapped with traffic control at Canton's defaults, and the sync operator refuses to start against a synchronizer that does not run it. Adds a LocalNet end-to-end test: the DSO registers the synchronizer, the operator narrows the base rate to zero, and a member buys traffic before it can transact on it. Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
The compose start returns before the SV serves its DSO info and before the validator has onboarded the operator's ledger API user, so CI failed on a 404 from /v1/dso. Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
|
|
||
| private val synchronizerId = store.key.synchronizerId | ||
|
|
||
| // Members onboard with charged topology transactions, and traffic cannot be bought for this |
There was a problem hiding this comment.
I don't understand what you mean with a "charged topology transaction". I also don't see why you need this condition at all. This trigger does not purchase traffic, it just configures the right traffic management parameters.
There was a problem hiding this comment.
The guard delayed lowering the base rate until the registration existed: connecting is free, but everything a participant does after that (vetting DARs, the multi-sync flag) is a charged send, so zeroing the base rate before the DSO had registered the synchronizer left a participant still setting up with no allowance and no way to buy. That state is only transient though, once registered it can buy and its pending sends go through.
But starting with base rate 0 - that is not required so I will remove
| _.update(trafficControl = | ||
| Some( | ||
| TrafficControlParameters( | ||
| maxBaseTrafficAmount = NonNegativeLong.tryCreate(10 * 20 * 1024), |
There was a problem hiding this comment.
That doesn't look right to me, we should already bootstrap with traffic = 0.
There was a problem hiding this comment.
One thing this runs into: with base rate 0 at bootstrap, plain -M (multi-sync without the sync operator, which LocalNetReassignIntegrationTest uses) stops working, since nothing grants the mediator or the participants any traffic. Two options: apply base rate 0 only when the operator is started (-O), keeping Canton's default for plain -M; or make -M always start the sync operator?
It's something like should we be backward compatible for this flag or not.
Closes ChainSafe/canton-extending-mainnet#98
Summary: The app-synchronizer is bootstrapped with traffic control on, and the sync operator
narrows its base traffic amount to zero once the DSO registers the synchronizer, refusing to start
if traffic control is off. A LocalNet end-to-end test covers registration, the zero base rate, and
a member buying traffic before it can transact.