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

Engine: Centralize the place where value version is inferred. #6229

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

remyhaemmerle-da
Copy link
Collaborator

We move inference of value versions in a single place (when finalizing the PartialTransacion)
In an upcoming PR, we will infer the transaction version in the same place.

This PR advances the state of #5164

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.

@remyhaemmerle-da remyhaemmerle-da added the component/daml-engine DAML-LF Engine & Interpreter label Jun 4, 2020
@remyhaemmerle-da remyhaemmerle-da added this to the Maintenance milestone Jun 4, 2020
@remyhaemmerle-da remyhaemmerle-da force-pushed the remy-control-lf-versions-2 branch from 12149c1 to a922214 Compare June 4, 2020 17:17
@@ -28,7 +28,7 @@ final class Conversions(
// We need the mapping for converting error message so we manually add it here.
private val ptxCoidToNodeId = machine.ptx.nodes
.collect {
case (nodeId, node: N.NodeCreate.WithTxValue[V.ContractId]) =>
case (nodeId, node @ N.NodeCreate(_, _, _, _, _, _)) =>
Copy link
Contributor

@S11001001 S11001001 Jun 4, 2020

Choose a reason for hiding this comment

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

(Follows up #206, #643.) Perhaps the definition of Transaction.Value should change, instead? Or,

Suggested change
case (nodeId, node @ N.NodeCreate(_, _, _, _, _, _)) =>
case (nodeId, node: N.NodeCreate[V.ContractId, _]) =>

Copy link
Collaborator Author

@remyhaemmerle-da remyhaemmerle-da Jun 5, 2020

Choose a reason for hiding this comment

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

In the current state we should have to add a PartialTransaction.Value1 and some WithPartialTransactionValue` types.
I will see later if it is worthwhile to add it.

Comment on lines +482 to +484
def convertKeyWithMaintainers[Val](
convertValue: Val => Value,
key: N.KeyWithMaintainers[Val],
Copy link
Contributor

Choose a reason for hiding this comment

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

More like coYonedanvertKeyWithMaintainers? :trollface:

remyhaemmerle-da and others added 2 commits June 5, 2020 09:23
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
@remyhaemmerle-da remyhaemmerle-da force-pushed the remy-control-lf-versions-2 branch from debcd48 to a9f6ec1 Compare June 5, 2020 07:52
@remyhaemmerle-da remyhaemmerle-da merged commit 5e9490f into master Jun 5, 2020
@remyhaemmerle-da remyhaemmerle-da deleted the remy-control-lf-versions-2 branch June 5, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/daml-engine DAML-LF Engine & Interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants