Skip to content

Commit

Permalink
update canton to 20250120.12436.v51bf978a (#20616)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbrauner-da authored Jan 20, 2025
1 parent e965e38 commit d2e3ddc
Show file tree
Hide file tree
Showing 125 changed files with 2,493 additions and 1,154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ trait CantonConfig {
general = CantonNodeParameterConverter.general(this, domainConfig),
protocol = CantonNodeParameterConverter.protocol(this, domainConfig.init.domainParameters),
maxBurstFactor = domainConfig.parameters.maxBurstFactor,
dispatcherBatchSize = domainConfig.parameters.dispatcherBatchSize,
)
}

Expand Down Expand Up @@ -716,6 +717,9 @@ object CantonConfig {
deriveReader[LedgerApiKeepAliveServerConfig]
lazy implicit val tlsServerConfigReader: ConfigReader[TlsServerConfig] =
deriveReader[TlsServerConfig]
lazy implicit val tlsServerOnlyTrustFileConfigReader
: ConfigReader[TlsClientConfigOnlyTrustFile] =
deriveReader[TlsClientConfigOnlyTrustFile]
lazy implicit val tlsClientConfigReader: ConfigReader[TlsClientConfig] =
deriveReader[TlsClientConfig]
lazy implicit val initBaseIdentityConfigReader: ConfigReader[InitConfigBase.Identity] =
Expand Down Expand Up @@ -764,6 +768,21 @@ object CantonConfig {
deriveReader[ApiType.Grpc.type]
lazy implicit val apiTypeConfigReader: ConfigReader[ApiType] = deriveReader[ApiType]
lazy implicit val clientConfigReader: ConfigReader[ClientConfig] = deriveReader[ClientConfig]
lazy implicit val remoteConsoleSequencerClientConfigReader
: ConfigReader[SequencerApiClientConfig] =
deriveReader[SequencerApiClientConfig]
// Note that transformations are applied in reverse order,
// so we move the deprecated before deleting the parent path
.deprecateConfigPath(
DeprecatedConfigUtils.DeprecatedConfigPath[String](
"custom-trust-certificates",
since = "2.10.0",
dropPath = true,
)
)
.moveDeprecatedField("custom-trust-certificates.pem-file", Seq("tls.trust-collection-file"))
.moveDeprecatedField("transport-security", Seq("tls.enabled"))

lazy implicit val remoteDomainConfigReader: ConfigReader[RemoteDomainConfig] =
deriveReader[RemoteDomainConfig]
lazy implicit val remoteParticipantConfigReader: ConfigReader[RemoteParticipantConfig] =
Expand Down Expand Up @@ -863,22 +882,6 @@ object CantonConfig {
deriveReader[PackageMetadataViewConfig]
lazy implicit val identityConfigReader: ConfigReader[TopologyConfig] =
deriveReader[TopologyConfig]
lazy implicit val sequencerConnectionConfigCertificateFileReader
: ConfigReader[SequencerConnectionConfig.CertificateFile] =
deriveReader[SequencerConnectionConfig.CertificateFile]
lazy implicit val sequencerConnectionConfigCertificateStringReader
: ConfigReader[SequencerConnectionConfig.CertificateString] =
deriveReader[SequencerConnectionConfig.CertificateString]
lazy implicit val sequencerConnectionConfigCertificateConfigReader
: ConfigReader[SequencerConnectionConfig.CertificateConfig] =
deriveReader[SequencerConnectionConfig.CertificateConfig]
lazy implicit val sequencerConnectionConfigGrpcReader
: ConfigReader[SequencerConnectionConfig.Grpc] =
deriveReader[SequencerConnectionConfig.Grpc]
lazy implicit val sequencerConnectionConfigReader: ConfigReader[SequencerConnectionConfig] =
deriveReader[SequencerConnectionConfig]
// since the big majority of users will use GRPC, default to it so that they don't need to specify `type = grpc`
.orElse(ConfigReader[SequencerConnectionConfig.Grpc])
lazy implicit val communitySequencerConfigDatabaseReader
: ConfigReader[CommunitySequencerConfig.Database] =
deriveReader[CommunitySequencerConfig.Database]
Expand Down Expand Up @@ -1126,6 +1129,9 @@ object CantonConfig {
deriveWriter[TlsServerConfig]
lazy implicit val tlsClientConfigWriter: ConfigWriter[TlsClientConfig] =
deriveWriter[TlsClientConfig]
lazy implicit val tlsClientConfigWriterOnlyTrustFile
: ConfigWriter[TlsClientConfigOnlyTrustFile] =
deriveWriter[TlsClientConfigOnlyTrustFile]
lazy implicit val initBaseIdentityConfigWriter: ConfigWriter[InitConfigBase.Identity] =
deriveWriter[InitConfigBase.Identity]
lazy implicit val initConfigWriter: ConfigWriter[InitConfig] = deriveWriter[InitConfig]
Expand Down Expand Up @@ -1166,6 +1172,9 @@ object CantonConfig {
lazy implicit val communityCryptoWriter: ConfigWriter[CommunityCryptoConfig] =
deriveWriter[CommunityCryptoConfig]
lazy implicit val clientConfigWriter: ConfigWriter[ClientConfig] = deriveWriter[ClientConfig]
lazy implicit val remoteConsoleSequencerClientConfigWriter
: ConfigWriter[SequencerApiClientConfig] =
deriveWriter[SequencerApiClientConfig]
lazy implicit val remoteDomainConfigWriter: ConfigWriter[RemoteDomainConfig] =
deriveWriter[RemoteDomainConfig]
lazy implicit val remoteParticipantConfigWriter: ConfigWriter[RemoteParticipantConfig] =
Expand Down Expand Up @@ -1272,20 +1281,6 @@ object CantonConfig {
deriveWriter[PackageMetadataViewConfig]
lazy implicit val identityConfigWriter: ConfigWriter[TopologyConfig] =
deriveWriter[TopologyConfig]
lazy implicit val sequencerConnectionConfigCertificateFileWriter
: ConfigWriter[SequencerConnectionConfig.CertificateFile] =
deriveWriter[SequencerConnectionConfig.CertificateFile]
lazy implicit val sequencerConnectionConfigCertificateStringWriter
: ConfigWriter[SequencerConnectionConfig.CertificateString] =
confidentialWriter[SequencerConnectionConfig.CertificateString](_.copy(pemString = "****"))
lazy implicit val sequencerConnectionConfigCertificateConfigWriter
: ConfigWriter[SequencerConnectionConfig.CertificateConfig] =
deriveWriter[SequencerConnectionConfig.CertificateConfig]
lazy implicit val sequencerConnectionConfigGrpcWriter
: ConfigWriter[SequencerConnectionConfig.Grpc] =
deriveWriter[SequencerConnectionConfig.Grpc]
lazy implicit val sequencerConnectionConfigWriter: ConfigWriter[SequencerConnectionConfig] =
deriveWriter[SequencerConnectionConfig]
lazy implicit val communitySequencerConfigDatabaseWriter
: ConfigWriter[CommunitySequencerConfig.Database] =
deriveWriter[CommunitySequencerConfig.Database]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ trait RemoteDomainReference extends DomainReference with GrpcRemoteInstanceRefer
consoleEnvironment.environment.config.remoteDomainsByString(name)

override def sequencerConnection: SequencerConnection =
config.publicApi.toConnection
config.publicApi.toGrpcSequencerConnection
.fold(
err => sys.error(s"Domain $name has invalid sequencer connection config: $err"),
identity,
Expand Down Expand Up @@ -354,7 +354,7 @@ trait LocalDomainReference
consoleEnvironment.environment.config.domainsByString(name)

override def sequencerConnection: SequencerConnection =
config.sequencerConnectionConfig.toConnection
config.sequencerConnectionConfig.toGrpcSequencerConnection
.fold(
err => sys.error(s"Domain $name has invalid sequencer connection config: $err"),
identity,
Expand Down Expand Up @@ -428,7 +428,7 @@ object ExternalLedgerApiClient {
new ExternalLedgerApiClient(
cc.address,
cc.port,
cc.tls,
cc.tlsConfig,
Some(token),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,11 @@ class TopologyAdministrationGroup(
target.fingerprint,
isRootDelegation,
key.some,
// no replace existing
)
.discard

renewNamespaceDelegations(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewNamespaceDelegations(TopologyChangeOp.Remove, filterAuthorizedKey)

case IdentifierDelegation(identifier, target) =>
Expand All @@ -757,10 +758,12 @@ class TopologyAdministrationGroup(
identifier,
target.fingerprint,
key.some,
// no replace existing
)
.discard

renewIdentifierDelegation(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewIdentifierDelegation(TopologyChangeOp.Remove, filterAuthorizedKey)

case OwnerToKeyMapping(owner, key) =>
Expand All @@ -772,10 +775,12 @@ class TopologyAdministrationGroup(
key.fingerprint,
key.purpose,
nsKey.some,
// no replace existing
)
.discard

renewOwnerToKeyMapping(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewOwnerToKeyMapping(TopologyChangeOp.Remove, filterAuthorizedKey)

case signedClaim: SignedLegalIdentityClaim =>
Expand All @@ -792,10 +797,12 @@ class TopologyAdministrationGroup(
permission,
trustLevel,
key.some,
replaceExisting = false,
)
.discard

renewParticipantState(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewParticipantState(TopologyChangeOp.Remove, filterAuthorizedKey)

case MediatorDomainState(side, domain, mediator) =>
Expand All @@ -807,10 +814,12 @@ class TopologyAdministrationGroup(
mediator,
side,
key.some,
replaceExisting = false,
)
.discard

renewMediatorState(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewMediatorState(TopologyChangeOp.Remove, filterAuthorizedKey)

case PartyToParticipant(side, party, participant, permission) =>
Expand All @@ -823,10 +832,11 @@ class TopologyAdministrationGroup(
side,
permission,
key.some,
replaceExisting = false,
)
.discard

renewPartyToParticipant(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewPartyToParticipant(TopologyChangeOp.Remove, filterAuthorizedKey)

case VettedPackages(participant, packageIds) =>
Expand All @@ -837,10 +847,12 @@ class TopologyAdministrationGroup(
participant,
packageIds,
key.some,
// no replace existing
)
.discard

renewVettedPackages(TopologyChangeOp.Add, authorizeWith)
// Note: this will remove the oldest one which is the one that existed before
renewVettedPackages(TopologyChangeOp.Remove, filterAuthorizedKey)

case CheckOnlyPackages(participant, packageIds) =>
Expand All @@ -851,6 +863,7 @@ class TopologyAdministrationGroup(
participant,
packageIds,
key.some,
// no replace existing
)
.discard

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ trait Environment extends NamedLogging with AutoCloseable with NoTracing {
.filter(_.config.topology.open)
def toDomainConfig(domain: DomainNodeBootstrap): Either[StartupError, DomainConnectionConfig] =
(for {
connection <- domain.config.sequencerConnectionConfig.toConnection
connection <- domain.config.sequencerConnectionConfig.toGrpcSequencerConnection
name <- DomainAlias.create(domain.name.unwrap)
sequencerConnections = SequencerConnections.single(connection)
} yield DomainConnectionConfig(name, sequencerConnections)).leftMap(err =>
Expand Down

This file was deleted.

Loading

0 comments on commit d2e3ddc

Please sign in to comment.