daml/daml-lf/transaction-test-lib
Moritz Kiefer 66284c17f2
Limit length of package ids to 64 characters (#10368)
* Limit length of package ids to 64 characters

In practice, you cannot use a package id that is not a valid sha256
outside of a test anyway since we validate them. However, we didn’t
enforce it at the daml-lf level which is a bit annoying.

This PR fixes this and adds a length restriction of 64
characters (i.e. 256 bytes for sha256).

We could go a bit further and also restrict the characters to valid
sha256 hashes (i.e. 64 character hex strings). I don’t feel all that
strongly about that either way. We use other characters in tests but
fixing that shouldn’t be particularly hard either. The extra
characters don’t seem to cause problem so far, so I think it’s fine to
keep that.

No changelog entry since I don’t see how a user can be affected by this.

changelog_begin
changelog_end

* Update daml-lf/encoder/src/main/scala/com/digitalasset/daml/lf/archive/testing/DamlLfEncoder.scala
2021-07-22 10:50:11 +00:00
..
src/main/scala/lf Limit length of package ids to 64 characters (#10368) 2021-07-22 10:50:11 +00:00
BUILD.bazel Port //daml-lf/(transaction|language) to Scala 2.13 (#8343) 2021-01-04 10:54:38 +01:00