# Ledger Model documentation improvements

**URL:** <https://forum.canton.network/t/ledger-model-documentation-improvements/828>\
**Category:** App Development\
**Tags:** features and bugs\
**Created:** [July 13, 2020, 4:43am UTC](https://forum.canton.network/t/ledger-model-documentation-improvements/828 "2020-07-13T04:43:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axman6-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/axman6-da/32/531_2.png) [@Axman6-da](https://forum.canton.network/u/Axman6-da)\
**Post date:** [July 13, 2020, 4:43am UTC](https://forum.canton.network/t/ledger-model-documentation-improvements/828/1 "2020-07-13T04:43:06Z")

</div>

I’m having a read through the ledger model docs (Structure - [Structure — Daml SDK 1.12.0 documentation](https://docs.daml.com/concepts/ledger-model/ledger-structure.html)), and noticed there’s some inconsistency in the diagrams. some of the diagrams add which choice is being exercised afterwards

**Exc** A (IOU Bank A) _“transfer”_

where some leave out _“transfer”_.

It would also be good in the diagrams to highlight which parts of the diagram makes them impermissible:

- That **Exc** A (IOU Bank A) has its _transfer_ choice exercised twice (circle the two exercises)
- Alice not including the transfer (circle the missing transfer, possibly greyed out? not sure of the best way to represent this visually)
- A requested the PaintOffer with P’s content (highlight A requested and P on the contract)
- P requested the transfer of A’s IOU without consent (highlight P requested and A on the contract)
- The NoSuchKey example seems clear enough, but it’s not clear how P might be able to prevent the key from existing if it does.
- The same reference number is used twice (highlight the reference numbers in both)

---

<div class="post-metadata">

**Author:** ![Axman6-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/axman6-da/32/531_2.png) [@Axman6-da](https://forum.canton.network/u/Axman6-da)\
**Post date:** [July 13, 2020, 6:51am UTC](https://forum.canton.network/t/ledger-model-documentation-improvements/828/2 "2020-07-13T06:51:36Z")

</div>

Another change that would help those reading on small screens, if at the end of each section a link to the next section could be added that’d make navigation much easier.

---

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [July 13, 2020, 7:14am UTC](https://forum.canton.network/t/ledger-model-documentation-improvements/828/3 "2020-07-13T07:14:57Z")

</div>

Thanks for all those suggestions @Axman6-da. I agree with all of them for readability and have created GitHub issues [#6700](https://github.com/digital-asset/daml/issues/6700) and [#6701](https://github.com/digital-asset/daml/issues/6701) to track them.

For interest, note that the definition of an `Exercise` node in the Ledger Model has no “tag” that would identify it as a “transfer”:

```haskell
Action ::= 'Create' contract
                 | 'Exercise' party* contract Kind Transaction
                 | 'Fetch' party* contract
                 | 'NoSuchKey' key
Transaction ::= Action*
Kind ::= 'Consuming' | 'NonConsuming'

```

The Ledger Model merely says that there is a “Contract Model” which determines the “conformant” transactions. In practice, that Contract Model is specified through DAML, which uses the arguments to an `Exercise` to “tag” the node with its type, like `Transfer`. So on the one hand I understand why the authors did what they did on that page, but on the other hand I think that consistently tagging the nodes with names would aid readability quite a bit.

---

<div class="post-metadata">

**Author:** ![oggy](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/oggy/32/109_2.png) [@oggy](https://forum.canton.network/u/oggy)\
**Post date:** [July 14, 2020, 10:05am UTC](https://forum.canton.network/t/ledger-model-documentation-improvements/828/4 "2020-07-14T10:05:24Z")

</div>

Agreed, this is not the first time that we get the comment that the lack of tags on actions (even though they are not really important for the semantics) makes it less readable.

> [@Axman6-da](#):
>
> That **Exc** A (IOU Bank A) has its _transfer_ choice exercised twice (circle the two exercises)

Any two consuming exercises on the IOU would make the example impermissible, not just two transfers. I suspect you’re aware of this, but I just wanted to clarify it for the benefit of other readers.
