Skip to content

Commit 32376f5

Browse files
Renamed to SVNames
[ci] Signed-off-by: Pasindu Tennage <pasindu.tennage@digitalasset.com>
1 parent bc089ac commit 32376f5

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

apps/app/src/main/scala/org/lfdecentralizedtrust/splice/config/SpliceConfig.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,11 @@ object SpliceConfig {
711711
)
712712
_ <- Either.cond(
713713
conf.domains.global.trustedSynchronizerConfig.forall(c =>
714-
c.sequencerNames.length >= c.threshold
714+
c.svNames.length >= c.threshold
715715
),
716716
(),
717717
ConfigValidationFailed(
718-
"Configuration error: Length of sequencerNames should be greater than or equal to threshold."
718+
"Configuration error: Length of svNames should be greater than or equal to threshold."
719719
),
720720
)
721721
_ <- Either.cond(

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/ValidatorSequencerConnectionIntegrationTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ValidatorSequencerConnectionIntegrationTest
4242
global = c.domains.global.copy(
4343
trustedSynchronizerConfig = Some(
4444
ValidatorTrustedSynchronizerConfig(
45-
sequencerNames = NonEmptyList.of(getSvName(1), getSvName(2), getSvName(3)),
45+
svNames = NonEmptyList.of(getSvName(1), getSvName(2), getSvName(3)),
4646
threshold = 2,
4747
)
4848
)
@@ -56,7 +56,7 @@ class ValidatorSequencerConnectionIntegrationTest
5656
)
5757
.withManualStart
5858

59-
"validator with 'sequencerNames' set in config connects to specified sequencers and tracks URL changes of sequencers" in {
59+
"validator with 'svNames' set in config connects to specified sequencers and tracks URL changes of sequencers" in {
6060
implicit env =>
6161
startAllSync(
6262
sv1Backend,

apps/validator/src/main/scala/org/lfdecentralizedtrust/splice/validator/config/ValidatorAppConfig.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ case class ValidatorDecentralizedSynchronizerConfig(
110110

111111
case class ValidatorTrustedSynchronizerConfig(
112112
/** static list of trusted sequencer names to connect to.
113-
* sequencerNames is mutually exclusive with `url`.
113+
* svNames is mutually exclusive with `url`.
114114
*/
115-
sequencerNames: NonEmptyList[String],
115+
svNames: NonEmptyList[String],
116116

117117
/** parameter to specify the BFT threshold for the domain connections.
118118
* If not specified, f +1 will be used.

apps/validator/src/main/scala/org/lfdecentralizedtrust/splice/validator/domain/DomainConnector.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class DomainConnector(
214214
)
215215
val svFilteredSequencers = config.domains.global.trustedSynchronizerConfig match {
216216
case Some(config) =>
217-
val allowedNamesSet = config.sequencerNames.toList.toSet
217+
val allowedNamesSet = config.svNames.toList.toSet
218218
logger.debug(
219219
s"Filtering sequencers to only include: ${allowedNamesSet.toList.mkString(", ")}"
220220
)

cluster/helm/splice-validator/templates/validator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ spec:
139139
{{- else if eq .Values.synchronizer.connectionType "bft-custom" }}
140140
- name: ADDITIONAL_CONFIG_SYNCHRONIZER_TRUSTED
141141
value: |
142-
canton.validator-apps.validator_backend.domains.global.trusted-synchronizer-config.sequencer-names = {{ .Values.synchronizer.sequencerNames | toJson}}
142+
canton.validator-apps.validator_backend.domains.global.trusted-synchronizer-config.sv-names = {{ .Values.synchronizer.svNames | toJson}}
143143
canton.validator-apps.validator_backend.domains.global.trusted-synchronizer-config.threshold = {{ .Values.synchronizer.threshold }}
144144
{{- end }}
145145
{{ end }}

cluster/helm/splice-validator/tests/validator_test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,19 +246,19 @@ tests:
246246
path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_SYNCHRONIZER_URL')].value
247247
pattern: 'canton\.validator-apps\.validator_backend\.domains\.global\.url = "https://new-sequencer\.mock\.com"'
248248

249-
- it: "uses synchronizer.sequencerNames as a JSON array when provided"
249+
- it: "uses synchronizer.svNames as a JSON array when provided"
250250
set:
251251
synchronizer:
252252
connectionType: "bft-custom"
253-
sequencerNames: [ "sequencer-1", "sequencer-2" ]
253+
svNames: [ "sequencer-1", "sequencer-2" ]
254254
threshold: 2
255255
documentSelector:
256256
path: kind
257257
value: Deployment
258258
asserts:
259259
- matchRegex:
260260
path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_SYNCHRONIZER_TRUSTED')].value
261-
pattern: 'canton\.validator-apps\.validator_backend\.domains\.global\.trusted-synchronizer-config\.sequencer-names = \["sequencer-1","sequencer-2"\]'
261+
pattern: 'canton\.validator-apps\.validator_backend\.domains\.global\.trusted-synchronizer-config\.sv-names = \["sequencer-1","sequencer-2"\]'
262262
- matchRegex:
263263
path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_SYNCHRONIZER_TRUSTED')].value
264264
pattern: 'canton\.validator-apps\.validator_backend\.domains\.global\.trusted-synchronizer-config\.threshold = 2'

cluster/helm/splice-validator/values.schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"type": "string",
2626
"description": "Trusted sequencer Url."
2727
},
28-
"sequencerNames": {
28+
"svNames": {
2929
"type": "array",
3030
"items": {
3131
"type": "string"
@@ -607,7 +607,7 @@
607607
"then": {
608608
"properties": {
609609
"synchronizer": {
610-
"not": { "required": ["url", "sequencerNames", "threshold"] }
610+
"not": { "required": ["url", "svNames", "threshold"] }
611611
}
612612
}
613613
}
@@ -622,7 +622,7 @@
622622
"required": ["url"],
623623
"properties": {
624624
"url": { "minLength": 1 },
625-
"sequencerNames": false,
625+
"svNames": false,
626626
"threshold": false
627627
}
628628
}
@@ -636,10 +636,10 @@
636636
"then": {
637637
"properties": {
638638
"synchronizer": {
639-
"required": ["sequencerNames", "threshold"],
639+
"required": ["svNames", "threshold"],
640640
"properties": {
641641
"url": false,
642-
"sequencerNames": { "minItems": 1 }
642+
"svNames": { "minItems": 1 }
643643
}
644644
}
645645
}

cluster/pulumi/common-validator/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ export const SynchronizerConfigSchema = z.union([
1919
z
2020
.object({
2121
connectionType: z.literal('bft-custom'),
22-
sequencerNames: z.array(z.string()).min(1),
22+
svNames: z.array(z.string()).min(1),
2323
threshold: z.number().int().min(1),
2424
})
2525
.strict()
26-
.refine(data => data.sequencerNames.length >= data.threshold, {
27-
message: 'sequencerNames length must be greater than or equal to the threshold',
26+
.refine(data => data.svNames.length >= data.threshold, {
27+
message: 'svNames length must be greater than or equal to the threshold',
2828
path: ['threshold'], // Point the error to the threshold field
2929
}),
3030
z

0 commit comments

Comments
 (0)