daml/daml-lf/scenario-interpreter/src
Remy 5468e4d160
DAML-LF: Simplify inference of output transaction/value version. (#6756)
* LF: Simplify inference of output transaction/value version.

As part of #5164, we simplify the way transaction and value versions
are inferred for the engine output.

The versioning of a transaction tr is done as follow:

* Let tvMin be the minimal transaction version allowed by the DAML
  engine configuration
* Let tvMax be the maximal transaction version allowed by the DAML
  engine configuration
* Let n₁, ..., nₘ be the nodes of tr.
* Let pkgᵢ be the package of the template associated to the node nᵢ
* Let lvᵢ be the maximal language version that pkgᵢ uses (directly or
  through its dependencies)
* let tvᵢ be the maximal transaction version supported by all engines
  that support both lvᵢ and tvMin
* Let vvᵢ be the maximal value version supported by all engines that
  support tvᵢ.
* Let tv be the maximal transaction version between tv₁, ..., tvₘ.
* If tv is not greater than tvMax
  + then
    - Version the values of each node nᵢ according vvᵢ
    - Version tr according tv
  + fail otherwise

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-21 17:07:11 +02:00
..
main/scala/com/digitalasset/daml/lf/speedy DAML-LF: Simplify inference of output transaction/value version. (#6756) 2020-07-21 17:07:11 +02:00
perf DAML-LF: Simplify inference of output transaction/value version. (#6756) 2020-07-21 17:07:11 +02:00
test/scala/com/digitalasset/daml/lf/speedy DAML-LF: Simplify inference of output transaction/value version. (#6756) 2020-07-21 17:07:11 +02:00