-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
GitHub: use bitcoind v26.0 for CI #8273
Conversation
586e50c
to
1c70744
Compare
Okay, so the failed unit tests were due to a number of reasons:
I added a couple of commits to address these issues. |
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.
Thanks for the cleanup! No major comments, just need to merge the dependent PR first. And the unit tests need to be fixed.
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 🎨
488202b
to
57aca62
Compare
Unit tests still failing. One of the itest failures has uncleaned shutdown that still occupying a port, werid
|
Yeah, it seems like I have to do some more digging into failures. |
scripts/install_bitcoind.sh
Outdated
@@ -2,9 +2,9 @@ | |||
|
|||
set -ev | |||
|
|||
BITCOIND_VERSION=${BITCOIN_VERSION:-25.0} | |||
BITCOIND_VERSION=${BITCOIN_VERSION:-25} |
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 think we should use one place to manage the version, to avoid mistakes such as 994a142
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.
Maybe this is a dumb question but why isn't this number 26?
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.
This is just the fallback version in case no environment variable is set. We set the version we actually want here: https://github.com/lightningnetwork/lnd/blob/ff3e8da1756572b0dd979a39b139a969498772dd/.github/workflows/main.yml#L24
But I guess we shouldn't do that to avoid confusion...
Important Auto Review SkippedAuto reviews are limited to the following labels: llm-review. Please add one of these labels to enable auto reviews. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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 pulled this down and tested it and it looks like everything passes except a wtclient test (possibly a flake?). It doesn't seem related to this as best I can tell. I think that test will pass if you rebase this.
scripts/install_bitcoind.sh
Outdated
@@ -2,9 +2,9 @@ | |||
|
|||
set -ev | |||
|
|||
BITCOIND_VERSION=${BITCOIN_VERSION:-25.0} | |||
BITCOIND_VERSION=${BITCOIN_VERSION:-25} |
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.
Maybe this is a dumb question but why isn't this number 26?
@Roasbeef can you see the logs of the failed Travis build? |
To make it less confusing what version of bitcoind is actually installed, we now require the version to be specified as a command line argument. Because we tag the version in the docker image tag as bitcoin-core:XX but the binary internally is located under /opt/bitcoin-XX.Y/, we manually set Y to 0.
With this commit we create a new function that returns system wide unique ports by using a single file to keep track of previously used ports. We'll want to use this everywhere whenever we need to listen on a new, random port during unit or integration tests. Because we now have a unique source, we don't need to apply the port offset that was used for the different tranches of parallel running integration tests before.
Make sure we wait for the initial connection long enough.
This commit fixes a number of issues with our temporary bitcoind nodes that we spin up for unit tests: - We didn't remove the node's temporary data dir after tests finished. - We used random ports which lead to unwanted port collisions. - We used ipc:// unix sockets for ZMQ which currently isn't supported in bitcoind v26.0 due to a regression. Since we can reliably create new non-colliding ports now, we should use TCP for ZMQ anyway.
With the chainntnfs.NewMiner now being optimized for not creating nodes with colliding ports, we use it in all unit tests that spin up temporary miners.
To avoid circular dependency issues between packages, we move the unit test backend creation function to a new package in the lntest parent package.
Since we fixed a number of issues in chainntnfs.NewBitcoindBackend that makes it compatible with bitcoind v26.0, we now want to use that function in all our unit tests.
To make it easy to add "-test.v" and "-test.count=1" to the unit tests, we add two new make flags.
This is a commit to attempt to fix Travis which runs on ARM64.
Because we pass in the same config into multiple notifiers, we sometimes get a data race in the unit tests. By creating a copy of the config we avoid that.
Okay, this is as green as it will probably ever get. There are still a couple of (pre-existing!) flakes in there. But I vote to get this merged since they very likely don't have anything to do with |
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, thanks for the fix🙏
btw can we update our merge rules to exclude the build from macOS? |
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.
🤝
It's currently not included in the list of required tests. So merges shouldn't be blocked on it (same for Windows). |
FWIW bitcoin/bitcoin#27679 is updated, has two ACKs already, and a review from an LND dev would be helpful to get a merge ;-) |
Depends on #8555.
Change Description
See if things break in the CI if we update to
bitcoind v26.0
.