Description
The two data structures that needed to be persisted within RL are ChannelMonitor
s 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:
-
We could have a similar
Persister
API, i.e.channelmanager::Persist
as the sister trait tochannelmonitor::Persist
(downside: for every e.g.update_channel
callsite, there needs to be anupdate_manager
call added too) -
We could just kick off
ChannelManager
persistence in the background in theFilesystemPersister
methods (i.e. asynchronously persist the CM onpersist_channel
andupdate_channel
) and document well that all implementers ofchannelmonitor::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)