Commit Graph

9559 Commits

Author SHA1 Message Date
Simon Maxen
dfcf4d737a
Delete transaction_metering records following aggregation [DPP-820] (#13018)
* Delete transaction_metering records following aggregation.

changelog_begin
changelog_end
2022-02-22 17:59:35 +00:00
Remy
e834a7b85c
Triggers: Connect Logging context from Triggers to the Speedy. (#13009)
Follow up of #12976.
fixes #12208

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 18:28:49 +01:00
Moisés Ackerman
42462f4574
Notify Moisés on slack (#13026) 2022-02-22 17:07:50 +00:00
Sergey Kisel
c50360bbb2
[DPP-601] Measure only active time in indexer stage metrics (#12951)
* [DPP-601] Measure only active time in indexer stage metrics

changelog_begin
changelog_end
2022-02-22 18:07:26 +01:00
pbatko-da
a4f9dd79c6
[User management] Add race conditions test-tool tests for CreateUser and GrantUserRights [DPP-847] (#12983)
changelog_begin
changelog_end
2022-02-22 17:36:06 +01:00
Stephen Compall
6bb438e855
test middleware user tokens with oauth2 server user tokens (#12991)
TestMiddlewareUserToken now uses user tokens from the oauth
server as well, courtesy #12929. TestMiddlewareClaimsToken is the
only middleware-only (non-Client) test that switches the oauth
test server back to producing claims tokens, and contains all the
tests that depend on claims token semantics. These tests are in a
sense exercising the oauth server rather than the middleware.

The token returned by the oauth server is irrelevant for the behavior these
tests are exercising, so they are merely ported to always run on user tokens.

- CallbackUriOverride
- LimitedCallbackStore
- ClientLimitedCallbackStore
- ClientNoRedirectToLogin
- ClientYesRedirectToLogin
- ClientAutoRedirectToLogin

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 11:08:15 -05:00
fabiotudone-da
095a017a31
Grant driver-specific API test tools access to KV offsets and ParticipantTestContext (#13023)
CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 16:59:18 +01:00
Bernhard Elsner
cdd120dab9
Bump SDK version numbers to 2.0 where appropriate (#13013)
CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 16:47:35 +01:00
Moisés Ackerman
2532cf8991
Derive Eq for interfaces (#12988)
changelog_begin
changelog_end
2022-02-22 16:33:48 +01:00
davidrichards-da
8afd7e4231
Updated the concepts and merged Cantons key concepts (#13010)
* Updated the concepts and merged Cantons key concepts

CHANGELOG_BEGIN
CHANGELOG_END

Updated the concepts in the glossary to, hopefully, agreeable terms and explanations.  I also merged Cantons key concepts into this file and I have removed Canton's concepts.rst file in this PR - https://github.com/DACH-NY/canton/pull/8658

* Made changes based on the comments left by Moritz

Made multiple changes based on the comments left by Moritz

* Removed two terms based on Mortiz feedback

Removed dalf clarification and part about parties interacting with the ledger.

* Updating the ledger definition

Updating the ledger definition to make the distinction between a ledger and a canton ledger for the inclusion of VMBC.

* Update docs/source/concepts/glossary.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/concepts/glossary.rst

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update docs/source/concepts/glossary.rst

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update docs/source/concepts/glossary.rst

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Adding the links to the ledger description

Adding the links that I missed previously to the ledger description

* Removing the Atomic transaction description

Removing the Atomic transaction description - it's not needed in our docs & there are better definitions.

* Moved the participant node out of the Canton section

Moved the participant node out of the Canton section and removed the 'todos' at the top

* Fix missing new line after comment

Fixing due to build failing

* Adding trust domain back in

Adding 'trust domain' back in as we use it to link to from elsewhere.

* Update docs/source/concepts/glossary.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-02-22 14:39:07 +00:00
Moritz Kiefer
8a966bfaf3
Upgrade sphinx (#12968)
* Upgrade sphinx

Don’t want to be stuck on 1.8.3 forever. The current version is
4.4.0 (this upgrades to 4.3.1 which is the latest in nixpkgs).

I did had to drop footnotebackref. This runs into the same issue as
https://tex.stackexchange.com/questions/137594/hyperref-footnotebackref-in-longtable
but just copying the fix doesn’t work and I don’t understand enough
about the details here to fix this myself.

We have 7 footnotes in the Daml docs + some in the Canton docs. That
does not seem worth sticking on a sphinx version from 2018 for just to
get backreferences from footnotes to the link on the same page.

changelog_begin
changelog_end

* turns out you need fonts maybe

* .

changelog_begin
changelog_end

* suppport :force: in daml-docs

changelog_begin
changelog_end
2022-02-22 14:30:15 +00:00
Moritz Kiefer
92af00c5c1
Add missing fmt in sphinx sources (#13001)
Fixes https://github.com/DACH-NY/assembly/issues/98

changelog_begin
changelog_end
2022-02-22 15:28:07 +01:00
Robin Krom
adaddde058
speedy: short circuit precondition checking (#12984)
* speedy: short circuit precondition checking

Instead of evaluating all preconditions of templates and interfaces we
evaluate preconditions one by one and throw an exception as soon as we
find a failing one.

This implemented via a lazy SBCheckPrecond builtin and a foldleft
expression over the list of preconditions.

CHANGELOG_BEGIN
CHANGELOG_END

* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Compiler.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* fix SUnit -> Unit

* tests

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-02-22 14:24:06 +00:00
azure-pipelines[bot]
942fbe08cd
update NOTICES file (#13014)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-02-22 15:12:44 +01:00
Sofia Faro
b842b53ff4
Delete vestigial InterfaceChoice from AST (#13017)
* Delete vestigial InterfaceChoice from AST

This is a leftover from when interfaces had virtual choices.

changelog_begin
changelog_end

* delete more
2022-02-22 13:59:04 +00:00
Bernhard Elsner
5cb672db2b
Fix docs rendering of \n in interpolated strings in TypeScript (#13015)
CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 13:43:35 +01:00
Simon Maxen
75f7dadf9d
Update Metering Helper in line with spec changes [DPP-904] (#13007)
* Switch metering command line aruments to day from ISO time

* New metering json layout

changelog_begin
changelog_end
2022-02-22 11:14:56 +00:00
Bernhard Elsner
68c76f6723
Fix the indentation of item four levels down the docs ToC. (#13016)
CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 12:02:14 +01:00
Moisés Ackerman
6971db9c6d
Remove .vscode/settings.json (#13008)
changelog_begin
changelog_end
2022-02-22 11:42:45 +01:00
Bernhard Elsner
0c94fd802e
Change mechanism for detecting the index page in the docs theme. (#12999)
CHANGELOG_BEGIN
CHANGLOG_END
2022-02-22 09:57:08 +00:00
Moisés Ackerman
6d268fdc16
Wrap interfaces in SAny in speedy (#12954)
* wrap interfaces in SAny in speedy

* expect SAny representation for interfaces in builtins

* Update SBResolveVirtual

* SBResolveSBUInsertFetchNode uses SAnyInterface

* SBResolveSBUBeginExercise uses SAnyInterface

* Wrap 'this' in SAnyInterface for interface preconditions

changelog_begin
changelog_end
2022-02-21 18:59:52 +00:00
Sofia Faro
b626aeb632
Add experimental builtin to show template typerep (#13004)
Part of #12792, this is the builtin we need to be able to effectively
store a TemplateTypeRep inside a template (i.e. you store a string
containing the template id, not a typerep).

changelog_begin
changelog_end
2022-02-21 18:24:56 +00:00
Bernhard Elsner
3d7edf84a9
Fix code block rendering issues (#13002)
CHANGELOG_BEGIN
CHANGELOG_END
2022-02-21 17:13:51 +00:00
mziolekda
61b09dc786
Mention error codes in the compatibility page of the daml documentation (#12981)
* Mention error codes in the compatibility paged of the daml documentation

CHANGELOG_BEGIN
CHANGELOG_END

* Rephrase the text
2022-02-21 16:30:47 +00:00
Simon Maxen
507494e768
Support for final metering reports [DPP-819] (#12973)
Metering reports may now be final

changelog_begin
Metering reports may now be final
changelog_end
2022-02-21 15:43:39 +00:00
Remy
ac3d9a4647
LF: Add LoggingContext to Speedy Machine (#12976)
This advances the state of #12208

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-21 13:34:46 +01:00
Samir Talwar
7fc345ab34
sandbox-classic: Fix the class loader when retrieving the banner. (#12972)
* sandbox-classic: Fix the class loader when retrieving the banner.

If the classloader is not explicitly provided to `Source.fromResource`,
it will use the current thread's class loader, which may not have access
to _banner.txt_. To avoid issues, we need to use the correct class
loader.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox-common: Get rid of a null check that should never fail.
2022-02-21 11:55:44 +01:00
Moritz Kiefer
71fc3529e6
Improve --help ux for Canton sandbox (#12990)
* Improve --help ux for Canton sandbox

fixes #12985

changelog_begin
changelog_end

* .
2022-02-21 10:33:50 +01:00
Marton Nagy
a9fd5497ef
Resolve some TODOs [DPP-876] (#12979)
changelog_begin
changelog_end
2022-02-17 21:07:21 +00:00
Stephen Compall
3ae19d991d
port auth middleware "test client" for user tokens (#12929)
Fixes #12881 by making the oauth2 test server invent user tokens
instead of claim tokens if you ask it to. As with the claim
tokens, these aren't "real" tokens backed by a participant
server, so only a subset of the tests makes sense, and we
abstract over the shared compatible tests accordingly.

CHANGELOG_BEGIN
CHANGELOG_END

* leave trigger service port for already-submitted issue #12831

* spin off another test idea, #12989
2022-02-17 19:44:08 +00:00
tudor-da
fa89d7e38f
Squash ReadOnlyLedger hierarchy [DPP-809] (#12748)
* Squash functionality ReadOnlyLedger hierarchy implementation into BaseLedger

changelog_begin
changelog_end

* Renamed BaseLedger to ReadOnlyLedgerImpl
* Removed BaseLedgerSpec test as it is redundant

* Package shifts
* Moves ReadOnlyLedger to package `index`
* Moves TransactionConversions and EventFilter to `appendonlydao.events`

* Refactorings:
* Extracted LedgerEndPoller out of ReadOnlyLedger
* Moves DispatcherLagMeter in its own file

* ReadOnlyLedgerOwnerBuilder

* Replace CacheIndex with MutableCacheLedgerEnd

* Rename DispatcherLagMeter to InstrumentedSignalNewLedgerHead
2022-02-17 17:42:12 +01:00
Moritz Kiefer
5e86c75ef8
Fix merge conflict in user mgmt (#12986)
98d5bd5f53
and
9d831ff122
don’t get along.

changelog_begin
changelog_end
2022-02-17 16:18:55 +00:00
azure-pipelines[bot]
065648b9e5
rotate release duty after 2022-02-16 (#12962)
@S11001001 is taking care of testing today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-02-17 09:50:23 -05:00
Marton Nagy
9d831ff122
[User management] Some cleanup to ongoing-stream-authorization [DPP-830] (#12851)
changelog_begin
changelog_end
2022-02-17 15:35:41 +01:00
pbatko-da
98d5bd5f53
[User management] Add submission-id to the logs for mutating user management calls [DPP-887] (#12955)
changelog_begin
changelog_end
2022-02-17 14:29:58 +01:00
Stefano Baghino
01ddb48d94
Add tests and refactor package reference decoding (#12982)
Specifically for the Java codegen, builds on top of #12977.

Makes sure we don't rely on PackageName.fromString and PackageVersion.fromString
to blow up when passed an empty string.

changelog_begin
changelog_end
2022-02-17 13:28:13 +01:00
Moritz Kiefer
ca6167e673
Fix parsing of java codegen module prefixes (#12977)
* Fix parsing of java codegen module prefixes

I admit I have no idea what I thought when I wrote that split but it
was clearly nothing sensible.

changelog_begin

- [Java Codegen] Fix parsing of `module-prefixes` to support package
  names containing dashes.

changelog_end

* reveiw comments

* Inline nameVersion

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-02-17 09:29:43 +00:00
azure-pipelines[bot]
3730f02a33
update NOTICES file (#12980)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-02-17 09:28:30 +01:00
Kamil Bozek
eb45a4cefc
Don't allow starting a participant with Postgres version < 10 [DPP-806] (#12959)
* Don't allow starting a participant with Postgres major version < 10

CHANGELOG_BEGIN
- [Integration Kit] - a participant cannot be run with Postgres versions <10
CHANGELOG_END

* Add a test

* Fix the test case to work on Windows where we use Postgres 12
2022-02-16 22:44:09 +00:00
Robert Autenrieth
18b681f521
DPP-745 Add Oracle data continuity tests (#12961)
* Add Oracle compatibility tests

changelog_begin
changelog_end

* Clean up

* Remove debug change

* Skip Oracle tests if there is nothing to do

* Add missing line warp

* Use ORACLE_PORT

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2022-02-16 23:37:50 +01:00
Stephen Compall
fceb9c1118
document Java 11 is needed; small release instruction problems found today (#12978)
In docs:

* doc that we require Java 11, not 8

In release instructions:

* mention everywhere that all-lowercase party entries should be made

* wrong line number for variable go-to-defn check

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-16 20:38:31 +00:00
Moritz Kiefer
e40f62f88a
Revert "Switch to Bazel 5 (#12935)" (#12974)
This reverts commit 4c0118df4d.

This breaks passing -p to bazel test for Haskell tests, e.g.,

bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p
--test_arg InterfaceEq

which breaks with something horrifying like

moritz@adjunction ~/daml (main)> bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p --test_arg InterfaceEq
[dev-env] Building tools.bazel...
[dev-env] Built tools.bazel in /nix/store/m7gzlmr0pqjpl01ihgvazxgfs3sfwl61-bazel and linked to /home/moritz/daml/dev-env/var/gc-roots/bazel
[dev-env] Building tools.find...
[dev-env] Built tools.find in /nix/store/645v3545lcbx77wq7355rgdrgbhn5wx7-findutils-4.8.0 and linked to /home/moritz/daml/dev-env/var/gc-roots/find
INFO: Invocation ID: 034b3e45-851f-472e-ab71-b7f718829582
DEBUG: /home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/rules_haskell/haskell/private/versions.bzl:60:10: WARNING: bazel version is too recent. Supported versions range from 4.0.0 to 4.2.1, but found: 5.0.0- (@non-git)
/nix/store/dadkhf8vch2i2kvig962ilfr5j3chshr-go-1.17.6
/nix/store/pzh24n543i6jqa01hdmgqknlyf294bn1-bazel-nixpkgs-posix-toolchain
/nix/store/2hfwndk47wpvaib06qyhcdp83b423xvh-jq-1.6-bin
/nix/store/hjggs9s82qh7r5j8sgapn389hf24wdx8-bazel-nixpkgs-cc-toolchain
/nix/store/yxgg3bn4v288sc00kf09svrwz2r461c9-ghc-native-bignum-9.0.2
/nix/store/2hwx0jhcdsx3wfvmb50ih19jkh2ra4jh-glibc-locales-2.33-108
/nix/store/8wpmx049z8m0ffhy3jyi41qb6pbxwvy8-bazel-nixpkgs-java-runtime
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 3d79fe1470dcb842d5944c98dfe7a62715db6d86fdb12d3ff60af3bdf41b7996
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 9f46e824944add9e9951ef51ddb6cb4b744bc97f90b5749132179d1d1699dfa1
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o, previous action: action 'Compiling src/tools/launcher/dummy.cc', attempted action: action 'Compiling src/tools/launcher/dummy.cc'

changelog_begin
changelog_end
2022-02-16 18:24:00 +00:00
Jennifer Whyte
bdfbb0d928
Update bg color on docs sections (#12975)
Adds a background color to the floating section. Previously it was transparent and caused readability issues.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-16 12:21:26 -05:00
Remy
515f4277a9
LF: Make TransactionVersion.Ordering public (#12966)
To be accessible from Canton.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-16 16:15:50 +00:00
Kamil Bozek
3d71b9a2f6
ledger-api-bench-tool - do not require using ledgers with UserManagementService implemented [DPP-846] (#12957)
* Do not require Ledgers to implement UserManagementService when using with ledger-api-bench-tool.

CHANGELOG_BEGIN
CHANGELOG_END

* Minor refactor

* Improve comments and code structure for the regular user setup step

* Fix the completions authorization assertion
2022-02-16 15:01:44 +00:00
tudor-da
4e0cb1080e
Add index DB backend to Sandboxes startup message (#12967)
changelog_begin
changelog_end
2022-02-16 13:34:15 +00:00
pbatko-da
b3f8fad987
[User management] Better ListUsers tests and general way to clean up new users [DPP-831] [DPP-889] (#12790)
changelog_begin
changelog_end
2022-02-16 13:23:55 +01:00
Remy
380dfa3502
LF: Add cause to internal error (#12965)
When an internal error is due to an unexpected exception, we wrap the
exception into the InternalError.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-16 11:06:10 +00:00
mziolekda
f645641acf
Bump ledger api version to 2.0 (#12956)
CHANGELOG_BEGIN
Ledger API version 2.0
CHANGELOG_END
2022-02-16 11:55:49 +01:00
Moritz Kiefer
4c0118df4d
Switch to Bazel 5 (#12935)
* Switch to Bazel 5

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2022-02-16 10:47:05 +00:00