-
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.
participant-integration-api: Switch to the v2 participant state API. …
…[KVL-1002] (#10398) * participant-state: Give `ChangeId` its own file. * participant-state: Introduce `v1.CompletionInfo` for a while. `CompletionInfo` is identical to `SubmitterInfo`. Its purpose is to make the migration to v2 easier. It should not make it into the final version. * participant-integration-api: Switch to the v2 participant state API. This means that: - the API server and indexer expect v2 API traits - adapters are provided if you need to elevate your v1 API usage - the indexer internally uses v2 Updates - rejections are switched over to use the v2 format - Sandbox Classic uses v2 as the internal representation too (because it interacts directly with the underlying indexer representation, and is therefore tightly coupled) _kvutils_ and other users of the `StandaloneApiServer` and `StandaloneIndexerServer` use the adapters. CHANGELOG_BEGIN - [Integration Kit] The API server and indexer have switched over to v2 of the participant-state API. You can continue to use the v1 API, but you will need to wrap your ``ReadService`` and ``WriteService`` objects in the ``AdaptedV1ReadService`` and ``AdaptedV1WriteSerivce`` classes. CHANGELOG_END * participant-state: Remove v1.CompletionInfo. It's served its purpose. * kvutils: Remove an unnecessary line from `Runner`. * ledger-api-common: Delete a TODO; we'll track it elsewhere. * participant-integration-api: Use full words in `JdbcLedgerDao`. Just a little bit of cleanup. * ledger-api-common: Extract out the random submission ID generator. And introduce a trait, because, well, this is still the JVM.
- Loading branch information
1 parent
8cf3076
commit d666f76
Showing
94 changed files
with
1,013 additions
and
694 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
20 changes: 20 additions & 0 deletions
20
.../ledger-api-common/src/main/scala/com/digitalasset/ledger/api/SubmissionIdGenerator.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,20 @@ | ||
// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package com.daml.ledger.api | ||
|
||
import java.util.UUID | ||
|
||
import com.daml.lf.data.Ref | ||
import com.daml.lf.data.Ref.SubmissionId | ||
|
||
trait SubmissionIdGenerator { | ||
def generate(): Ref.SubmissionId | ||
} | ||
|
||
object SubmissionIdGenerator { | ||
object Random extends SubmissionIdGenerator { | ||
override def generate(): SubmissionId = | ||
Ref.SubmissionId.assertFromString(UUID.randomUUID().toString) | ||
} | ||
} |
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
Oops, something went wrong.