Skip to content

Commit

Permalink
PLT-4169 Fixed correspondence between semantics and validator.
Browse files Browse the repository at this point in the history
This addresses the audit comment:

> File marlowe-cardano-specification.md, Section Relationship
> between Marlowe Validator and Semantics The specification
> mentions the output datum as the (fifth) argument for the
> computeTransaction function, while it is not an argument to it.
  • Loading branch information
bwbush committed Mar 15, 2023
1 parent 87cf548 commit 00a0c24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion marlowe/specification/marlowe-cardano-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ The arguments of `computeTransaction` must be constructed as follows:
2. The `txInputs` of `TransactionInput` is derived from the `MarloweInput` provided as the `Redeemer` and the `txInfoData . scriptContextTxInfo` of the `ScriptContext`, as detailed below.
3. The `State` is the `marloweState` of the `MarloweData` provided as the `Datum`.
4. The `Contract` is the `marloweContract` of the `MarloweData` provided as the `Datum`.
5. The new `Datum` at the script address is the `MarloweData` with the same `marloweParams` as originally, but with the new `txOutState` and `txOutContract` of the `TransactionOutput`.

Additionally, the new `Datum` at the script address is the `MarloweData` with the same `marloweParams` as originally, but with the new `txOutState` and `txOutContract` of the `TransactionOutput`.

In the diagram below, the upper three rectangles represent functions: the untyped `Validator`, the typed validator `marloweValidator`, or the semantics's `computeTransaction`. The data values (ovals) are marshalled or passed from the untyped representation over to the semantics. The `computeTransaction` function validates the semantics and returns the required new state and contract instance. Conceptually, success or failure is passed to the untyped validator. The bottom rectangle packages the `Datum` that is provided as output for the continued progression of the Marlowe contract instance.

Expand Down

0 comments on commit 00a0c24

Please sign in to comment.