Skip to content

ChannelManager persistence #743

Closed
@valentinewallace

Description

@valentinewallace

The two data structures that needed to be persisted within RL are ChannelMonitors and the ChannelManager. ChannelMonitor persistence was mostly done in #681, but automated ChannelManager persistence hasn't been touched yet.

Afaik the design of ChannelManager persistence isn't spelled out anywhere. I'm not sure what it would ideally look like, but wanted to put out 2 design ideas for critique:

  1. We could have a similar Persister API, i.e. channelmanager::Persist as the sister trait to channelmonitor::Persist (downside: for every e.g. update_channel callsite, there needs to be an update_manager call added too)

  2. We could just kick off ChannelManager persistence in the background in the FilesystemPersister methods (i.e. asynchronously persist the CM on persist_channel and update_channel) and document well that all implementers of channelmonitor::Persist are required to do so

This is all assuming that it's best if the ChannelManager is re-persisted on every update to a ChannelMonitor, which I think is the case but I haven't verified this myself yet.

relevant discussion: #681 (comment)

Metadata

Metadata

Assignees

No one assigned

    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