Bitcoin Core Github
44 subscribers
121K links
Download Telegram
📝 maflcko opened a pull request: "build: Enable -Wbidi-chars=any"
(https://github.com/bitcoin/bitcoin/pull/31315)
I don't see a use-case for UTF-8 bidirectional control characters in this codebase. So disable them for now.

Ref: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbidi-chars_003d
💬 maflcko commented on pull request "build: Enable -Wbidi-chars=any":
(https://github.com/bitcoin/bitcoin/pull/31315#issuecomment-2482515067)
Can be tested with the patch in https://github.com/bitcoin/bitcoin/pull/31314
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846243805)
Slightly unrelated, but this doesn't actually return the number of cores, but [number of concurrent threads](https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency)
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846226372)
Seems deliberate to not clamp here instead, could you explain the reason?
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846235202)
`// -par=-n means "leave n cores free" (number of cores - n - 1 script threads)` is this still true?
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846266844)
as mentioned in the other comment, could we push this into `CCheckQueue` instead to avoid having to repeat this for other such calls, e.g. https://github.com/bitcoin/bitcoin/pull/31132/files#diff-97c3a52bc5fad452d82670a7fd291800bae20c7bc35bb82686c2c0a4ea7b5b98R6278
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846226818)
Do you happen to know how this threshold was derived and why it's needed in the first place?
If it's because `GetNumCores` is considered only a hint, why not clamp that instead?
💬 maflcko commented on pull request "depends: Update minimum required CMake version":
(https://github.com/bitcoin/bitcoin/pull/31300#discussion_r1846301539)
Why not submit this upstream and update? See also https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/143/diffs
💬 TheCharlatan commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846314866)
Looking at the original PR there seems to be little justification for it. It was also submitted in 2013, where machines with more than 16 cores were not common.

This current PR is just a refactor, if this should be changed, a separate PR should be opened.
💬 TheCharlatan commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846327910)
We already control the batch size from the chainman, so seemed logical to me to control the number of threads too.
🤔 l0rinc requested changes to a pull request: "ci: Update Clang in "tidy" job"
(https://github.com/bitcoin/bitcoin/pull/31306#pullrequestreview-2442201349)
Concept ACK, but approach NACK, I think some of the examples can be solved by removing the "feature" instead of just patching them.
💬 l0rinc commented on pull request "ci: Update Clang in "tidy" job":
(https://github.com/bitcoin/bitcoin/pull/31306#discussion_r1846324884)
This was already removed in the ACK-ed https://github.com/bitcoin/bitcoin/pull/30906/files#diff-3d0856e8b7f136c588b229e0cbd3b2e2c309cd097ade0879521daba4e1bb2a33L774-L777, could you please either revert this line or do it in a separate PR, since I think removing it completely is a better fix anyway.
💬 l0rinc commented on pull request "ci: Update Clang in "tidy" job":
(https://github.com/bitcoin/bitcoin/pull/31306#discussion_r1846343700)
Looking at the actual usage, `ExpectSuccess` doesn't need to be a variadic template function:
```C++
ExpectSuccess(IntFn(5, true), {}, 5);
ExpectSuccess(NoCopyFn(5, true), {}, 5);
ExpectSuccess(StrFn(Untranslated("S"), true), {}, Untranslated("S"));
```
, we might as well simplify to something like:
```C++
template <typename T, typename U>
void ExpectSuccess(const util::Result<T>& result, const bilingual_str& str, U&& expected)
{
ExpectResult(result, true, str);
BOOST_CHECK_E
...
💬 m3dwards commented on pull request "test: Shut down framework cleanly on RPC connection failure":
(https://github.com/bitcoin/bitcoin/pull/30660#issuecomment-2482647517)
Concept ACK

I like the motivation to cleanup the logs and remove the cascade of exceptions.

To test, I modified the included test to see what errors a user would have seen without the assertion:

```diff
--- a/test/functional/feature_framework_rpc_failure.py
+++ b/test/functional/feature_framework_rpc_failure.py
@@ -23,7 +23,8 @@ class FeatureFrameworkRPCFailure(BitcoinTestFramework):
self.log.info(f"Setting RPC timeout to 0 to simulate an unresponsive bitcoind, expect one w
...
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846350891)
Is script verification completely CPU bound? If so, this limit may still be reasonable for a few more years - but unlike in 2013, it's not an unreasonably big value.
💬 TheCharlatan commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#issuecomment-2482649498)
Updated 09c9ba846ec44ba903de2b32a1cb0f49c7f93cb0 -> 8f85d36d68ab33ba237407a2ed16667eb149d61f ([chainstatemanagerArgs_0](https://github.com/TheCharlatan/bitcoin/tree/chainstatemanagerArgs_0) -> [chainstatemanagerArgs_1](https://github.com/TheCharlatan/bitcoin/tree/chainstatemanagerArgs_1), [compare](https://github.com/TheCharlatan/bitcoin/compare/chainstatemanagerArgs_0..chainstatemanagerArgs_1))

* Addressed @maflcko's [comment](https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846233
...
💬 l0rinc commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846353272)
Do we expect [every call-site](https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846266844) to do the clamping themselves?
BrandonOdiwuor closed a pull request: "test: run functional tests from ctest"
(https://github.com/bitcoin/bitcoin/pull/31312)
💬 TheCharlatan commented on pull request "refactor: Clamp worker threads in ChainstateManager constructor":
(https://github.com/bitcoin/bitcoin/pull/31313#discussion_r1846366581)
I don't think this really matters, but seems consistent to control the arguments in the same place, just like with the batch size.
🤔 BrandonOdiwuor reviewed a pull request: "Bugfix: Correct first-run free space checks"
(https://github.com/bitcoin/bitcoin/pull/29678#pullrequestreview-2442281522)
Concept ACK using `GB` to represent 10<sup>3</sup> bytes for consistency with GUI