feat: per-synchronizer validator top-up configuration - #28
Merged
Conversation
Adds buy-extra-traffic settings to domains.extra entries via a new two-field
ExtraSynchronizerTopupConfig, and a topupTargets accessor returning the
non-zero targets with global first. That accessor is the handoff to the
trigger fan-out.
A narrower type than BuyExtraTrafficConfig, whose grpcDeadline is read once
app-wide and has no per-synchronizer plumbing. Existing {alias, url} entries
are unchanged; targetThroughput defaults to 0.
Signed-off-by: Sebastian Lindner <33971232+salindne@users.noreply.github.com>
The check read domains.global.buy-extra-traffic only, so a per-synchronizer min-topup-interval set below the polling interval escaped it. It now iterates topupTargets, which already drops zero-throughput entries, so the global case stays covered by the general check rather than by a separate one. Signed-off-by: Sebastian Lindner <33971232+salindne@users.noreply.github.com>
salindne
marked this pull request as ready for review
September 3, 2026 18:45
Signed-off-by: Sebastian Lindner <33971232+salindne@users.noreply.github.com>
Say what is surprising about the code rather than why the change is right. The reasoning is in the commit messages and the PR. Signed-off-by: Sebastian Lindner <33971232+salindne@users.noreply.github.com>
moritzkiefer-da
approved these changes
Sep 7, 2026
|
|
||
| /** Extra traffic purchase settings for a single synchronizer. | ||
| * | ||
| * Narrower than [[BuyExtraTrafficConfig]], which also carries `grpcDeadline`. That one is |
There was a problem hiding this comment.
what's the argument for not wanting a grpc deadline here?
Collaborator
Author
There was a problem hiding this comment.
No good argument, this was wrong. Dropped the narrow type and reused BuyExtraTrafficConfig, which also removed its two pureconfig instances and most of topupTargets
| canton.validator-apps.validator_backend.domains.extra.{{ $ii }} = { | ||
| alias = {{ $domain.alias | quote }} | ||
| url = {{ $domain.url | quote }} | ||
| {{- if $domain.topup }} |
There was a problem hiding this comment.
with usually works quite nice for this stuff and is a bit easier to read imho
| topup { | ||
| target-throughput = {{ $domain.topup.targetThroughput }} | ||
| {{- if $domain.topup.minTopupInterval }} | ||
| min-topup-interval = {{ $domain.topup.minTopupInterval }} |
There was a problem hiding this comment.
this is a mandatory parameter for the global synchronizer, why should it not be mandatory here?
Collaborator
Author
There was a problem hiding this comment.
changed it to align
| "url": { | ||
| "type": "string" | ||
| }, | ||
| "topup": { |
There was a problem hiding this comment.
factor this out into a def and reuse it between the global synchronizer schema and this
The narrower ExtraSynchronizerTopupConfig left out grpcDeadline on the grounds that it had no per-synchronizer plumbing. It does: ValidatorApp passes it to ValidatorAutomationService, which passes it to TopupMemberTrafficTrigger, and that trigger is what the fan-out instantiates per synchronizer. Reusing the global type drops a case class, its two pureconfig instances and most of topupTargets. The chart follows: one $defs.topup shared by the global block and the extra synchronizers, so min-topup-interval is required in both and the template can drop its inner guard. Signed-off-by: Sebastian Lindner <33971232+salindne@users.noreply.github.com>
Signed-off-by: Sebastian Lindner <33971232+salindne@users.noreply.github.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.
Closes ChainSafe/canton-extending-mainnet#110
Summary:
domains.extragains per-synchronizer top-up settings and a derivedtopupTargets, so the trigger fan-out has an input, and the top-up interval check now runs over every synchronizer instead of readingdomains.globalalone.