Skip to content

Fix several more monitor-update-failed cases #288

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

Based on #284 and #286, this splits up functional_tests into functional_test_utils, functional_tests, and chanmon_update_fail_tests. It then fixes one more (really subtle) case found by the new fuzzer I've been working on and adds some big log_trace output to buid_commitment_transaction.

@TheBlueMatt TheBlueMatt force-pushed the 2019-01-test-split-raa-flag-fix branch from 5e2f689 to e9434de Compare January 13, 2019 18:57
@TheBlueMatt
Copy link
Collaborator Author

Rebased after #284 merge.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bunch of nits


// Queue up two payments - one will be delivered right away, one immediately goes into the
// holding cell as nodes[0] is AwaitingRAA. Ultimately this allows us to deliver an RAA
// immediately after a CS, meaning we deliver an RAA while the channel is in the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm not super clear, "deliver an RAA from nodes[0] while the channel is in the monitor-update-failed on nodes[1] side which requires a CS response from this one to commit 2nd payment"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrote it, is it more clear now?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, no. I mean I got it by reading the code, not with comment alone. Generally I find comments helpful when they precise at each message sender/receiver, so you get the whole interaction before to read code and then check if it match description. But don't care if you don't fix it go ahead to land monitor stuff

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool I rewrote it and added comments for each step. Hopefully that helps.

Copy link
Collaborator Author

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I'm moving the log entry additions to a later PR, but I did fix them so the changes will be reflected in that future PR. Also rebased on other PRs that will want to land first (as this is a file rename I'll wait a bit until we land some of the in-flight test PRs first, hopefully) and added another fix commit (probably one or two more coming).


// Queue up two payments - one will be delivered right away, one immediately goes into the
// holding cell as nodes[0] is AwaitingRAA. Ultimately this allows us to deliver an RAA
// immediately after a CS, meaning we deliver an RAA while the channel is in the
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrote it, is it more clear now?

@TheBlueMatt TheBlueMatt force-pushed the 2019-01-test-split-raa-flag-fix branch from e9434de to f99dc05 Compare January 21, 2019 17:31
@TheBlueMatt TheBlueMatt changed the title Split up functional_tests a bit and fix one more monitor-update-failed case Split up functional_tests a bit and fix several more monitor-update-failed cases Jan 21, 2019
@TheBlueMatt TheBlueMatt force-pushed the 2019-01-test-split-raa-flag-fix branch 2 times, most recently from 8e065a1 to aec76b1 Compare January 21, 2019 19:26
@TheBlueMatt TheBlueMatt added this to the 0.0.8 milestone Jan 21, 2019
@TheBlueMatt TheBlueMatt force-pushed the 2019-01-test-split-raa-flag-fix branch 3 times, most recently from ac1508f to 1348fa2 Compare January 22, 2019 20:28
This fixes a rather subtle case handling RAAs when we don't
generate a response due to a previous monitor update failure, but
would otherwise send a CS response. We need to still set
AwaitingRemoteRevoke on the channl in question, but previously did
not. Found by chanmon_fail_consistency fuzz test with the failing
test converted and added manually.
@TheBlueMatt TheBlueMatt force-pushed the 2019-01-test-split-raa-flag-fix branch from 1348fa2 to 7dcd15e Compare January 23, 2019 22:44
@TheBlueMatt TheBlueMatt changed the title Split up functional_tests a bit and fix several more monitor-update-failed cases Fix several more monitor-update-failed cases Jan 23, 2019
@TheBlueMatt TheBlueMatt force-pushed the 2019-01-test-split-raa-flag-fix branch from 7dcd15e to 658e558 Compare January 23, 2019 22:52
@TheBlueMatt
Copy link
Collaborator Author

Gonna go ahead and take this since the first round of review was only nits.

@TheBlueMatt TheBlueMatt merged commit a6f0281 into lightningdevkit:master Jan 24, 2019
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.

2 participants