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
multi: bitcoind rpc polling option #6345
multi: bitcoind rpc polling option #6345
Conversation
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.
Very cool to see all unit and integration tests being green with this new "backend" type 🎉
LGTM pending a few nits and the merge of the dependent PR.
f52a0a3
to
3e0d297
Compare
updated both PRs 👍 |
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.
Very nice 🎉
@carlaKC: review reminder |
routing/chainview/interface_test.go
Outdated
} | ||
|
||
// Wait for the bitcoind instance to start up. | ||
time.Sleep(time.Second) |
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.
Can we tighten this check up here with something like a wait.Predicate
? Otherwise I fear this'll end up flaking a lot on CI.
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 havent yet been able to figure out how to completely get rid of the time.Sleep
even when adding the wait.NoError
. Seems like needs to happen between starting bitcoind and calling calling Start
on the chainView. This seems to be the case for the ZMQ connection too (in multiple places in the code base) so is not specific to this PR so wondering if i can add a todo for now?
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.
What about instead doing a mini poll here until we get a valid response from the bitcoind connection?
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.
yeah i did try this before but it consistently flakes on my machine.
I pushed up the patch to demonstrate the flake now but I see it does not happen on github. So it might be a MacOS thing or something specific to my machine or my bitcoind installation...
@Roasbeef , could you try run this test on your machine to see if it flakes?
791907e
to
3ab29c3
Compare
erg, must have broken something today while updating. Will find and fix tomorrow |
5d626ef
to
a820c9a
Compare
aeeeca9
to
537086a
Compare
I'm assuming this isn't ready for a re-review? |
eca4dad
to
bf356ac
Compare
it is but there are 2 comments from the review that i have not been able to address. Have left comments on those 2 points. |
1bdab1a
to
771d5c4
Compare
Needs a rebase! |
I get this segfault when I try to run the tests on my machine:
|
AFAICT, this happens because the response is nil at that point, and I think the backoff has fully expired. This happens for all the bitcoind tests (not just this new one). Tried to see if btcsuite/btcd#1856 helped, but didn't see to do anything. Perhaps |
AFAICT, when I ran it locally, |
So turns out my I realized that though we check that error output, the process can still fail to start. So we can do another check to make sure |
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.
LGTM 💰
Update go.mod to point to latest btcwallet version.
Make the Bitcoind ZMQReadDeadline option configurable.
Add a new chainview interface test that runds the chainview tests against a bitcoind node that we are getting block and tx notifications from using the rpc interface.
771d5c4
to
a4bd389
Compare
replaces #6117
Depends on btcsuite/btcwallet#795
Thanks to @orbitalturtle for the original lnd and btcwallet PRs 🚀
Note, this PR also adds a new itest backend.