Bitcoin Core Github
43 subscribers
122K links
Download Telegram
💬 maflcko commented on pull request "test, refactor: Add TestNode.binaries to hold binary paths":
(https://github.com/bitcoin/bitcoin/pull/31866#discussion_r1959430288)
nit in https://github.com/bitcoin/bitcoin/commit/e58f5e0e6180e0f0f39d4fb52d1ed822cbde1078: I'd say it would be clearer to not have `self.paths` at all, and also remove the need to somehow import and handle `Binaries` in individual tests.

It would be better to fully move all touched code of this pull into `TestNode` and only allow getting binaries through the `TestNode` interface. The reasons are:

* All functional tests revolve around nodes (and their datadirs) and it is hard to imagine a t
...
💬 maflcko commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665166672)
> I can't think of a reason we'd want to silently skip these checks if hardening was inadvertently disabled.

Does a missing target really get silently skipped? Locally I get the expected failure:

```
$ cmake --build ./bld-cmake/ -j 1 --target check-security-missing ; echo $?
gmake: *** No rule to make target 'check-security-missing'. Stop.
2
```
💬 fanquake commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665169319)
> Does a missing target really get silently skipped? Locally I get the expected failure:

Did you pass -DENABLE_HARDENING=OFF
💬 Sjors commented on pull request "guix: Notarize MacOS app bundle and codesign all MacOS and Windows binaries":
(https://github.com/bitcoin/bitcoin/pull/31407#issuecomment-2665175404)
I was wondering how Homebrew fixes this, well apparently they just ad-hoc sign on your machine: https://github.com/orgs/Homebrew/discussions/4582#discussioncomment-6242807

Here's a random Rust project that does codesign and notarize, but doesn't staple: https://www.randomerrata.com/articles/2024/notarize/

Since macOS doesn't know if a binary is notarized, and it doesn't have the staple locally, it seems inevitable that it's going to call home.

How nice of Apple to say this:

> We have
...
💬 fanquake commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665183445)
Actually, I don't understand what you've tested here. `test-security-missing` isn't a target, so that result is expected.
If you configure with `-DENABLE_HARDENING=OFF`, you'll get:
```bash
cmake --build build --target check-security
Built target check-security
```
but nothing will have actually been done, because the target is a dummy.
💬 maflcko commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665205096)
Sorry, I missed that a dummy target was added. Makes sense to remove the dummy target. Removing the condition seems fine as well.

lgtm ACK 113a7a363faf1ace6b08a28cf4075dbce05f8f04
🚀 fanquake merged a pull request: "contrib: Add deterministic-fuzz-coverage"
(https://github.com/bitcoin/bitcoin/pull/31836)
⚠️ hodlinator opened an issue: "test: feature_assumeutxo.py Windows timeout"
(https://github.com/bitcoin/bitcoin/issues/31894)
Ran into a CI timeout in *feature_assumeutxo.py* on Windows: https://github.com/hodlinator/bitcoin/actions/runs/13371466603/job/37340702068#step:12:123

In the combined log we see the following, "Restarting node to stop at height" is [referring to node 1](https://github.com/bitcoin/bitcoin/blob/790c509a4796ec47be2275d86b35370ff25a599a/test/functional/feature_assumeutxo.py#L586)):
```
test ...T14:10:53.420000Z TestFramework (INFO): Restarting node to stop at height 359
test ...T14:10:53.420000Z
...
💬 hodlinator commented on issue "test: feature_assumeutxo.py Windows timeout":
(https://github.com/bitcoin/bitcoin/issues/31894#issuecomment-2665304532)
@pinheadmz since you are working on the HTTP rewrite... have you noticed anything fishy regarding whether the stop-RPC will actually always get the response sent off back to the client or not?

Current stop-RPC implementation implies it should always work:
https://github.com/bitcoin/bitcoin/blob/790c509a4796ec47be2275d86b35370ff25a599a/src/rpc/server.cpp#L170-L172

But it's from 2015 and the log above makes me very suspicious.
💬 maflcko commented on issue "test: feature_assumeutxo.py Windows timeout":
(https://github.com/bitcoin/bitcoin/issues/31894#issuecomment-2665368484)
It looks like the scheduler thread never exited? It may be related to the comment:

```
// After everything has been shut down, but before things get flushed, stop the
// the scheduler. After this point, SyncWithValidationInterfaceQueue() should not be called anymore
// as this would prevent the shutdown from completing.
if (node.scheduler) node.scheduler->stop();
```

However, I don't see which thread could have called `SyncWithValidationInterfaceQueue` for it to block.
🤔 hebasto reviewed a pull request: "build: remove ENABLE_HARDENING condition from check-security"
(https://github.com/bitcoin/bitcoin/pull/31892#pullrequestreview-2623248603)
For historical context, the current CMake's implementation mirrors the Autotools' implementation introduced in f3d3eaf78eb51238d799d8f20a585550d1567719:https://github.com/bitcoin/bitcoin/blob/32efe850438ef22e2de39e562af557872a402c31/src/Makefile.am#L1057-L1061
💬 hebasto commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665425211)
> This check is only used in release builds, where hardening should always be enabled. I can't think of a reason we'd want to silently skip these checks if hardening was inadvertently disabled.

In that case, removing the dummy target is the correct solution, but the `if(ENABLE_HARDENING)` condition should remain:
```
$ cmake -B build -G "Ninja" -DENABLE_HARDENING=OFF
$ cmake --build build -t check-security
ninja: error: unknown target 'check-security'
```
or
```
$ cmake -B build -G "U
...
💬 pinheadmz commented on issue "test: feature_assumeutxo.py Windows timeout":
(https://github.com/bitcoin/bitcoin/issues/31894#issuecomment-2665433174)
> [@pinheadmz](https://github.com/pinheadmz) since you are working on the HTTP rewrite...

I hadn't noticed anything about the current implementation but managing the RPC `stop` race condition was definitely a tricky part of the rewrite.

One thing to note about the actual total time elapsed in your case is that on CI the timeout factors are multiplied by large factors in some cases to avoid timeout errors on low-resource runners:

https://github.com/bitcoin/bitcoin/blob/78c19ddd7c56a275d2ae835
...
💬 fanquake commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665434797)
> but the if(ENABLE_HARDENING) condition should remain:

Why? Those aren't release builds.
💬 hebasto commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665439339)
> > but the if(ENABLE_HARDENING) condition should remain:
>
> Why? Those aren't release builds.

In case when "hardening was inadvertently disabled".
💬 fanquake commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665441973)
> In case when "hardening was inadvertently disabled".

I don't know what you mean. If hardening was accidently disabled then the build failing is a good thing.
💬 hebasto commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665454487)
> > In case when "hardening was inadvertently disabled".
>
> I don't know what you mean. If hardening was accidently disabled then the build failing is a good thing.

Correct.However, this PR does the opposite: the `check-security` custom target is available unconditionally, and building it won't fail (at least at the build system level).
💬 fanquake commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665459821)
> the check-security custom target is available unconditionally

This is what we want.

> and building it won't fail (at least at the build system level).

It will fail, because the checks will fail.
💬 hebasto commented on pull request "build: remove ENABLE_HARDENING condition from check-security":
(https://github.com/bitcoin/bitcoin/pull/31892#issuecomment-2665463899)
> > the check-security custom target is available unconditionally
>
> This is what we want.

What reasons for?

>
> > and building it won't fail (at least at the build system level).
>
> It will fail, because the checks will fail.

It should fail earlier, at the build system level.
💬 l0rinc commented on pull request "refactor: remove redundant `for` constructs":
(https://github.com/bitcoin/bitcoin/pull/31891#issuecomment-2665467283)
Tend to agree with @maflcko, I vote to keep it as is, given that it's already pushed