Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: add timestamp to SCB #9149

Open
starius opened this issue Oct 2, 2024 · 0 comments
Open

[feature]: add timestamp to SCB #9149

starius opened this issue Oct 2, 2024 · 0 comments
Labels
enhancement Improvements to existing features / behaviour SCB Related to static channel backup

Comments

@starius
Copy link
Collaborator

starius commented Oct 2, 2024

Is your feature request related to a problem? Please describe.

This is a followup for PR #8183 "chanbackup, server, rpcserver: put close unsigned tx, remote signature and commit height to SCB" (see comment).

A timestamp in SCB file would be useful to make it more tangible for a user whether the commit_tx included into SCB is outdated or not.

Describe the solution you'd like

A backward-compatible change adding the current timestamp into chanbackup.Single type and its encoding.

chantools scbforceclose command would parse the timestamp and include it into the message it prints to the user, along with time passed since the timestamp. It would it easier to judge about backup freshness using this data.

Describe alternatives you've considered

We can put channel last-update timestamp, but it is harder to get from channeldb. Also the benefit is not clear: we are interest in the latest timestamp at which this data was still correct (i.e. no channel updates since that time).

Additional context

Unguarded use of chantools scbforceclose may result in funds loss if applied to an outdated backup. This is a last resort measure in case any other ways of recovering funds failed, including DLP protocol. We want to minimize chances of using this feature on an outdated backup file. Adding a timestamp could save funds in case the timestamp is known to be older than some channel updates.

@starius starius added enhancement Improvements to existing features / behaviour SCB Related to static channel backup labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features / behaviour SCB Related to static channel backup
Projects
None yet
Development

No branches or pull requests

1 participant