Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ShortChannelID as string #197

Closed
wants to merge 5 commits into from

Conversation

matheusd
Copy link
Member

This adds the short channel id to the ListChannels() response in a string format. This is useful when debugging and searching logs and the int version is not useful for that.

This is rebased on top of #196

This adds tracking for how long a peer has been online, while NOT
reestasblishing a channel through the use of ChannelReestablish P2P
messages.

If a peer has been online for a long time without sending a
ChannelReestablish, this is a hint that perhaps their end of the channel
is borked and cannot be used anymore.  One situation where this occurs
is when the peer restores its node without use of an SCB file, in which
case the ChannelReestablish messages the local peer sends are ignored
and the remote peer does not reply with their own ChannelReestablish.
This exposes the recently introduced per-channel total channel
reestablish wait time through the ListChannels RPC interface.

This is a useful debug feature for users.
This adds automation for closing channels that haven't been
reestablished for some time using the recently introduced metric.

Channels with peers that have been online for some time but which have
NOT been reestablished though the use of ChannelReestablish messages are
good candidates for being force closed, because it is likely the remote
peer has lost the ability to use them.

Given that the metric tracks the total time across restarts and only
while the remote peer is online, we use a default of 72h for the
threshold to auto close the channel.  This should be a reasonable
compromise between not closing too fast on hubs (that are online 24/7)
and ephemeral nodes (that may be online only for an hour or two a day).

A config parameter is added to control the threshold time used for
autoclosing and an itest is added that asserts the correct behavior.
This adds the short channel id to the ListChannels() response in a
string format. This is useful when debugging and searching logs and the
int version is not useful for that.
@matheusd
Copy link
Member Author

Merged manually via 736bd76

@matheusd matheusd closed this Dec 12, 2023
@matheusd matheusd deleted the string-sid-listchannels branch December 12, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants