Skip to content
LearnBitcoin

ResearchBitcoin Dev Archive lightning-dev list

Section 7 Query: Timestamps & Pruning

1 message, Dec 4, 2017. Started by Rusty Russell.

Rusty Russell

Permalink First message in the Wayback Machine

Rusty Russell permalink original

Shannon Appelcline <shannona at skotos.net> writes:

Quoted text (8 lines)
> Section 7 says "nodes MAY prune channels should the timestamp of the
> latest `channel_update` be older than 2 weeks (1209600 seconds)"
>
> Yet timestamps are only required to be sequential, not an actual
> timestamp ("The creating node MUST set `timestamp` to be greater than
> that for any previous `node_announcement` it has created. It MAY base it
> on a UNIX timestamp.", so there's no way to know the age of a timestamp,
> at least not by looking at the timestamp.

(lightning-dev CC'd)

Indeed. The original timestamp field was left undefined, but this addition implies it has to be epoch time.

I prefer it to say "MAY prune channels which have not had a new `channel_update` for 2 weeks or more", but that implies that implementations must keep their own internal timestamp of when they see the update.

But we should fix it one way or another; I've opened a bug:

https://github.com/lightningnetwork/lightning-rfc/issues/302

Thanks, Rusty.