-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ledger-configuration: Extract the configuration from participant-stat…
…e. [KVL-1002] (#10279) * ledger-configuration: Extract configuration from participant-state. The configuration is often used without the state, and doesn't need to be versioned in the same way. CHANGELOG_BEGIN - [Integration Kit] The ledger configuration classes, ``Configuration``, ``LedgerInitialConditions``, and ``TimeModel``, have been moved from *participant-state* to a separate package named *ledger-configuration*, in the Java package ``com.daml.ledger.configuration``. You will need to update your dependencies and imports. CHANGELOG_END * participant-state: Remove the `LedgerId` aliases. * ledger-configuration: Rename `TimeModel` to `LedgerTimeModel`. This avoids confusion with the protobuf-generated `TimeModel` classes. CHANGELOG_BEGIN - [Integration Kit] ``TimeModel`` has been renamed to ``LedgerTimeModel``. If you are using the ledger configuration classes directly, you may need to update your code. CHANGELOG_END * ledger-configuration: Remove colons in LedgerInitialConditions' docs. * kvutils: Restore a missing compat import. * participant-integration-api: Add ledger-configuration to Oracle tests. * sandbox-common: Fix `--max-ledger-time-skew` docs. Co-authored-by: Miklos <[email protected]> Co-authored-by: Miklos <[email protected]>
- Loading branch information
1 parent
d96b54e
commit a9a0b70
Showing
122 changed files
with
408 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
load( | ||
"//bazel_tools:scala.bzl", | ||
"da_scala_library", | ||
"da_scala_test_suite", | ||
) | ||
|
||
da_scala_library( | ||
name = "ledger-configuration", | ||
srcs = glob(["src/main/scala/**/*.scala"]), | ||
resources = glob(["src/main/resources/**/*"]), | ||
tags = ["maven_coordinates=com.daml:ledger-configuration:__VERSION__"], | ||
visibility = [ | ||
"//visibility:public", | ||
], | ||
exports = [ | ||
"//ledger/ledger-configuration/protobuf:ledger_configuration_proto_java", | ||
], | ||
runtime_deps = [], | ||
deps = [ | ||
"//daml-lf/data", | ||
"//language-support/scala/bindings", | ||
"//ledger/ledger-configuration/protobuf:ledger_configuration_proto_java", | ||
"@maven//:com_google_protobuf_protobuf_java", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "sources", | ||
srcs = glob(["src/main/scala/**/*.scala"]), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
da_scala_test_suite( | ||
name = "ledger-configuration-tests", | ||
size = "small", | ||
srcs = glob(["src/test/suite/scala/**/*.scala"]), | ||
resources = glob(["src/test/resources/*"]), | ||
scala_deps = [ | ||
"@maven//:org_scalatest_scalatest", | ||
"@maven//:org_scalaz_scalaz_core", | ||
"@maven//:org_scala_lang_modules_scala_collection_compat", | ||
], | ||
deps = [ | ||
":ledger-configuration", | ||
"//daml-lf/data", | ||
"//daml-lf/transaction", | ||
"//ledger-api/grpc-definitions:ledger_api_proto_scala", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...nt/state/v2/LedgerInitialConditions.scala → ...nfiguration/LedgerInitialConditions.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
ledger/ledger-configuration/src/main/scala/com/daml/ledger/configuration/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package com.daml.ledger | ||
|
||
package object configuration { | ||
|
||
/** Identifier for the ledger, MUST match regexp [a-zA-Z0-9-]. */ | ||
type LedgerId = String | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.