Reliability of getTime Function with Untrusted Participants in Daml

Hello,
After reading the Time on Daml ledgers documentation, I have some doubts regarding the reliability of the output from the getTime function due to the algorithm used to assign ledger time.

I need to retrieve the current date daily to verify whether a payment should be processed. If I use the getTime function in a choice called by an untrusted participant, how reliable would the result be? For instance, if the participant attempts to manipulate the time by setting their local clock to one day ahead of the actual date, would the system detect this discrepancy?

Thank you.

Each Canton transaction has two times on it:

  1. The Ledger Effective Time set by the submitting participant
  2. The Record Time set by the sequencer that orders the transaction

The sync domain has time skew parameters that determine how far apart these times can be. The default is 30s.

So the time is reliable unless the submitting participant and the sync domain collude.

2 Likes