-
Notifications
You must be signed in to change notification settings - Fork 25
Fix restart after alternative feerate remote commit #847
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
Conversation
When our peer broadcasts a commit tx that uses an alternative feerate, we failed to republish our main transaction because of a useless `require()` in the corresponding function. We remove this `require`, since it shouldn't prevent us from claiming our main output. Note that this can only happen for anchor outputs channels, since we stopped sending signatures for alternative feerates in the latest release.
| else -> logger.error(t) { "error on command ${cmd::class.simpleName}" } | ||
| is ChannelCommand.MessageReceived -> logger.error(t) { "error on message ${cmd.message::class.simpleName}: ${t.message}" } | ||
| is ChannelCommand.WatchReceived -> logger.error { "error on watch event ${cmd.watch::class.simpleName}: ${t.message}" } | ||
| else -> logger.error(t) { "error on command ${cmd::class.simpleName}: ${t.message}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm re-adding the exception message directly here because it looks like our logger is swallowing the exception, and thus missing useful data during debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean in our tests? Or in phoenix app logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Phoenix logs: I'm seeing error on command Restore without details about the exception. The exception is correctly printed in test logs though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug is in phoenix iOS, the throwable is dropped here: https://github.com/ACINQ/phoenix/blob/5061fd25f45360aa71d232e5b7ae4e6c424eb94d/phoenix-shared/src/iosMain/kotlin/fr/acinq/phoenix/utils/PassthruLogWriter.kt#L15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember old discussions about logs containing exceptions being too large, which created issues...isn't that why it was explicitly dropped? Maybe @dpad85 or @robbiehanson remembers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acking the PR in the meantime as this is a separate issue.
When our peer broadcasts a commit tx that uses an alternative feerate, we failed to republish our main transaction because of a useless
require()in the corresponding function. We remove thisrequire, since it shouldn't prevent us from claiming our main output.Note that this can only happen for anchor outputs channels, since we stopped sending signatures for alternative feerates in the latest release.