Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop ContractId typeparameter from Value #10827

Merged
merged 1 commit into from
Sep 16, 2021
Merged

Conversation

cocreature
Copy link
Contributor

99% of our usecases use Value[ContractId] so this PR just fixes it.

The few other usescases are:

  1. Value[Nothing] which we use for keys. This is technically more
    precise but we benefit very little from it.
  2. Value[String] mostly because in a few places we are lazy.

We don’t have any code which benefits from being polymorphic in the
contract id type.

changelog_begin
changelog_end

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

@cocreature cocreature force-pushed the transaction-typeparam branch 6 times, most recently from e0bcce2 to efe4a63 Compare September 14, 2021 07:24
Copy link
Collaborator

@remyhaemmerle-da remyhaemmerle-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Most of the suggestion can be done in separate PR.

I would like to see more 'override' and 'final' keywords

Comment on lines +200 to 208
final case class ContractInst[+Val](
template: Identifier,
arg: Val,
agreementText: String,
) {

def map[Val2](f: Val => Val2): ContractInst[Val2] =
copy(arg = f(arg))
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not something like that ?

Suggested change
final case class ContractInst[+Val](
template: Identifier,
arg: Val,
agreementText: String,
) {
def map[Val2](f: Val => Val2): ContractInst[Val2] =
copy(arg = f(arg))
}
/** A contract instance is a value plus the template that originated it. */
final case class ContractInst[+Val <: CidContainer[Val]](
template: Identifier,
arg: Val,
agreementText: String,
) extends CidContainer[ContractInst[Val]]{
def map[Val2](f: Val => Val2): ContractInst[Val2] =
copy(arg = f(arg))
override protected def self: ContractInst[Val] = this
override def mapCid(f: ContractId => ContractId): ContractInst[Val] =
copy(arg = arg.mapCid(f))
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve tried this initially but the Val <: CidContainer[Val] constraint broke type inference in a bunch of places so I went back to this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine.
I propose we get ride of the parameter of ContractInst in another PR.
Meaning having ContractInst and VersionedContractInst like we have for transaction.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds sensible, I definitely dislike the solution here

final def assertNoCid[B](message: Value.ContractId => String)(implicit
checker: NoCidChecker[A, B]
): B =
final def assertNoCid(message: Value.ContractId => String): A =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was mainly to change the type from Value[ContractId] to Value[Nothing]. I think we should simply get rid of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So Canton definitely uses ensureNoCid and we use assertNoCid in a few places. maybe we can drop it but it’s mostly in ledger code where I’m not entirely sure if we can assume the value has already been checked. What do you think of keeping it in this PR and dropping it later once we’ve audited the uses?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to get ride of both of them.
As I said in my main comment

Most of the suggestions can be done in separate PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I am fine to merge this PR such as.

Comment on lines 137 to 155
def decodeVersionedValue(
protoValue0: proto.VersionedValue
): Either[DecodeError, VersionedValue] =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not completely sure we want to get ride of this decodeCid parameter.
With it we can ensure at the decoding level the Value does not contains V0 at the lowest level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don’t use it anywhere atm so I think my inclination is to drop it and add it back if we do want to use it. wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed canton used it.
I think it could be useful for ledger implementer to have a version of the decoder that does not accepts V0.
I will rather audit if this is actually useless before dropping the code, otherwise we will never added it back.

If we drop it know, we will never added it back, because

  • on the one hand this is not useful for use (the language team)
  • on the other hand actual users (canton/kv) very rarely give us feedback on the API we provide.

Additionally, we could use this code to ensure that contract key does not have Cid at the serialization level.

It is not clear to me that all of that would be actually useful, but

  • the current code can be the current code can be very easily adapted to add extra cid checks.
  • I am pretty confident the current code is correct, I would be much less if we add it back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it back in 9b39254. I’ve added both the de and encoder. It seems weird to be non-symmetric here and if you want to prevent it on decoding you might also want a failsafe on encoding.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I want for both.
Thanks for taking time to revert this change, even if is not a deal breaker for me.

(a ?|? b) should ===(va.inj(a) ?|? va.inj(b))
}
}

"Order" - {
type Cid = Int
type T = Value[Cid]
type T = Value
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think T could be inlined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cocreature cocreature force-pushed the transaction-typeparam branch from ed0f7e6 to 2aea1bf Compare September 14, 2021 09:25
@cocreature cocreature marked this pull request as ready for review September 14, 2021 09:27
@cocreature cocreature force-pushed the transaction-typeparam branch from 9b39254 to 84f812f Compare September 16, 2021 06:20
99% of our usecases use Value[ContractId] so this PR just fixes it.

The few other usescases are:

1. Value[Nothing] which we use for keys. This is technically more
precise but we benefit very little from it.
2. Value[String] mostly because in a few places we are lazy.

We don’t have any code which benefits from being polymorphic in the
contract id type.

changelog_begin
changelog_end
@cocreature cocreature force-pushed the transaction-typeparam branch from 84f812f to c87b558 Compare September 16, 2021 06:20
@cocreature cocreature enabled auto-merge (squash) September 16, 2021 08:27
@cocreature cocreature merged commit 8e22bb6 into main Sep 16, 2021
@cocreature cocreature deleted the transaction-typeparam branch September 16, 2021 08:46
azure-pipelines bot pushed a commit that referenced this pull request Sep 22, 2021
This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.

@garyverhaegen-da is in charge of this release.

Commit log:
```
1b473c2 Switch trigger service time provider default to wall-clock time (#10967)
4acf34b Add conversions from/to interfaces in Daml parser (#10954)
d50df11 interface: Add to/from interface in scala ast (#10960)
9f88e09 Drop jdk8 override (#10963)
e0587bc Add a bit of detail to RegisteredTemplates documentation, motivated by: (#10962)
cebe6ed Refactor safetyStep in the simplifier. (#10948)
ac192fc interfaces: Add to/from interface in Haskell typechecker (#10951)
4b4d7a3 Remove update normalizer which was too aggresive (#10925)
66e1098 Add tests for the `CompletionFromTransaction` converter [KVL-1104] (#10885)
724e50d interfaces: Add to/from interface in Haskell AST (#10945)
9a8d55a Change slack link to discuss wiki. Fixes #10946 (#10947)
8b3b033 LF: Test preprocessor resuming (#10936)
2edfc06 ifaces: name collision, typecheck fetch/exercise (#10896)
5dc15c6 LF: rename language Interface to PackageInterface (#10938)
054c6ab Upgrade canton to a more recent version (#10944)
b8533d5 [JSON-API] Production/HA documentation. (#10903)
a331762 Clarify `CommandTracker` [KVL-1104] (#10943)
5244643 Changes to increase timeout and remove assertions around mock CommandSubmissionServiceImpl (#10942)
6cc42ee rotate release duty after 1.17.0-snapshot.20210915.7832.0.38227a8e (#10892)
88ef05e sandbox-classic: Only allow `--max-parallel-submissions` here. (#10941)
ac02dbd LF: Exhaustive test for valueTranslator. (#10927)
409c0b4 interfaces: Add to/from_interface in proto (#10937)
02c8a9d Split CommonStorageBackend (#10871)
dc71a6a update NOTICES file (#10932)
0ba54a4 Add a missing test case to the `CommandTrackerFlowTest` (#10939)
855ecdf [DPP-572] Add ledger API test case for verifying conformance to `--min-tls-version` flag. (#10898)
3e13e3d Switch to stable urls in scoop python manifest (#10933)
fc2c87d ledger-api-client: Generate a submission id if it's empty in the `CommandClient` [KVL-1104] (#10926)
04d8f75 Clean up sandbox-on-x conformance tests. (#10766)
b4541b5 Logging delay of submitted commands (#10912)
b8e21d8 Fix takeFilter for the test StreamConsumer  (#10918)
906368d LF: exhaustive test for CommandPreprocessor (#10914)
61d214e Add fetch, exercise implementations for interfaces in speedy. (#10911)
d01f8e1 Fix flaky ApiConfigManagementServiceSpec test (#10922)
50291ed interfaces: scala typechecker implementation (#10867)
cac8391 Bump ghc-lib to include daml interfaces parser (#10747)
b6a6bf7 [Ledger API error codes] Extracted common errors and groups [DPP-607] (#10890)
308f938 Dpp 494 unit testing ha coordinator (#10862)
30f74ad Mark Extractor's VeryLargeArchiveSpec test as flaky (#10916)
9582e01 LF: Refactor PreprocessorSpec test (#10909)
9b0fa29 Separate exercise & fetch for interfaces from templates (#10908)
f4adee9 Add conformance test for command deduplication using the CommandService [KVL-1099] (#10883)
8a39118 Rename Completion.deduplication_time to deduplication_duration [KVL-1057] (#10900)
8e22bb6 Drop ContractId typeparameter from Value (#10827)
4543705 Drop cocreature as a codeowner from runtime things (#10906)
e6e8147 Release 1.17.0 RC from second to last commit (#10904)
f08ac5f Desugar interface implements declarations (#10895)
b5648c0 Make `CommandTracker` distinguish submissions of the same command using `submissionId` [KVL-1104] (#10868)
```
Changelog:
```
[Triggers Service] The service now starts by default using wall-clock time instead
of static time. If you want to run using static time, you need to do so explicitly
using the new '-s' or '--static-time' CLI option. If you were already using '-w'
or '--wall-clock-time' the flag has no effect. It's anyway safe to leave it there.
Sandbox: Add CLI flag `--min-tls-version` to select minimum enabled TLS version for participant server.

```

CHANGELOG_BEGIN
CHANGELOG_END
garyverhaegen-da pushed a commit that referenced this pull request Sep 22, 2021
* release 1.17.0-snapshot.20210921.7889.0.1b473c2b

This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.

@garyverhaegen-da is in charge of this release.

Commit log:
```
1b473c2 Switch trigger service time provider default to wall-clock time (#10967)
4acf34b Add conversions from/to interfaces in Daml parser (#10954)
d50df11 interface: Add to/from interface in scala ast (#10960)
9f88e09 Drop jdk8 override (#10963)
e0587bc Add a bit of detail to RegisteredTemplates documentation, motivated by: (#10962)
cebe6ed Refactor safetyStep in the simplifier. (#10948)
ac192fc interfaces: Add to/from interface in Haskell typechecker (#10951)
4b4d7a3 Remove update normalizer which was too aggresive (#10925)
66e1098 Add tests for the `CompletionFromTransaction` converter [KVL-1104] (#10885)
724e50d interfaces: Add to/from interface in Haskell AST (#10945)
9a8d55a Change slack link to discuss wiki. Fixes #10946 (#10947)
8b3b033 LF: Test preprocessor resuming (#10936)
2edfc06 ifaces: name collision, typecheck fetch/exercise (#10896)
5dc15c6 LF: rename language Interface to PackageInterface (#10938)
054c6ab Upgrade canton to a more recent version (#10944)
b8533d5 [JSON-API] Production/HA documentation. (#10903)
a331762 Clarify `CommandTracker` [KVL-1104] (#10943)
5244643 Changes to increase timeout and remove assertions around mock CommandSubmissionServiceImpl (#10942)
6cc42ee rotate release duty after 1.17.0-snapshot.20210915.7832.0.38227a8e (#10892)
88ef05e sandbox-classic: Only allow `--max-parallel-submissions` here. (#10941)
ac02dbd LF: Exhaustive test for valueTranslator. (#10927)
409c0b4 interfaces: Add to/from_interface in proto (#10937)
02c8a9d Split CommonStorageBackend (#10871)
dc71a6a update NOTICES file (#10932)
0ba54a4 Add a missing test case to the `CommandTrackerFlowTest` (#10939)
855ecdf [DPP-572] Add ledger API test case for verifying conformance to `--min-tls-version` flag. (#10898)
3e13e3d Switch to stable urls in scoop python manifest (#10933)
fc2c87d ledger-api-client: Generate a submission id if it's empty in the `CommandClient` [KVL-1104] (#10926)
04d8f75 Clean up sandbox-on-x conformance tests. (#10766)
b4541b5 Logging delay of submitted commands (#10912)
b8e21d8 Fix takeFilter for the test StreamConsumer  (#10918)
906368d LF: exhaustive test for CommandPreprocessor (#10914)
61d214e Add fetch, exercise implementations for interfaces in speedy. (#10911)
d01f8e1 Fix flaky ApiConfigManagementServiceSpec test (#10922)
50291ed interfaces: scala typechecker implementation (#10867)
cac8391 Bump ghc-lib to include daml interfaces parser (#10747)
b6a6bf7 [Ledger API error codes] Extracted common errors and groups [DPP-607] (#10890)
308f938 Dpp 494 unit testing ha coordinator (#10862)
30f74ad Mark Extractor's VeryLargeArchiveSpec test as flaky (#10916)
9582e01 LF: Refactor PreprocessorSpec test (#10909)
9b0fa29 Separate exercise & fetch for interfaces from templates (#10908)
f4adee9 Add conformance test for command deduplication using the CommandService [KVL-1099] (#10883)
8a39118 Rename Completion.deduplication_time to deduplication_duration [KVL-1057] (#10900)
8e22bb6 Drop ContractId typeparameter from Value (#10827)
4543705 Drop cocreature as a codeowner from runtime things (#10906)
e6e8147 Release 1.17.0 RC from second to last commit (#10904)
f08ac5f Desugar interface implements declarations (#10895)
b5648c0 Make `CommandTracker` distinguish submissions of the same command using `submissionId` [KVL-1104] (#10868)
```
Changelog:
```
[Triggers Service] The service now starts by default using wall-clock time instead
of static time. If you want to run using static time, you need to do so explicitly
using the new '-s' or '--static-time' CLI option. If you were already using '-w'
or '--wall-clock-time' the flag has no effect. It's anyway safe to leave it there.
Sandbox: Add CLI flag `--min-tls-version` to select minimum enabled TLS version for participant server.

```

CHANGELOG_BEGIN
CHANGELOG_END

* 1.18 not 1.17

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
garyverhaegen-da added a commit that referenced this pull request Sep 22, 2021
@garyverhaegen-da is in charge of this release.

This supersedes the failed #10971 and #10993.

Commit log:
```
ced4a27 Include concurrency info in output (#10970)
a0b6800 Limit maximum number of concurrent tests (#10969)
a0fe0f6 release 1.18.0-snapshot.20210921.7889.1.1b473c2b (#10993)
58c82b6 LF: reduce usage of NodeCreate.coinst (#10988)
f56ce2a kvutils: Add structured error data to the error metadata [KVL-1032] (#10964)
3f4dbf6 interfaces: Syntax highlighting for interfaces (#10987)
d52a285 interface: Add test for conversion functions (#10991)
28b8d9a bump dotnet (#10979)
fe10ffb Use ValueEnricher in ScenarioRunner. (#10897)
bdad7d5 Upgrade Java on Windows (#10965)
34390f7 interfaces: Implemented conversions, added test. (#10982)
7740b60 participant-integration-api: Improve the CommandConfiguration docs. (#10978)
04f322e Bump resources for daml-ledger tests (#10984)
6d9922e Retry upsert of command deduplication on oracle and h2 [DPP-609] (#10976)
eb4f1b2 LF: Move lookup tests out of EngineTest (#10973)
99836d2 Handle fetchByKey callback correctly in scenario runner (#10980)
23e6a2d Improve feedback from failing match in AuthMatchers (#10981)
e299103 [Short] Small test tool's CLI parser refactor (#10923)
fc153a9 release 1.18.0-snapshot.20210921.7889.0.1b473c2b (#10971)
1b473c2 Switch trigger service time provider default to wall-clock time (#10967)
4acf34b Add conversions from/to interfaces in Daml parser (#10954)
d50df11 interface: Add to/from interface in scala ast (#10960)
9f88e09 Drop jdk8 override (#10963)
e0587bc Add a bit of detail to RegisteredTemplates documentation, motivated by: (#10962)
cebe6ed Refactor safetyStep in the simplifier. (#10948)
ac192fc interfaces: Add to/from interface in Haskell typechecker (#10951)
4b4d7a3 Remove update normalizer which was too aggresive (#10925)
66e1098 Add tests for the `CompletionFromTransaction` converter [KVL-1104] (#10885)
724e50d interfaces: Add to/from interface in Haskell AST (#10945)
9a8d55a Change slack link to discuss wiki. Fixes #10946 (#10947)
8b3b033 LF: Test preprocessor resuming (#10936)
2edfc06 ifaces: name collision, typecheck fetch/exercise (#10896)
5dc15c6 LF: rename language Interface to PackageInterface (#10938)
054c6ab Upgrade canton to a more recent version (#10944)
b8533d5 [JSON-API] Production/HA documentation. (#10903)
a331762 Clarify `CommandTracker` [KVL-1104] (#10943)
5244643 Changes to increase timeout and remove assertions around mock CommandSubmissionServiceImpl (#10942)
6cc42ee rotate release duty after 1.17.0-snapshot.20210915.7832.0.38227a8e (#10892)
88ef05e sandbox-classic: Only allow `--max-parallel-submissions` here. (#10941)
ac02dbd LF: Exhaustive test for valueTranslator. (#10927)
409c0b4 interfaces: Add to/from_interface in proto (#10937)
02c8a9d Split CommonStorageBackend (#10871)
dc71a6a update NOTICES file (#10932)
0ba54a4 Add a missing test case to the `CommandTrackerFlowTest` (#10939)
855ecdf [DPP-572] Add ledger API test case for verifying conformance to `--min-tls-version` flag. (#10898)
3e13e3d Switch to stable urls in scoop python manifest (#10933)
fc2c87d ledger-api-client: Generate a submission id if it's empty in the `CommandClient` [KVL-1104] (#10926)
04d8f75 Clean up sandbox-on-x conformance tests. (#10766)
b4541b5 Logging delay of submitted commands (#10912)
b8e21d8 Fix takeFilter for the test StreamConsumer  (#10918)
906368d LF: exhaustive test for CommandPreprocessor (#10914)
61d214e Add fetch, exercise implementations for interfaces in speedy. (#10911)
d01f8e1 Fix flaky ApiConfigManagementServiceSpec test (#10922)
50291ed interfaces: scala typechecker implementation (#10867)
cac8391 Bump ghc-lib to include daml interfaces parser (#10747)
b6a6bf7 [Ledger API error codes] Extracted common errors and groups [DPP-607] (#10890)
308f938 Dpp 494 unit testing ha coordinator (#10862)
30f74ad Mark Extractor's VeryLargeArchiveSpec test as flaky (#10916)
9582e01 LF: Refactor PreprocessorSpec test (#10909)
9b0fa29 Separate exercise & fetch for interfaces from templates (#10908)
f4adee9 Add conformance test for command deduplication using the CommandService [KVL-1099] (#10883)
8a39118 Rename Completion.deduplication_time to deduplication_duration [KVL-1057] (#10900)
8e22bb6 Drop ContractId typeparameter from Value (#10827)
4543705 Drop cocreature as a codeowner from runtime things (#10906)
e6e8147 Release 1.17.0 RC from second to last commit (#10904)
f08ac5f Desugar interface implements declarations (#10895)
b5648c0 Make `CommandTracker` distinguish submissions of the same command using `submissionId` [KVL-1104] (#10868)
```

Changelog:
```
[Triggers Service] The service now starts by default using wall-clock time instead
of static time. If you want to run using static time, you need to do so explicitly
using the new '-s' or '--static-time' CLI option. If you were already using '-w'
or '--wall-clock-time' the flag has no effect. It's anyway safe to leave it there.
Sandbox: Add CLI flag `--min-tls-version` to select minimum enabled TLS version for participant server.
```

CHANGELOG_BEGIN
CHANGELOG_END
garyverhaegen-da added a commit that referenced this pull request Sep 22, 2021
@garyverhaegen-da is in charge of this release.

This supersedes the failed #10971 and #10993.

Commit log:
```
ced4a27 Include concurrency info in output (#10970)
a0b6800 Limit maximum number of concurrent tests (#10969)
a0fe0f6 release 1.18.0-snapshot.20210921.7889.1.1b473c2b (#10993)
58c82b6 LF: reduce usage of NodeCreate.coinst (#10988)
f56ce2a kvutils: Add structured error data to the error metadata [KVL-1032] (#10964)
3f4dbf6 interfaces: Syntax highlighting for interfaces (#10987)
d52a285 interface: Add test for conversion functions (#10991)
28b8d9a bump dotnet (#10979)
fe10ffb Use ValueEnricher in ScenarioRunner. (#10897)
bdad7d5 Upgrade Java on Windows (#10965)
34390f7 interfaces: Implemented conversions, added test. (#10982)
7740b60 participant-integration-api: Improve the CommandConfiguration docs. (#10978)
04f322e Bump resources for daml-ledger tests (#10984)
6d9922e Retry upsert of command deduplication on oracle and h2 [DPP-609] (#10976)
eb4f1b2 LF: Move lookup tests out of EngineTest (#10973)
99836d2 Handle fetchByKey callback correctly in scenario runner (#10980)
23e6a2d Improve feedback from failing match in AuthMatchers (#10981)
e299103 [Short] Small test tool's CLI parser refactor (#10923)
fc153a9 release 1.18.0-snapshot.20210921.7889.0.1b473c2b (#10971)
1b473c2 Switch trigger service time provider default to wall-clock time (#10967)
4acf34b Add conversions from/to interfaces in Daml parser (#10954)
d50df11 interface: Add to/from interface in scala ast (#10960)
9f88e09 Drop jdk8 override (#10963)
e0587bc Add a bit of detail to RegisteredTemplates documentation, motivated by: (#10962)
cebe6ed Refactor safetyStep in the simplifier. (#10948)
ac192fc interfaces: Add to/from interface in Haskell typechecker (#10951)
4b4d7a3 Remove update normalizer which was too aggresive (#10925)
66e1098 Add tests for the `CompletionFromTransaction` converter [KVL-1104] (#10885)
724e50d interfaces: Add to/from interface in Haskell AST (#10945)
9a8d55a Change slack link to discuss wiki. Fixes #10946 (#10947)
8b3b033 LF: Test preprocessor resuming (#10936)
2edfc06 ifaces: name collision, typecheck fetch/exercise (#10896)
5dc15c6 LF: rename language Interface to PackageInterface (#10938)
054c6ab Upgrade canton to a more recent version (#10944)
b8533d5 [JSON-API] Production/HA documentation. (#10903)
a331762 Clarify `CommandTracker` [KVL-1104] (#10943)
5244643 Changes to increase timeout and remove assertions around mock CommandSubmissionServiceImpl (#10942)
6cc42ee rotate release duty after 1.17.0-snapshot.20210915.7832.0.38227a8e (#10892)
88ef05e sandbox-classic: Only allow `--max-parallel-submissions` here. (#10941)
ac02dbd LF: Exhaustive test for valueTranslator. (#10927)
409c0b4 interfaces: Add to/from_interface in proto (#10937)
02c8a9d Split CommonStorageBackend (#10871)
dc71a6a update NOTICES file (#10932)
0ba54a4 Add a missing test case to the `CommandTrackerFlowTest` (#10939)
855ecdf [DPP-572] Add ledger API test case for verifying conformance to `--min-tls-version` flag. (#10898)
3e13e3d Switch to stable urls in scoop python manifest (#10933)
fc2c87d ledger-api-client: Generate a submission id if it's empty in the `CommandClient` [KVL-1104] (#10926)
04d8f75 Clean up sandbox-on-x conformance tests. (#10766)
b4541b5 Logging delay of submitted commands (#10912)
b8e21d8 Fix takeFilter for the test StreamConsumer  (#10918)
906368d LF: exhaustive test for CommandPreprocessor (#10914)
61d214e Add fetch, exercise implementations for interfaces in speedy. (#10911)
d01f8e1 Fix flaky ApiConfigManagementServiceSpec test (#10922)
50291ed interfaces: scala typechecker implementation (#10867)
cac8391 Bump ghc-lib to include daml interfaces parser (#10747)
b6a6bf7 [Ledger API error codes] Extracted common errors and groups [DPP-607] (#10890)
308f938 Dpp 494 unit testing ha coordinator (#10862)
30f74ad Mark Extractor's VeryLargeArchiveSpec test as flaky (#10916)
9582e01 LF: Refactor PreprocessorSpec test (#10909)
9b0fa29 Separate exercise & fetch for interfaces from templates (#10908)
f4adee9 Add conformance test for command deduplication using the CommandService [KVL-1099] (#10883)
8a39118 Rename Completion.deduplication_time to deduplication_duration [KVL-1057] (#10900)
8e22bb6 Drop ContractId typeparameter from Value (#10827)
4543705 Drop cocreature as a codeowner from runtime things (#10906)
e6e8147 Release 1.17.0 RC from second to last commit (#10904)
f08ac5f Desugar interface implements declarations (#10895)
b5648c0 Make `CommandTracker` distinguish submissions of the same command using `submissionId` [KVL-1104] (#10868)
```

Changelog:
```
[Triggers Service] The service now starts by default using wall-clock time instead
of static time. If you want to run using static time, you need to do so explicitly
using the new '-s' or '--static-time' CLI option. If you were already using '-w'
or '--wall-clock-time' the flag has no effect. It's anyway safe to leave it there.
Sandbox: Add CLI flag `--min-tls-version` to select minimum enabled TLS version for participant server.
```

CHANGELOG_BEGIN
CHANGELOG_END
cocreature pushed a commit that referenced this pull request Sep 23, 2021
@garyverhaegen-da is in charge of this release.

This supersedes the failed #10971 and #10993.

Commit log:
```
ced4a27 Include concurrency info in output (#10970)
a0b6800 Limit maximum number of concurrent tests (#10969)
a0fe0f6 release 1.18.0-snapshot.20210921.7889.1.1b473c2b (#10993)
58c82b6 LF: reduce usage of NodeCreate.coinst (#10988)
f56ce2a kvutils: Add structured error data to the error metadata [KVL-1032] (#10964)
3f4dbf6 interfaces: Syntax highlighting for interfaces (#10987)
d52a285 interface: Add test for conversion functions (#10991)
28b8d9a bump dotnet (#10979)
fe10ffb Use ValueEnricher in ScenarioRunner. (#10897)
bdad7d5 Upgrade Java on Windows (#10965)
34390f7 interfaces: Implemented conversions, added test. (#10982)
7740b60 participant-integration-api: Improve the CommandConfiguration docs. (#10978)
04f322e Bump resources for daml-ledger tests (#10984)
6d9922e Retry upsert of command deduplication on oracle and h2 [DPP-609] (#10976)
eb4f1b2 LF: Move lookup tests out of EngineTest (#10973)
99836d2 Handle fetchByKey callback correctly in scenario runner (#10980)
23e6a2d Improve feedback from failing match in AuthMatchers (#10981)
e299103 [Short] Small test tool's CLI parser refactor (#10923)
fc153a9 release 1.18.0-snapshot.20210921.7889.0.1b473c2b (#10971)
1b473c2 Switch trigger service time provider default to wall-clock time (#10967)
4acf34b Add conversions from/to interfaces in Daml parser (#10954)
d50df11 interface: Add to/from interface in scala ast (#10960)
9f88e09 Drop jdk8 override (#10963)
e0587bc Add a bit of detail to RegisteredTemplates documentation, motivated by: (#10962)
cebe6ed Refactor safetyStep in the simplifier. (#10948)
ac192fc interfaces: Add to/from interface in Haskell typechecker (#10951)
4b4d7a3 Remove update normalizer which was too aggresive (#10925)
66e1098 Add tests for the `CompletionFromTransaction` converter [KVL-1104] (#10885)
724e50d interfaces: Add to/from interface in Haskell AST (#10945)
9a8d55a Change slack link to discuss wiki. Fixes #10946 (#10947)
8b3b033 LF: Test preprocessor resuming (#10936)
2edfc06 ifaces: name collision, typecheck fetch/exercise (#10896)
5dc15c6 LF: rename language Interface to PackageInterface (#10938)
054c6ab Upgrade canton to a more recent version (#10944)
b8533d5 [JSON-API] Production/HA documentation. (#10903)
a331762 Clarify `CommandTracker` [KVL-1104] (#10943)
5244643 Changes to increase timeout and remove assertions around mock CommandSubmissionServiceImpl (#10942)
6cc42ee rotate release duty after 1.17.0-snapshot.20210915.7832.0.38227a8e (#10892)
88ef05e sandbox-classic: Only allow `--max-parallel-submissions` here. (#10941)
ac02dbd LF: Exhaustive test for valueTranslator. (#10927)
409c0b4 interfaces: Add to/from_interface in proto (#10937)
02c8a9d Split CommonStorageBackend (#10871)
dc71a6a update NOTICES file (#10932)
0ba54a4 Add a missing test case to the `CommandTrackerFlowTest` (#10939)
855ecdf [DPP-572] Add ledger API test case for verifying conformance to `--min-tls-version` flag. (#10898)
3e13e3d Switch to stable urls in scoop python manifest (#10933)
fc2c87d ledger-api-client: Generate a submission id if it's empty in the `CommandClient` [KVL-1104] (#10926)
04d8f75 Clean up sandbox-on-x conformance tests. (#10766)
b4541b5 Logging delay of submitted commands (#10912)
b8e21d8 Fix takeFilter for the test StreamConsumer  (#10918)
906368d LF: exhaustive test for CommandPreprocessor (#10914)
61d214e Add fetch, exercise implementations for interfaces in speedy. (#10911)
d01f8e1 Fix flaky ApiConfigManagementServiceSpec test (#10922)
50291ed interfaces: scala typechecker implementation (#10867)
cac8391 Bump ghc-lib to include daml interfaces parser (#10747)
b6a6bf7 [Ledger API error codes] Extracted common errors and groups [DPP-607] (#10890)
308f938 Dpp 494 unit testing ha coordinator (#10862)
30f74ad Mark Extractor's VeryLargeArchiveSpec test as flaky (#10916)
9582e01 LF: Refactor PreprocessorSpec test (#10909)
9b0fa29 Separate exercise & fetch for interfaces from templates (#10908)
f4adee9 Add conformance test for command deduplication using the CommandService [KVL-1099] (#10883)
8a39118 Rename Completion.deduplication_time to deduplication_duration [KVL-1057] (#10900)
8e22bb6 Drop ContractId typeparameter from Value (#10827)
4543705 Drop cocreature as a codeowner from runtime things (#10906)
e6e8147 Release 1.17.0 RC from second to last commit (#10904)
f08ac5f Desugar interface implements declarations (#10895)
b5648c0 Make `CommandTracker` distinguish submissions of the same command using `submissionId` [KVL-1104] (#10868)
```

Changelog:
```
[Triggers Service] The service now starts by default using wall-clock time instead
of static time. If you want to run using static time, you need to do so explicitly
using the new '-s' or '--static-time' CLI option. If you were already using '-w'
or '--wall-clock-time' the flag has no effect. It's anyway safe to leave it there.
Sandbox: Add CLI flag `--min-tls-version` to select minimum enabled TLS version for participant server.
```

CHANGELOG_BEGIN
CHANGELOG_END
@@ -94,6 +74,16 @@ object Value extends CidContainer1[Value] {
go
}

def cids[Cid2 >: ContractId] = {
val cids = Set.newBuilder[Cid2]
foreach1(cids += _)
Copy link
Contributor

@oliverse-da oliverse-da Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cocreature , it does not look like foreach1(cids += _) adds any contract ids to the builder as Value.foreach1 with a single parameter returns another function.

Caught by a couple of innocent-looking canton unit tests.

-    foreach1(cids += _)
+    foreach1(cids += _)(this)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed fix in #11032

remyhaemmerle-da added a commit that referenced this pull request Oct 29, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Oct 29, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Oct 29, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Oct 29, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Oct 29, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 1, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 2, 2021
After #10827 that drops type parameters in Value, `CidContainer`'s
`ensureNoCid` and `assertNoCid` loose their interest.
To check a value does not contain Contract Ids one should use
`foreachCid` or `cids` methods.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 2, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 2, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 2, 2021
After #10827 that drops type parameters in Value, `CidContainer`'s
`ensureNoCid` and `assertNoCid` loose their interest.
To check a value does not contain Contract Ids one should use
`foreachCid` or `cids` methods instead.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 2, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
mergify bot pushed a commit that referenced this pull request Nov 2, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 3, 2021
After #10827 that drops type parameters in Value, `CidContainer`'s
`ensureNoCid` and `assertNoCid` loose their interest.
To check a value does not contain Contract Ids one should use
`foreachCid` or `cids` methods instead.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 4, 2021
After #10827 that drops type parameters in Value, `CidContainer`'s
`ensureNoCid` and `assertNoCid` loose their interest.
To check a value does not contain Contract Ids one should use
`foreachCid` or `cids` methods instead.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 9, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenTransaction to Transaction.

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 9, 2021
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenTransaction to Transaction.

CHANGELOG_BEGIN
CHANGELOG_END
mergify bot pushed a commit that referenced this pull request Nov 9, 2021
* LF: Rename GenTransaction to Transaction

Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenTransaction to Transaction.

CHANGELOG_BEGIN
CHANGELOG_END

* fix

* a bit more fixes
remyhaemmerle-da added a commit that referenced this pull request Nov 10, 2021
Following up #10827 and #10921, we drop type parameter to
KeyWithMaintainers, and use the `Versioned` wrapper introduced in

CHANGELOG_BEGIN
CHANGELOG_END
remyhaemmerle-da added a commit that referenced this pull request Nov 10, 2021
Following up #10827 and #10921, we drop type parameter to
KeyWithMaintainers, and use the `Versioned` wrapper introduced in

CHANGELOG_BEGIN
CHANGELOG_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants