⚠️ Sjors opened an issue: "ci: how to run native arm job on Apple silicon?"
(https://github.com/bitcoin/bitcoin/issues/31344)
I'm trying to run the `arm64` worker job (ARM, unit tests, no functional tests) on my M4 mac, because that should be lot faster than emulating it in Qemu on my x86_64 machine.
Unfortunately so far it fails:
```
[10:34:36.739] Test project /ci_container_base/ci/scratch/build-arm-linux-gnueabihf
[10:34:36.742] Start 2: util_rpcauth_test
[10:34:36.744] Start 4: univalue_object_test
[10:34:36.747] Start 6: secp256k1_tests
[10:34:36.751] Start 8: tes
...
(https://github.com/bitcoin/bitcoin/issues/31344)
I'm trying to run the `arm64` worker job (ARM, unit tests, no functional tests) on my M4 mac, because that should be lot faster than emulating it in Qemu on my x86_64 machine.
Unfortunately so far it fails:
```
[10:34:36.739] Test project /ci_container_base/ci/scratch/build-arm-linux-gnueabihf
[10:34:36.742] Start 2: util_rpcauth_test
[10:34:36.744] Start 4: univalue_object_test
[10:34:36.747] Start 6: secp256k1_tests
[10:34:36.751] Start 8: tes
...
💬 maflcko commented on pull request "ci: Skip broken Wine64 tests by default":
(https://github.com/bitcoin/bitcoin/pull/31284#issuecomment-2493503739)
> the cross-compiled `test_bitcoin.exe` is part of release bundle for Windows. And leaving the repo without a CI job to run it seems like a drawback.
How is this different from the whole macos-cross release, or even the real binary `bitcoind.exe`, which is never tested? Moreover, if you think that running the windows unit tests on Wine is useful, it would be good to give at least one example where it caught an issue that was found by none of the other tasks. (For example, they can't even dete
...
(https://github.com/bitcoin/bitcoin/pull/31284#issuecomment-2493503739)
> the cross-compiled `test_bitcoin.exe` is part of release bundle for Windows. And leaving the repo without a CI job to run it seems like a drawback.
How is this different from the whole macos-cross release, or even the real binary `bitcoind.exe`, which is never tested? Moreover, if you think that running the windows unit tests on Wine is useful, it would be good to give at least one example where it caught an issue that was found by none of the other tasks. (For example, they can't even dete
...
👍 laanwj approved a pull request: "wallet: Remove IsMine from migration code"
(https://github.com/bitcoin/bitcoin/pull/30328#pullrequestreview-2451750295)
Must admit that i'm not versed enough in the subtle specifics with regard to validity and spendability of scripts, to be sure all of this is correct. But where i've checked, the behavior matches the IsMine-based implementation. Overall changes LGTM.
(https://github.com/bitcoin/bitcoin/pull/30328#pullrequestreview-2451750295)
Must admit that i'm not versed enough in the subtle specifics with regard to validity and spendability of scripts, to be sure all of this is correct. But where i've checked, the behavior matches the IsMine-based implementation. Overall changes LGTM.
💬 laanwj commented on pull request "wallet: Remove IsMine from migration code":
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1852300265)
comment: -there
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1852300265)
comment: -there
💬 laanwj commented on pull request "wallet: Remove IsMine from migration code":
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1852336507)
Maybe add an assertion on `solutions.size() >= 2`,as an internal check against future bugs in Solve (and maybe also in other places before the solutions vector is indexed).
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1852336507)
Maybe add an assertion on `solutions.size() >= 2`,as an internal check against future bugs in Solve (and maybe also in other places before the solutions vector is indexed).
💬 laanwj commented on pull request "wallet: Remove IsMine from migration code":
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1853733972)
Doing both inserting into and reading from spks here makes it somewhat harder to be confident that the behavior is independent from the specific order of processing mapScripts, but the comment above helps.
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1853733972)
Doing both inserting into and reading from spks here makes it somewhat harder to be confident that the behavior is independent from the specific order of processing mapScripts, but the comment above helps.
💬 laanwj commented on pull request "wallet: Remove IsMine from migration code":
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1853729309)
comment: in "spks"
(https://github.com/bitcoin/bitcoin/pull/30328#discussion_r1853729309)
comment: in "spks"
💬 fanquake commented on pull request "guix: swap `moreutils` for just `sponge`":
(https://github.com/bitcoin/bitcoin/pull/31323#discussion_r1853761691)
Bash is implied/available, so we are able to drop this.
(https://github.com/bitcoin/bitcoin/pull/31323#discussion_r1853761691)
Bash is implied/available, so we are able to drop this.
💬 maflcko commented on issue "ci: how to run native arm job on Apple silicon?":
(https://github.com/bitcoin/bitcoin/issues/31344#issuecomment-2493529510)
My recommendation would be to try without the cirrus overhead for debugging. Just copy-pasting the one-line bash command may be easier and faster for troubleshooting. See https://github.com/bitcoin/bitcoin/tree/master/ci#running-a-stage-locally
As for the error itself: It is not possible to run 32-bit arm binaries on a CPU that only supports 64-bit mode.
I don't know how to fix this, but if nothing helps, you'll have to select qemu-arm in UTM. (Is there a reason why you haven't done this
...
(https://github.com/bitcoin/bitcoin/issues/31344#issuecomment-2493529510)
My recommendation would be to try without the cirrus overhead for debugging. Just copy-pasting the one-line bash command may be easier and faster for troubleshooting. See https://github.com/bitcoin/bitcoin/tree/master/ci#running-a-stage-locally
As for the error itself: It is not possible to run 32-bit arm binaries on a CPU that only supports 64-bit mode.
I don't know how to fix this, but if nothing helps, you'll have to select qemu-arm in UTM. (Is there a reason why you haven't done this
...
💬 hebasto commented on issue "MSVC 17.12.0 internal compiler error ":
(https://github.com/bitcoin/bitcoin/issues/31303#issuecomment-2493534971)
> Sorry about the regression; go ahead and file a report at https://developercommunity.visualstudio.com/cpp/report and we'll see if we can get it serviced quickly.
https://developercommunity.visualstudio.com/t/C1001:-Internal-compiler-error-in-the-Bi/10797559
(https://github.com/bitcoin/bitcoin/issues/31303#issuecomment-2493534971)
> Sorry about the regression; go ahead and file a report at https://developercommunity.visualstudio.com/cpp/report and we'll see if we can get it serviced quickly.
https://developercommunity.visualstudio.com/t/C1001:-Internal-compiler-error-in-the-Bi/10797559
👍 hebasto approved a pull request: "ci: Skip broken Wine64 tests by default"
(https://github.com/bitcoin/bitcoin/pull/31284#pullrequestreview-2454213024)
ACK fa5e7064597fc51366f082e3d07a4591e576db38, to avoid false-positives.
(https://github.com/bitcoin/bitcoin/pull/31284#pullrequestreview-2454213024)
ACK fa5e7064597fc51366f082e3d07a4591e576db38, to avoid false-positives.
✅ Sjors closed a pull request: "mining: add early return to waitTipChanged()"
(https://github.com/bitcoin/bitcoin/pull/31297)
(https://github.com/bitcoin/bitcoin/pull/31297)
💬 Sjors commented on pull request "mining: add early return to waitTipChanged()":
(https://github.com/bitcoin/bitcoin/pull/31297#issuecomment-2493553214)
I tested that `m_tip_block_cv.wait_for` indeed immediately checks the condition before waiting. And I could see that `notifications().m_tip_block` isn't set when you start a node that is already fully caught up.
I'll open a new PR to try and deal with that.
(https://github.com/bitcoin/bitcoin/pull/31297#issuecomment-2493553214)
I tested that `m_tip_block_cv.wait_for` indeed immediately checks the condition before waiting. And I could see that `notifications().m_tip_block` isn't set when you start a node that is already fully caught up.
I'll open a new PR to try and deal with that.
👍 laanwj approved a pull request: "contrib: skip missing binaries in gen-manpages"
(https://github.com/bitcoin/bitcoin/pull/30986#pullrequestreview-2454225450)
Code review ACK 4bbd28baf33382231f4f1dab20681c05f9915af2
(https://github.com/bitcoin/bitcoin/pull/30986#pullrequestreview-2454225450)
Code review ACK 4bbd28baf33382231f4f1dab20681c05f9915af2
💬 maflcko commented on pull request "[POC] ci: Test cross-built Windows executables on Windows natively":
(https://github.com/bitcoin/bitcoin/pull/31176#issuecomment-2493572333)
I think this is useful, and while it is waiting for more review (and for the existing review to be addressed), it could make sense to schedule it to run regularly in a repo. For example, in one of your repos, or in a new repo, or in an existing one like https://github.com/maflcko/b-c-nightly/ .
(https://github.com/bitcoin/bitcoin/pull/31176#issuecomment-2493572333)
I think this is useful, and while it is waiting for more review (and for the existing review to be addressed), it could make sense to schedule it to run regularly in a repo. For example, in one of your repos, or in a new repo, or in an existing one like https://github.com/maflcko/b-c-nightly/ .
⚠️ rkrux opened an issue: "Add `satToBtc()` and conversely `btcToSat()` util functions in functional tests"
(https://github.com/bitcoin/bitcoin/issues/31345)
### Motivation
In [functional tests](https://github.com/bitcoin/bitcoin/tree/master/test/functional), there are numerous instances of conversion code with patterns such as `/ COIN` and `* COIN` that are converting between units _satoshis_ to _BTC_.
Following details are as of the latest commit on master 2638fdb4f934be96b7c798dbac38ea5ab8a6374a.
### Patterns stats
```terminal
# satoshis to BTC conversion
➜ bitcoin git:(2638fdb4f9) ✗ git grep -n "/ COIN" -- '*.py' | wc -l
22
...
(https://github.com/bitcoin/bitcoin/issues/31345)
### Motivation
In [functional tests](https://github.com/bitcoin/bitcoin/tree/master/test/functional), there are numerous instances of conversion code with patterns such as `/ COIN` and `* COIN` that are converting between units _satoshis_ to _BTC_.
Following details are as of the latest commit on master 2638fdb4f934be96b7c798dbac38ea5ab8a6374a.
### Patterns stats
```terminal
# satoshis to BTC conversion
➜ bitcoin git:(2638fdb4f9) ✗ git grep -n "/ COIN" -- '*.py' | wc -l
22
...
💬 rkrux commented on pull request "Fee Estimation: Ignore all transactions that are CPFP'd":
(https://github.com/bitcoin/bitcoin/pull/30079#discussion_r1853812830)
Quite a late reply here but I don't think I will get to this anytime soon, created an issue here for anyone else to pick up: https://github.com/bitcoin/bitcoin/issues/31345
(https://github.com/bitcoin/bitcoin/pull/30079#discussion_r1853812830)
Quite a late reply here but I don't think I will get to this anytime soon, created an issue here for anyone else to pick up: https://github.com/bitcoin/bitcoin/issues/31345
💬 ryanofsky commented on pull request "util: Improve documentation and negation of args":
(https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853756499)
re: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853379963
The idea is not to add an ignored test, but to add real test coverage. For example if there is a buggy `add()` function that thinks `2 + 2 = 5`, the ideal way to fix it is to first add a test commit that asserts `add(2, 2) == 5` with a comment noting the add function is buggy. After this, a separate commit should fix the bug and update the test to assert `add(2, 2) == 4`. Advantages of this approach:
1. Clearly shows
...
(https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853756499)
re: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853379963
The idea is not to add an ignored test, but to add real test coverage. For example if there is a buggy `add()` function that thinks `2 + 2 = 5`, the ideal way to fix it is to first add a test commit that asserts `add(2, 2) == 5` with a comment noting the add function is buggy. After this, a separate commit should fix the bug and update the test to assert `add(2, 2) == 4`. Advantages of this approach:
1. Clearly shows
...
💬 ryanofsky commented on pull request "util: Improve documentation and negation of args":
(https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853811005)
re: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853683566
> What's the reason for not wanting an `about` window regardless of the `-version` flag's value? Doesn't `gArgs.IsArgSet("-version")` make more sense here?
The idea is for -noversion and -version=0 to be the same as not specifying a -version argument. -version is just a binary option, it should choose between 2 behaviors, not 3
(https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853811005)
re: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853683566
> What's the reason for not wanting an `about` window regardless of the `-version` flag's value? Doesn't `gArgs.IsArgSet("-version")` make more sense here?
The idea is for -noversion and -version=0 to be the same as not specifying a -version argument. -version is just a binary option, it should choose between 2 behaviors, not 3
💬 ryanofsky commented on pull request "util: Improve documentation and negation of args":
(https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853779968)
re: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853551532
I think the idea here is just for -version to take precedence over -help if both are specified. I don't know if this is the best behavior, but I don't see a reason to change in a commit that is just trying to handle -version=0 and -noversion more sensibly.
(https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853779968)
re: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1853551532
I think the idea here is just for -version to take precedence over -help if both are specified. I don't know if this is the best behavior, but I don't see a reason to change in a commit that is just trying to handle -version=0 and -noversion more sensibly.