Skip to content

Commit a63b1b5

Browse files
Merge commit 'e9444f089a6d5fbc2b7fc4eb6bb4321368d8020b' into s11/2723-attach-SecurityPolicy-backend
[skip ci]
2 parents cf5c195 + e9444f0 commit a63b1b5

File tree

176 files changed

+4195
-925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+4195
-925
lines changed

MAINTENANCE.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616
1. Generate a patch file of the JSON API v2 OpenAPI definition by running `diff-openapi.sh` in `token-standard/dependencies/canton-json-api-v2/openapi/`.
1717
2. Choose the Canton version you wish to upgrade to. The currently published versions on
1818
Artifactory can be found [here](https://digitalasset.jfrog.io/ui/repos/tree/General/canton-enterprise).
19-
3. Compute the hashes of the corresponding enterprise and oss versions by running:
20-
`nix store prefetch-file --json --hash-type sha256 https://digitalasset.jfrog.io/artifactory/canton-enterprise/canton-enterprise-<version>.tar.gz | jq -r '.hash'` and
21-
`nix store prefetch-file --json --hash-type sha256 https://www.canton.io/releases/canton-open-source-<version>.tar.gz | jq -r '.hash'`
22-
4. Update the Canton version and hashes of the oss and enterprise versions in `nix/canton-sources.json`.
23-
5. In case you have also made configuration changes to Canton in `simple-topology-canton.conf`, remember
19+
3. Update the hashes in `nix/canton-sources.json` by running: `build-tools/bump-canton.sh <version>`
20+
4. In case you have also made configuration changes to Canton in `simple-topology-canton.conf`, remember
2421
to also make the corresponding changes for our cluster deployments. It is recommended to test any configuration
2522
changes on scratchnet first.
26-
6. Update the OpenAPI definitions from step 1 by running `update-openapi.sh` in `token-standard/dependencies/canton-json-api-v2/openapi/`.
27-
7. Cleanup the `openapi.patch` file.
23+
5. Update the OpenAPI definitions from step 1 by running `update-openapi.sh` in `token-standard/dependencies/canton-json-api-v2/openapi/`.
24+
6. Cleanup the `openapi.patch` file.
2825
Check `token-standard/dependencies/canton-json-api-v2/openapi/CHANGES.md` and apply any changes manually if CI breaks due to
2926
token standard CLI issues that look caused by bad OpenAPI definitions.
3027

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ object ConfigTransforms {
200200
updateAllAutomationConfigs(
201201
_.copy(rewardOperationRoundsCloseBufferDuration = NonNegativeFiniteDuration.ofMillis(100))
202202
),
203+
disableDevelopmentFund(),
203204
)
204205
}
205206

@@ -299,6 +300,9 @@ object ConfigTransforms {
299300
def disableZeroFees(): ConfigTransform =
300301
updateAllSvAppFoundDsoConfigs_(c => c.copy(zeroTransferFees = false))
301302

303+
def disableDevelopmentFund(): ConfigTransform =
304+
updateAllSvAppFoundDsoConfigs_(c => c.copy(developmentFundPercentage = Some(0.0)))
305+
302306
def updateAllValidatorAppConfigs(
303307
update: (String, ValidatorAppBackendConfig) => ValidatorAppBackendConfig
304308
): ConfigTransform =
@@ -718,6 +722,9 @@ object ConfigTransforms {
718722
}
719723
}
720724

725+
def withDevelopmentFundPercentage(percentage: BigDecimal): ConfigTransform =
726+
updateAllSvAppFoundDsoConfigs_(c => c.copy(developmentFundPercentage = Some(percentage)))
727+
721728
private def portTransform(bump: Int, c: AdminServerConfig): AdminServerConfig =
722729
c.copy(internalPort = c.internalPort.map(_ + bump))
723730

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import org.lfdecentralizedtrust.splice.http.UrlValidator
1313
import org.lfdecentralizedtrust.splice.scan.admin.api.client.BftScanConnection.BftScanClientConfig
1414
import org.lfdecentralizedtrust.splice.scan.config.{
1515
BftSequencerConfig,
16+
MediatorVerdictIngestionConfig,
1617
ScanAppBackendConfig,
1718
ScanAppClientConfig,
1819
ScanCacheConfig,
19-
MediatorVerdictIngestionConfig,
2020
ScanSynchronizerConfig,
2121
CacheConfig as SpliceCacheConfig,
2222
}
@@ -82,6 +82,7 @@ import com.digitalasset.canton.synchronizer.sequencer.config.{
8282
}
8383
import com.digitalasset.canton.topology.PartyId
8484
import com.digitalasset.daml.lf.data.Ref.PackageVersion
85+
import org.lfdecentralizedtrust.splice.store.ChoiceContextContractFetcher
8586

8687
case class SpliceConfig(
8788
override val name: Option[String] = None,
@@ -412,6 +413,9 @@ object SpliceConfig {
412413
deriveReader[CircuitBreakerConfig]
413414
implicit val circuitBreakersConfig: ConfigReader[CircuitBreakersConfig] =
414415
deriveReader[CircuitBreakersConfig]
416+
implicit val contractFetchLedgerFallbackConfigReader
417+
: ConfigReader[ChoiceContextContractFetcher.StoreContractFetcherWithLedgerFallbackConfig] =
418+
deriveReader[ChoiceContextContractFetcher.StoreContractFetcherWithLedgerFallbackConfig]
415419
implicit val spliceParametersConfig: ConfigReader[SpliceParametersConfig] =
416420
deriveReader[SpliceParametersConfig]
417421
implicit val rateLimitersConfig: ConfigReader[RateLimitersConfig] =
@@ -711,11 +715,11 @@ object SpliceConfig {
711715
)
712716
_ <- Either.cond(
713717
conf.domains.global.trustedSynchronizerConfig.forall(c =>
714-
c.sequencerNames.length >= c.threshold
718+
c.svNames.length >= c.threshold
715719
),
716720
(),
717721
ConfigValidationFailed(
718-
"Configuration error: Length of sequencerNames should be greater than or equal to threshold."
722+
"Configuration error: Length of svNames should be greater than or equal to threshold."
719723
),
720724
)
721725
_ <- Either.cond(
@@ -838,6 +842,9 @@ object SpliceConfig {
838842
deriveWriter[CircuitBreakerConfig]
839843
implicit val circuitBreakersConfig: ConfigWriter[CircuitBreakersConfig] =
840844
deriveWriter[CircuitBreakersConfig]
845+
implicit val contractFetchLedgerFallbackConfigWriter
846+
: ConfigWriter[ChoiceContextContractFetcher.StoreContractFetcherWithLedgerFallbackConfig] =
847+
deriveWriter[ChoiceContextContractFetcher.StoreContractFetcherWithLedgerFallbackConfig]
841848
implicit val spliceParametersConfig: ConfigWriter[SpliceParametersConfig] =
842849
deriveWriter[SpliceParametersConfig]
843850

apps/app/src/main/scala/org/lfdecentralizedtrust/splice/console/ScanAppReference.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,16 @@ abstract class ScanAppReference(
394394
)
395395
}
396396

397+
def getDateOfFirstSnapshotAfter(after: CantonTimestamp, migrationId: Long) =
398+
consoleEnvironment.run {
399+
httpCommand(
400+
HttpScanAppClient.GetDateOfFirstSnapshotAfter(
401+
after.toInstant.atOffset(java.time.ZoneOffset.UTC),
402+
migrationId,
403+
)
404+
)
405+
}
406+
397407
def getAcsSnapshotAt(
398408
at: CantonTimestamp,
399409
migrationId: Long,

apps/app/src/main/scala/org/lfdecentralizedtrust/splice/metrics/SpliceMetricsFactory.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ case class SpliceMetricsFactory(
3333
new ValidatorAppMetrics(
3434
metricsFactoryProvider.generateMetricsFactory(metricsContext),
3535
storageHistograms,
36+
loggerFactory,
3637
)
3738
},
3839
)
@@ -45,6 +46,7 @@ case class SpliceMetricsFactory(
4546
new SvAppMetrics(
4647
metricsFactoryProvider.generateMetricsFactory(metricsContext),
4748
storageHistograms,
49+
loggerFactory,
4850
)
4951
},
5052
)
@@ -71,9 +73,9 @@ case class SpliceMetricsFactory(
7173
new SplitwellAppMetrics(
7274
metricsFactoryProvider.generateMetricsFactory(metricsContext),
7375
storageHistograms,
76+
loggerFactory,
7477
)
7578
},
7679
)
7780
}
78-
7981
}

apps/app/src/test/resources/include/mediators.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ _mediator_template {
1414
# ref: https://github.com/DACH-NY/canton/issues/16371#issuecomment-1885005687
1515
time-tracker.min-observation-duration = 10s
1616
sequencer-client {
17-
use-new-connection-pool = true
1817
enable-amplification-improvements = true
1918
}
2019
topology.validate-initial-topology-snapshot = false

apps/app/src/test/resources/include/participants.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ _participant_template {
4444
sequencer-client {
4545
# Use a higher number of in flight batches to increase throughput
4646
maximum-in-flight-event-batches = 50
47-
use-new-connection-pool = true
4847
enable-amplification-improvements = true
4948
}
5049

apps/app/src/test/resources/include/sequencers.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ _sequencer_reference_template {
2222
generate-topology-transactions-and-keys = false
2323
identity.type = manual
2424
}
25-
sequencer-client {
26-
use-new-connection-pool = true
27-
}
2825
parameters {
2926
batching.max-pruning-time-interval = "10 minutes"
3027
}

apps/app/src/test/resources/local-sv-node/canton-participant/canton.conf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ canton {
2525
}
2626
}
2727

28-
sequencer-client {
29-
use-new-connection-pool = true
30-
}
31-
3228
ledger-api {
3329
address = "0.0.0.0"
3430
port = 9101

apps/app/src/test/resources/local-validator-node/canton-participant/canton.conf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ canton {
2525
}
2626
}
2727

28-
sequencer-client {
29-
use-new-connection-pool = true
30-
}
31-
3228
ledger-api {
3329
address = "0.0.0.0"
3430
port = 9201

0 commit comments

Comments
 (0)