How is time managed in a Canton setup

Say that a participant is issuing a transaction (e.g. a choice exercise) which is somehow time-dependent (e.g. “assert current time <= T”). In my understanding the participant will compute / assemble the transaction (and the views for any other participant counter-party) using its ledger time and then send it to the domain. Will the sequencer use the original ledger time of the submitting participant when dispatching the views - i.e. what “current time” will each recipient use to compute its own response? Is there a notion of “domain time” in Canton or it is up to each submitting participant to pick a “reasonable” timestamp, and for all other entities to simply verify that it fits within a suitable window? Can a domain ever end up sequencing two distinct transactions with ledger times that are not monotonically increasing? Thanks!

Dear @davide_ooz ,
Thanks for your question. All the (counter-)participants will use the same time to validate the transaction and this shared time will be the ledgerTime shipped by the submitting participant (see here).

The participants also see time progressing when they receive messages from the sequencer: each message sent by the sequencer has a timestamp associated, which is monotonically increasing.

Note that these two times (ledgerTime and sequencerTime) are often unrelated: you can indeed have two sequenced transactions on the domain with decreasing ledgerTime. In some cases (e.g., create and archival of a given contract), then the causality guarantees will prevent that.

I hope this helps.

Best,

Rafael