Skip to content

ChainMonitor Best Block Enfocement #987

Open
@TheBlueMatt

Description

@TheBlueMatt

The ChainMonitor is a bit naive when it comes to best block sync - it proxies new block connections through to the underlying ChannelMonitors, which requires that the ChannelMonitors should all be in-sync before we "start". That's fine, except that
(a) we should enforce that somehow - users shouldn't be able to use a ChainMonitor if the ChannelMonitor(s) are out of sync,
(b) there is a race between the creation of a new ChannelMonitor (which uses the ChannelManager's best block to start) and the addition of the ChannelMonitor to the ChainMonitor - the blocks could be out of sync. In practice this can't cause harm as long as the ChannelMonitor is in the ChainMonitor before the commitment transaction is broadcastable (which is required), but we need to forcibly update the best block to match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions