Bitcoin Core Github
45 subscribers
118K links
Download Telegram
💬 pinheadmz commented on pull request "Support JSON-RPC 2.0 when requested by client":
(https://github.com/bitcoin/bitcoin/pull/27101#discussion_r1145223127)
Hm yeah good point, a few error codes like this [are specified](https://www.jsonrpc.org/specification#error_object). One problem with this is that our application error `RPC_INVALID_PARAMETER` (`-8`) is coded ~186 times in RPC functions everywhere. I suppose we could re-map those error codes back to the jsonrpc 2.0 spec in `JSONRPCExecOne()`? Only when the request indicates jsonrpc 2.0
💬 theuni commented on pull request "Introduce platform-agnostic `ALWAYS_INLINE` macro":
(https://github.com/bitcoin/bitcoin/pull/27575#discussion_r1185451991)
How about: `#error No known always_inline attribute for this platform.`
💬 hebasto commented on pull request "Enable HW-accelerated implementations of SHA256 for MSVC builds":
(https://github.com/bitcoin/bitcoin/pull/24773#discussion_r1185847875)
1. This `#if ... #else ... #endif` [block](https://github.com/hebasto/bitcoin/blob/915bdbdf8c87e20426161bbf393d1036659813a2/src/random.cpp#L69-L185) guards two static functions--`GetRdRand` and `GetRdSeed`--which are not implemented for Windows. Not adding `&& !defined(_MSC_VER)` ends with an error:
```
C:\Users\hebasto\bitcoin\src\random.cpp(137,1): fatal error C1189: #error: "RdRand is only supported on x86 and x86_64" [C:\Users\hebasto\bitcoin\build_msvc\li
bbitcoin_util\libbitcoin_util.
...
💬 hebasto commented on pull request "Enable HW-accelerated implementations of SHA256 for MSVC builds":
(https://github.com/bitcoin/bitcoin/pull/24773#discussion_r1186731838)
> Does MSVC not define `__x86_64__` or `__amd64__` or `__i386__` ?

No, it does not. Easy to verify with the following diff:
```diff
--- a/src/compat/cpuid.h
+++ b/src/compat/cpuid.h
@@ -6,6 +6,7 @@
#define BITCOIN_COMPAT_CPUID_H

#if defined(__x86_64__) || defined(__amd64__) || defined(__i386__)
+#error
#define HAVE_GETCPUID

#include <cpuid.h>

```
💬 jonatack commented on pull request "test: add end-to-end tests for CConnman and PeerManager":
(https://github.com/bitcoin/bitcoin/pull/26812#discussion_r1244454225)
d2f46c7 Verified the behavior improvement in this commit by changing this line to make it fail.

master

```bash
$ ./src/test/test_bitcoin -t banman_tests
Running 1 test case...
libc++abi: terminating due to uncaught exception of type std::runtime_error: 'Dropping entry with unknown version (2) rom ban list' not found in debug log

******** errors disabling the alternate stack:
#error:22
Invalid argument
unknown location:0: fatal error: in "banman_tests/file": signal: SIGABR
...
💬 hebasto commented on pull request "build: Patch Qt to handle minimum macOS version properly":
(https://github.com/bitcoin/bitcoin/pull/28775#issuecomment-1792023227)
> In that case, maybe it would be easier to set something like `-DOS_ACTIVITY_OBJECT_API=1` for the Qt build, and not have to patch any source?

I think it will hit
```
#error Please change your minimum OS requirements because OS_ACTIVITY_OBJECT_API is not available
```

> Native builds (using the latest Xcode) are not broken in this way, and the minimum version handling shouldn't differ between the two?

I've verified the native build on macOS 14.1 without depends. Both macros are defi
...
⚠️ hebasto opened an issue: "depends: Cross-compiling `qt` for `arm-linux-gnueabihf` fails"
(https://github.com/bitcoin/bitcoin/issues/29980)
On Ubuntu 24.04 with glibc 2.39:
```
compiling ../3rdparty/zlib/src/gzclose.c
In file included from /usr/arm-linux-gnueabihf/include/features.h:394,
from /usr/arm-linux-gnueabihf/include/bits/libc-header-start.h:33,
from /usr/arm-linux-gnueabihf/include/stdio.h:28,
from ../3rdparty/zlib/src/gzguts.h:40,
from ../3rdparty/zlib/src/gzclose.c:6:
/usr/arm-linux-gnueabihf/include/features-time64.h:26:5: error: #error "_TIME_BI
...
⚠️ hebasto opened an issue: "depends: `capnp` package fails to build on NetBSD 10.0"
(https://github.com/bitcoin/bitcoin/issues/31499)
On the master branch @ b042c4f0538c6f9cdf8efbcef552796851e38a85:
- with GCC 12.4.0:
```
$ gmake -C depends capnp MULTIPROCESS=1 CC=/usr/pkg/gcc12/bin/gcc CXX=/usr/pkg/gcc12/bin/g++
<snip>
In file included from /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/capnp/1.0.2-93b376fc421/src/kj/async.c++:42:
/home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/capnp/1.0.2-93b376fc421/src/kj/async.h:39:6: error: #error "Fibers cannot be enabled when excepti
...
💬 ajtowns commented on pull request "Bump SCRIPT_VERIFY flags to 64 bit":
(https://github.com/bitcoin/bitcoin/pull/32998#issuecomment-3082011233)
CI failure seems to be due to [a bug in qt6 6.4](https://bugreports.qt.io/browse/QTBUG-31496?focusedId=888930&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-888930):

> Also for people coming here from Google: I had the same error message, but for me the problem was that I was using Qt 6.4.2 which apparently thinks that #if 202002L < 201103L is true, which causes c++config.h to not be included (and no #error is generated because moc doesn't support the directiv
...
💬 hodlinator commented on pull request "node: Add --debug_runs/-waitfordebugger + --debug_cmd":
(https://github.com/bitcoin/bitcoin/pull/31723#discussion_r2387108889)
Could do potentially do something like...
```C++
#if defined(WAIT_FOR_DEBUGGER) && defined(NDEBUG)
#error "Should only enable WAIT_FOR_DEBUGGER in debug builds"
#endif
```
...though there could be scenarios where one wants to debug release builds as well.

*/contrib/guix/symbol-check.py* could also potentially analyze the binary after the fact. LLM says that the *lief* module can find calls to `prctl` when dynamically linking and otherwise one could add a dependency on the *capstone* mod
...