Skip to content

feat: bootstrap a dedicated synchronizer - #33

Open
sadiq1971 wants to merge 7 commits into
mainfrom
feat/dedicated-synchronizer-parameters
Open

feat: bootstrap a dedicated synchronizer#33
sadiq1971 wants to merge 7 commits into
mainfrom
feat/dedicated-synchronizer-parameters

Conversation

@sadiq1971

@sadiq1971 sadiq1971 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

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.

splice-localnet-compose.sh start -O

@sadiq1971
sadiq1971 force-pushed the feat/dedicated-synchronizer-parameters branch 7 times, most recently from ee11c3b to 3dd7eca Compare September 9, 2026 12:57
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>
@sadiq1971
sadiq1971 force-pushed the feat/dedicated-synchronizer-parameters branch from 3dd7eca to 4855555 Compare September 9, 2026 13:01
@sadiq1971
sadiq1971 marked this pull request as ready for review September 9, 2026 13:03
@sadiq1971 sadiq1971 self-assigned this Sep 9, 2026
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>
Comment thread project/ignore-patterns/canton_network_test_log.ignore.txt Outdated
parameters.tryUpdate(trafficControlParameters =
Some(
parameters.trafficControl
.getOrElse(TrafficControlParameters())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you want all of them to be configurable?

Also are you sure that going from no traffic -> traffic enabled works properly (changing traffic parameters if traffic was already enabled is definitely fine)? If we do want to support this I think we need a lot more testing around this. I'd lean towards making it an error if traffic management was not already enabled.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it rather an enforcement from the sync operator perspective to have base rate 0 and rest configured from the bootstrap of the synchronizer.
But yeah make sense to add rest.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And on no traffic -> traffic yes it works - checked loally. Also if traffic is already set it can be overwritten as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also may be in future we will be passing more broader in general config for the seqeuncer like we are doing in sv automation

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest configured from the bootstrap of the synchronizer.

I think you want the option to change it later relatively easily so it makes sense to have it in the automation not just bootstrap.

And on no traffic -> traffic yes it works - checked loally. Also if traffic is already set it can be overwritten as well

There are two issues

  1. This code path is not really tested at the moment.
  2. We don't have a good migration story. Right now you would turn on traffic management, everything fails until nodes are able to top-up. That's a bit of a mess.

We also explicitly said that the migration from phase 1 -> phase 2 which might go no traffic management -> traffic management is out of scope.

So I would turn this around:

  1. Assume the synchronizer is bootstrapped with traffic management.
  2. Check this once during startup and if it isn't hard fail. If a user wants to switch they can do so through console commands but more likely this seems to be an accident at this point.
  3. In the trigger adjust the parameters but never switch from no traffic management -> traffic management.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarifications. I have updated this in the new commit -

  1. Bootstrap enables traffic control with canton's default
  2. Sync Operator have the configurable traffic params to update on the dsync. If traffic control is not enabled on the dsyn- hard fail.
  3. Localnet e2e test has been added for dedicated sync.

@sadiq1971
sadiq1971 force-pushed the feat/dedicated-synchronizer-parameters branch from 1cbb4cb to 4855555 Compare September 10, 2026 10:18
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>
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.

[P2-E8.1] Synchronizer bootstrapping

2 participants