Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ class SyncOperatorTrafficIntegrationTest
synchronizerParameters.trafficControl.map(_.maxBaseTrafficAmount.value) shouldBe Some(0L)
}

clue("the synchronizer charges traffic the way the global synchronizer does") {
val participant = aliceValidatorBackend.participantClientWithAdminToken
val globalSynchronizerId =
participant.synchronizers.id_of(SynchronizerAlias.tryCreate("global")).logical
eventually() {
val global = participant.topology.synchronizer_parameters
.get_dynamic_synchronizer_parameters(globalSynchronizerId)
.trafficControl
.value
val dedicated = synchronizerParameters.trafficControl.value
dedicated.readVsWriteScalingFactor shouldBe global.readVsWriteScalingFactor
dedicated.freeConfirmationResponses shouldBe global.freeConfirmationResponses
}
}

clue("the mediator is granted unlimited traffic") {
val mediator = syncOperatorBackend.appState.sequencerAdminConnection
.getMediatorSynchronizerState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package org.lfdecentralizedtrust.splice.syncoperator.config

import com.digitalasset.canton.config.*
import com.digitalasset.canton.config.RequireTypes.{NonNegativeLong, PositiveInt}
import com.digitalasset.canton.sequencing.TrafficControlParameters
import org.lfdecentralizedtrust.splice.config.{
AutomationConfig,
HttpClientConfig,
Expand Down Expand Up @@ -38,11 +37,11 @@ case class SyncOperatorAppBackendConfig(
// Traffic control for the synchronizer this operator serves. Zero base amount so that all of
// its traffic is paid for.
baseTrafficAmount: NonNegativeLong = NonNegativeLong.zero,
readVsWriteScalingFactor: PositiveInt =
TrafficControlParameters.DefaultReadVsWriteScalingFactor,
// As on the global synchronizer.
readVsWriteScalingFactor: PositiveInt = PositiveInt.tryCreate(4),
Comment thread
sadiq1971 marked this conversation as resolved.
Outdated
baseTrafficAccumulationDuration: NonNegativeFiniteDuration =
NonNegativeFiniteDuration.ofMinutes(10),
freeConfirmationResponses: Boolean = TrafficControlParameters.DefaultFreeConfirmationResponses,
freeConfirmationResponses: Boolean = true,
// Set to false to disable the DB-level exclusive lock that prevents two sync operator instances
// from running concurrently against the same database. Only disable for migration scenarios
// where intentional overlap is required.
Expand Down
4 changes: 2 additions & 2 deletions cluster/compose/localnet/conf/console/app-synchronizer.sc
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ if (sys.env.get("SYNC_OPERATOR_PROFILE").contains("on")) {
Some(
TrafficControlParameters(
maxBaseTrafficAmount = NonNegativeLong.zero,
readVsWriteScalingFactor = PositiveInt.tryCreate(200),
readVsWriteScalingFactor = PositiveInt.tryCreate(4),
maxBaseTrafficAccumulationDuration = PositiveFiniteDuration.ofMinutes(10),
setBalanceRequestSubmissionWindowSize = PositiveFiniteDuration.ofMinutes(5),
enforceRateLimiting = true,
baseEventCost = NonNegativeLong.zero,
freeConfirmationResponses = false,
freeConfirmationResponses = true,
)
)
),
Expand Down
4 changes: 2 additions & 2 deletions cluster/compose/localnet/conf/splice/sync-operator/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ canton.sync-operator-apps.sync-operator {
port = 5019
}
base-traffic-amount = 0
read-vs-write-scaling-factor = 200
read-vs-write-scaling-factor = 4
base-traffic-accumulation-duration = 10m
free-confirmation-responses = false
free-confirmation-responses = true
}
Loading