View Issue Details

IDProjectCategoryView StatusLast Update
0006562Talerwallet-corepublic2025-04-17 21:21
ReporterFlorian Dold Assigned ToResolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Target Versionpost-2.0 
Summary0006562: should wallet-core handle major system clock changes gracefully?
DescriptionThe wallet should of course handle "going to sleep" for any amount of time gracefully.

But what about something like the system time going from 2020->2022->2020? I.e. not just going forward, but also back in (system-)time. This might cause certain timeouts in the database (e.g. for re-fetching /keys or doing auto-refresh) to be way to far in the future.

Do we expect the wallet to handle this? And if so, what's the best approach?

(a) If any timestamp is *way* to far into the future, we automatically assume it's wrong and set it to "now()" in the database. The difficulty is" What's considered "too far in the future"? It might still break auto-refresh.
(b) Instead of storing timestamps to point at an instant in the future, we store a "base" timestamp set to "now()" and a delta. If we ever encounter a base timestamp that is in the future, we assume the system time went backwards, and we need to reset this timestamp.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-09-03 14:52

manager   ~0016820

Reading the subject, I was immediately thinking of (b). One issue with that is that we would have to update deltas whenever the base timestamp changes. A *better* solution:
- store absolute times per operation for when retries are needed as we do now
- additionally, store the "current time" (aka "last online").
If current time unexpectedly goes backwards, correct trigger-timestamps of pending operations by the negative delta.

Florian Dold

2020-09-03 15:13

manager   ~0016821

Makes sense, assigning back to myself to (eventually!) implement this.

Issue History

Date ModifiedUsernameFieldChange
2020-09-03 14:30Florian DoldNew Issue
2020-09-03 14:30Florian DoldStatusnew => assigned
2020-09-03 14:30Florian DoldAssigned To => Christian Grothoff
2020-09-03 14:52Christian GrothoffNote Added: 0016820
2020-09-03 15:13Florian DoldAssigned ToChristian Grothoff => Florian Dold
2020-09-03 15:13Florian DoldNote Added: 0016821
2023-02-17 01:36Florian DoldTarget Version => 1.0
2023-04-13 18:36Florian DoldCategorywallet (TS core) => wallet-core
2023-12-22 13:22Christian GrothoffTarget Version1.0 => post-1.0
2024-08-12 08:12Christian GrothoffTarget Versionpost-1.0 => post-2.0
2025-04-17 21:21Christian GrothoffAssigned ToFlorian Dold =>
2025-04-17 21:21Christian GrothoffStatusassigned => acknowledged