Skip to content

feat: grant purchased traffic on the dedicated sequencer - #21

Draft
sadiq1971 wants to merge 4 commits into
feat/sync-operator-e2e-testfrom
feat/sync-operator-reconcile-traffic
Draft

feat: grant purchased traffic on the dedicated sequencer#21
sadiq1971 wants to merge 4 commits into
feat/sync-operator-e2e-testfrom
feat/sync-operator-reconcile-traffic

Conversation

@sadiq1971

@sadiq1971 sadiq1971 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Draft, stacked on #17. Implements P2-E5.3.

What this does

  • ReconcileDedicatedSequencerTrafficTrigger binds the reusable base from feat: extract reusable member-traffic reconciliation trigger (Scala) #15 to the operator's own sequencer and store. The three hooks are the whole subclass: the sequencer connection the app already holds, getTotalPurchasedMemberTraffic scoped to this operator's synchronizer, and no offset.
  • Traffic control on the splitwell synchronizer in bootstrap-canton.sc. A member only gets a traffic state, and so can only be granted extra traffic, on a synchronizer that has traffic control enabled; bootstrapOtherDomain never set it. Opt-in per synchronizer, so splitwellUpgrade is unchanged.
  • trafficBalanceReconciliationDelay returns to the config. It was removed in feat: sync operator app skeleton #16 as unread, which it was until this trigger existed.

Why the offset is 0

The SV's equivalent carries DsoRules.initialTrafficState, the traffic each member had already consumed when the DSO took over a running sequencer, and skips SV nodes holding an unlimited grant. A dedicated synchronizer has neither: accounting starts when traffic control is switched on, and there are no SVs. The mediator will need a skip once its unlimited grant lands.

The test

Registers the synchronizer by DSO vote (DsoRules_RegisterSynchronizer), buys traffic for it, and asserts the operator raised extraTrafficLimit on that sequencer by the purchased amount.

It exercises AmuletRules_BuyMemberTraffic directly with the registration disclosed, rather than going through the wallet, because CO_BuyMemberTraffic has no registration field yet (#39). That is the one shortcut; the vote, the CC burn, the MemberTraffic record and the grant are all real.

Drop the speculative "yet" from the domain time comment, and call the init step
what the variable already calls it.

Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
MIGRATION_ID is frozen network wide and logical synchronizer upgrades carry a
serial id instead, so the store's partition can never move and resolving it
bought nothing. Drops resolveDomainMigrationId and its scan fallback.

It also lines the store's stamp up with the payload.migrationId == 0L check in
the contract filter, so there is no longer a second migration id a few lines
away meaning something different.

Signed-off-by: sadiq1971 <sadiqurr8@gmail.com>
Binds the reusable reconciliation trigger from #15 to the operator's own
sequencer and store, so purchases naming its synchronizer are granted there.

Enables traffic control on the splitwell synchronizer in the canton bootstrap,
since a member only gets a traffic state, and so can only be granted extra
traffic, on a synchronizer that has it. splitwellUpgrade is left alone.

The integration test registers the synchronizer by DSO vote, buys traffic for
it with the registration disclosed, and asserts the operator raises the limit
on that sequencer. It calls the buy choice directly because the wallet path
does not carry a registration yet.

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.

1 participant