What is the meaning and difference of the time field in the canton log

What is the meaning and difference of the time field in the canton log

Hi @skylorna

Thank you for the question.

Record_Time (rt_TX) and Ledger_Time (lt_TX) are two Timestamps that get assigned to every transaction on a Ledger.

These two timestamps are based on the function getTime that is used as a basis for Time management, which is very important and non-trivial on a distributed ledger system.

Ledger time (lt_TX) is assigned by the relevant submitting participant as part of the command submission service, and provides a microsecond resolution. It is the participant’s best guess of what the current system time is.

Record time (rt_TX) is assigned by the Ledger when that particular transaction is recorded on the Ledger, and it too provides a microsecond resolution. It is the Ledger’s best guess of what the current system time is.

Ideally the gap between the Ledger Time and Record Time should be operationally very small, and can be defined by specific limits titled skew_min and skew_max.

The Ledger Time and Record Time are unlikely ever to be exactly the same as there will always be a small amount of transaction latency, which is the average duration from the time a transaction is submitted from a participant to the ledger until the transaction is recorded.

Generally the specifics of Time will be handled successfully and quietly by Canton & the Ledger, and you should not need to be involved in this, unless there is a specific need. Also your Daml application will not be overly concerned with the Ledger & Record Time either.

Visit Time, to learn more about Ledger & Record Time.

If you have further questions, feel free to post them.

3 Likes

thank you very much