You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that I found in the ldk-node test that it takes about 300 seconds to send and receive payment for 20 rounds, which I think is too long. I found that there is a waiting time of about 2 seconds for each message sent. I found that the persistence of chainmoniter takes an average of 1.5 seconds each time, and the length after serialization (len(vec)) is about 54000. The relevant persistence code is often executed, so is there any possibility of optimization here?
The text was updated successfully, but these errors were encountered:
So Lightning in general is IO-bound as we need to make sure all the updates to ChanelMonitor are persisted before being able to move on with certain operations.
I found that the persistence of chainmoniter takes an average of 1.5 seconds each time
This is indeed really long. I haven't seen similar numbers yet, so I'd love to learn more about your scenario and how many channels you're operating (note that it's the ChannelMonitors, not ChainMonitor that is persisted). Feel free to reach out on LDK Discord or open a new issue on the LDK Node repository to discuss/debug these numbers in particular.
That said:
so is there any possibility of optimization here?
Yes there are possibilities. Here in LDK/rust-lightning we're working towards improving on how often we persist monitors when it's not not strictly required. Moreover, LDK introduced the MonitorUpdatingPersister which allows to only persist delta's instead of whole monitors every time we make an update. While planned, we simply haven't gotten around to make use of it in LDK Node yet. I now opened an issue for over there though: lightningdevkit/ldk-node#441
Closing this issue as the question mainly relates to LDK Node.
The reason is that I found in the ldk-node test that it takes about 300 seconds to send and receive payment for 20 rounds, which I think is too long. I found that there is a waiting time of about 2 seconds for each message sent. I found that the persistence of chainmoniter takes an average of 1.5 seconds each time, and the length after serialization (len(vec)) is about 54000. The relevant persistence code is often executed, so is there any possibility of optimization here?
The text was updated successfully, but these errors were encountered: