Skip to content

Swap announcement/update serials for block timestamp. #493

Closed

Description

@TheBlueMatt

We currently just send serials in update/announcement messages as a monotonically increasing number, but other implementations (incorrectly) assume that they are actually timestamps. We should just use the last block timestamp since thats easy to access.

Activity

  1. ariard commented on Feb 11, 2020

    @ariard

    Fix BOLT to align node_announcement timestamp encoding on the channel_update one ?

  2. TheBlueMatt commented on Feb 11, 2020

    @TheBlueMatt
    CollaboratorAuthor

    Are they currently treated differently in the BOLTs? IIRC they are both explicitly allowed to be anything that increases, but are called "timestamp"s and others treat them as timestamps (when they are not).

  3. ariard commented on Feb 12, 2020

    @ariard

    "MUST set timestamp to greater than 0, AND to greater than any previously-sent channel_update for this short_channel_id SHOULD base timestamp on a UNIX timestamp " (channel update)

    "MUST set timestamp to be greater than that of any previous node_announcement it has previously created MAY base it on a UNIX timestamp" (node announcement)

    So yes a divergence, but more broadly if everyone interpret them as UNIX timestamps it should be mandatory to avoid confusion. Or some kind of semantic like nLocktime to either unix or block height.

  4. TheBlueMatt commented on Feb 12, 2020

    @TheBlueMatt
    CollaboratorAuthor
  5. self-assigned this
    on Feb 25, 2020
  6. jkczyz commented on Mar 5, 2020

    @jkczyz
    Contributor

    Hmm, interesting. Either way we should get both removed from the spec and clarify that nothing should depend on timestamps being any more accurate than the latest block time (though I don’t know that it makes sense to allow anything as it does now, since efficient graph sync will likely rely on it).

    Is there an open issue for this in the spec?

  7. TheBlueMatt commented on Mar 6, 2020

    @TheBlueMatt
    CollaboratorAuthor

    Apparently there is not. I noted what needs to happen on lightning/bolts#584 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions