Skip to content

Commit 99ef5c9

Browse files
authored
upgrade canton 3.5 and add hack for parties not seen by the ledger api (#3385)
* bump canton to latest 3.5 Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com> * add workaround for DR when sync is quiet and no event is triggered to start the publishing of parties to the indexer [ci] Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
1 parent ce63be2 commit 99ef5c9

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

apps/sv/src/main/scala/org/lfdecentralizedtrust/splice/sv/onboarding/domainmigration/DomainMigrationInitializer.scala

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
package org.lfdecentralizedtrust.splice.sv.onboarding.domainmigration
55

6+
import cats.implicits.catsSyntaxApplicativeByName
67
import cats.syntax.either.*
78
import com.daml.grpc.adapter.ExecutionSequencerFactory
89
import org.lfdecentralizedtrust.splice.config.{
@@ -57,9 +58,11 @@ import org.lfdecentralizedtrust.splice.sv.store.{SvDsoStore, SvStore, SvSvStore}
5758
import org.lfdecentralizedtrust.splice.sv.util.SvUtil
5859
import org.lfdecentralizedtrust.splice.util.TemplateJsonDecoder
5960
import com.digitalasset.canton.admin.api.client.data.{NodeStatus, WaitingForInitialization}
61+
import com.digitalasset.canton.config.RequireTypes.NonNegativeInt
6062
import com.digitalasset.canton.data.CantonTimestamp
6163
import com.digitalasset.canton.lifecycle.CloseContext
6264
import com.digitalasset.canton.logging.NamedLoggerFactory
65+
import com.digitalasset.canton.protocol.DynamicSynchronizerParameters
6366
import com.digitalasset.canton.resource.DbStorage
6467
import com.digitalasset.canton.sequencing.SequencerConnections
6568
import com.digitalasset.canton.time.Clock
@@ -258,12 +261,29 @@ class DomainMigrationInitializer(
258261
packageVersionSupport,
259262
svStore.key.svParty,
260263
)
264+
latestKnownSynchronizerParameters <- participantAdminConnection
265+
.getSynchronizerParametersState(decentralizedSynchronizerId)
266+
// TODO(#3504) - remove once no longer needed
267+
// trigger more or less a noop topology transaction so that the ledger api event notifier is initialized for the sync and propagates all the parties from the genesis import to the ledger api
268+
// this will basically be reverted in the trigger
269+
_ <- participantAdminConnection
270+
.ensureDomainParameters(
271+
decentralizedSynchronizerId,
272+
_.tryUpdate(confirmationRequestsMaxRate =
273+
DynamicSynchronizerParameters.defaultConfirmationRequestsMaxRate + NonNegativeInt.one
274+
),
275+
)
276+
// only if the synchronizer was not paused during the migration and the latest topology state is before the disaster recovery timestamp
277+
.whenA(
278+
!migrationDump.domainDataSnapshot.synchronizerWasPaused && latestKnownSynchronizerParameters.base.sequenced
279+
.isBefore(migrationDump.domainDataSnapshot.acsTimestamp)
280+
)
261281
_ <- newJoiningNodeInitializer(None, newCometBftNode).onboard(
262282
decentralizedSynchronizerId,
263283
dsoAutomationService,
264284
svAutomation,
265285
skipTrafficReconciliationTriggers = true,
266-
unpauseSynchronizer = true,
286+
unpauseSynchronizer = migrationDump.domainDataSnapshot.synchronizerWasPaused,
267287
)
268288
} yield (
269289
decentralizedSynchronizerId,

nix/canton-sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"version": "3.5.0-snapshot.20251203.17571.0.vd0c5d709",
2+
"version": "3.5.0-snapshot.20251219.17699.0.v0c2121fb",
33
"tooling_sdk_version": "3.3.0-snapshot.20250415.13756.0.vafc5c867",
44
"daml_release": "v3.3.0-snapshot.20250417.0",
5-
"enterprise_sha256": "sha256:10087gk3b2nq7c0sd77hf5mmgn5d104xhbkx27i3wjhmyimf6q56",
6-
"oss_sha256": "sha256:10087gk3b2nq7c0sd77hf5mmgn5d104xhbkx27i3wjhmyimf6q56"
5+
"enterprise_sha256": "sha256:02jraib0sx5y8ivcgh4ql38cbam6vffhjscj5hb2055d5yrrh4lz",
6+
"oss_sha256": "sha256:02jraib0sx5y8ivcgh4ql38cbam6vffhjscj5hb2055d5yrrh4lz"
77
}

scripts/bootstrap/bootstrap-canton-with-unsigned-keys.sc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import com.digitalasset.canton.console.{
1212
}
1313
import com.digitalasset.canton.SynchronizerAlias
1414
import com.digitalasset.canton.synchronizer.config.SynchronizerParametersConfig
15-
import com.digitalasset.canton.time
16-
import com.digitalasset.canton.sequencing
1715
import com.digitalasset.canton.protocol.DynamicSynchronizerParameters
1816
import com.digitalasset.canton.topology.transaction.SignedTopologyTransaction.GenericSignedTopologyTransaction
1917
import com.digitalasset.canton.topology.transaction.{OwnerToKeyMapping, TopologyChangeOp}
@@ -162,16 +160,16 @@ def bootstrapDomainWithUnsignedKeys(
162160
threshold,
163161
NonNegativeInt.zero,
164162
// This should match the SV app defaults so that the SV app does not try to change the connection.
165-
sequencing.SubmissionRequestAmplification(
163+
SubmissionRequestAmplification(
166164
PositiveInt.tryCreate(5),
167-
time.NonNegativeFiniteDuration.tryOfSeconds(10),
165+
NonNegativeFiniteDuration.ofSeconds(10),
168166
),
169-
sequencing.SequencerConnectionPoolDelays.default,
167+
SequencerConnectionPoolDelays.default,
170168
),
171169
// if we run bootstrap ourselves, we should have been able to reach the nodes
172170
// so we don't want the bootstrapping to fail spuriously here in the middle of
173171
// the setup
174-
sequencing.SequencerConnectionValidation.Disabled,
172+
SequencerConnectionValidation.Disabled,
175173
)
176174
}
177175

0 commit comments

Comments
 (0)