Skip to content

Better Docs/Exposed Events for current-state-behind-peer #685

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

Open
TheBlueMatt opened this issue Sep 9, 2020 · 0 comments
Open

Better Docs/Exposed Events for current-state-behind-peer #685

TheBlueMatt opened this issue Sep 9, 2020 · 0 comments

Comments

@TheBlueMatt
Copy link
Collaborator

When a peer gives us a channel_reestablish message that proves we're using an old state, we give an error message and hope they broadcast, then pass a ChannelMonitorUpdateStep::ChannelForceClosed to the monitor with should_broadcast set to false. This results in a somewhat-helpful error message logged (

"Channel {} need to be shutdown but closing transactions not broadcast due to We have fallen behind - we have received proof that if we broadcast remote is going to claim our funds - we can't do any automated broadcasting" followed by
"You have a toxic holder commitment transaction avaible in channel monitor, read comment in ChannelMonitor::get_latest_holder_commitment_txn to be informed of manual action to take")

but nothing further. get_latest_holder_commitment_txn's docs could probably describe the exact case a bit better, but we should also provide an Event that more programmatically alerts the user to what happened (probably also providing a general "channel closed" Event, which we currently do not do).

Lastly, because we call force_shutdown(false) from ChannelManager::process_pending_monitor_events() when we get a CommitmentTxBroadcasted event, we'll get the second log message above in the case that our counterparty went to chain, which is bogus.

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

No branches or pull requests

1 participant