feat: grant purchased traffic on the dedicated sequencer - #21
Draft
sadiq1971 wants to merge 4 commits into
Draft
Conversation
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>
…at/sync-operator-reconcile-traffic
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, stacked on #17. Implements P2-E5.3.
What this does
ReconcileDedicatedSequencerTrafficTriggerbinds 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,getTotalPurchasedMemberTrafficscoped to this operator's synchronizer, and no offset.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;bootstrapOtherDomainnever set it. Opt-in per synchronizer, sosplitwellUpgradeis unchanged.trafficBalanceReconciliationDelayreturns 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 raisedextraTrafficLimiton that sequencer by the purchased amount.It exercises
AmuletRules_BuyMemberTrafficdirectly with the registration disclosed, rather than going through the wallet, becauseCO_BuyMemberTraffichas no registration field yet (#39). That is the one shortcut; the vote, the CC burn, theMemberTrafficrecord and the grant are all real.