Bitcoin Core Github
44 subscribers
121K links
Download Telegram
📝 fanquake opened a pull request: "guix: (explicitly) build Linux GCC with `--enable-cet`"
(https://github.com/bitcoin/bitcoin/pull/30438)
Similar to #29695, and in the same vein of explicitly configuring hardening options in our release toolchain.

See https://gcc.gnu.org/install/configure.html:

>` --enable-cet`

> Enable building target run-time libraries with control-flow instrumentation, see `-fcf-protection option`. When --enable-cet is specified target libraries are configured to add `-fcf-protection` and, if needed, other target specific options to a set of building options.

> `--enable-cet=auto` is default. CET is
...
👍 stickies-v approved a pull request: "rpc: Use CHECK_NONFATAL over Assert"
(https://github.com/bitcoin/bitcoin/pull/30429#pullrequestreview-2174514321)
ACK fa6270737eb9655bfb4e29b7070ecb6cd2087b7f
💬 stickies-v commented on pull request "rpc: Use CHECK_NONFATAL over Assert":
(https://github.com/bitcoin/bitcoin/pull/30429#discussion_r1675717508)
> If you want to be more accurate you'll have to write a clang-tidy plugin, but I won't be doing this myself.

The issue doesn't seem very likely to happen, so I don't think we should spend too much time on this indeed, but since clang-format doesn't red the CI I feel like not removing two characters is a sensible approach to catch this. Either way is fine for me, so up to you.

> Keep in mind that macOS is not supported.

Ugh, sorry didn't consider that. I confirmed that the new test work
...
💬 Sjors commented on pull request "Stratum v2 Template Provider (take 3)":
(https://github.com/bitcoin/bitcoin/pull/29432#issuecomment-2225384531)
> Implementation of `MiningBlock` could own all the data it needs and release it when it is destroyed.

Thanks, that makes sense.

> I could drop the commits in https://github.com/bitcoin/bitcoin/pull/30437 related to allowing a spawned process to detach and not exit when the last IPC connection is closed.

I think that's a good idea. Will study the PR.
💬 ismaelsadeeq commented on pull request "BlockAssembler: return selected packages vsize and feerate":
(https://github.com/bitcoin/bitcoin/pull/30391#discussion_r1675726351)
@glozow
> probably `FeeFrac` would be better? `CFeeRate` loses precision and can be inferred from the fee and size

We will be using the package size to calculate the percentile package and select its fee rate as an estimate to return to the user.

We then have to convert the fee and size to fee rate either by `CFeeRate(const CAmount& nFeePaid, uint32_t num_bytes).GetFeePerK` or introduce and use a similar `GetFeeRate` method for the `FeeFrac` struct.

So, I think using `CFeeRate` is oka
...
💬 Sjors commented on pull request "multiprocess: add bitcoin-mine test program":
(https://github.com/bitcoin/bitcoin/pull/30437#issuecomment-2225416191)
Thanks. I'll try to get the Mining interface in good shape as well, which this can then be rebased on:

- #30409 (first commit)
- #30356
- to have `createNewBlock()` return an interface, see https://github.com/bitcoin/bitcoin/pull/29432#issuecomment-2225337100
- add `waitFeesChanged()` (initially just uses `GetTransactionsUpdated()`, but once cluster mempool is in place it can do frequent (fast) block template construction to see if fees have actually gone up.
💬 paplorinc commented on pull request "optimization: Speed up Base58 encoding/decoding by 400%/200% via preliminary byte packing":
(https://github.com/bitcoin/bitcoin/pull/29473#issuecomment-2225417510)
@luke-jr, would this optimization be more welcome in https://github.com/bitcoin/libbase58 instead?
💬 hodlinator commented on pull request "fix: Make TxidFromString() respect string_view length":
(https://github.com/bitcoin/bitcoin/pull/30436#discussion_r1675758398)
Thanks for the feedback, I really enjoyed removing the overloads based on the other comments! :)

Messed up the first force-push somehow, here is a comparison between what you reviewed and the current state:
https://github.com/bitcoin/bitcoin/compare/be23937392195c773811fdfc0d723783b2dace67..fcec222ae9386342ff1342e096255ca1ff74964d

> Also, could add a unit test that truncated input is parsed?

Do you mean that `base_blob::SetHex()` allows parsing "half bytes" like `"0xF"`, while `ParseHe
...
💬 maflcko commented on pull request "fix: Make TxidFromString() respect string_view length":
(https://github.com/bitcoin/bitcoin/pull/30436#discussion_r1675767961)
This is wrong and not a refactor. It crashes the node for me. Previously it did not crash.

```
node0 stderr terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string_view::substr: __pos (which is 67) > __size (which is 66)
```
💬 maflcko commented on pull request "fix: Make TxidFromString() respect string_view length":
(https://github.com/bitcoin/bitcoin/pull/30436#discussion_r1675771306)
> Do you mean that `base_blob::SetHex()` allows parsing "half bytes" like `"0xF"`, while `ParseHex()` would fail on `"F"` and require `"0F"` (maybe `"F0"`)?

Yeah, it looks like this is already tested in `BOOST_AUTO_TEST_CASE(parse)`:

```cpp
{
std::string s_1{uint256::ONE.GetHex()};
BOOST_CHECK_EQUAL(uint256S("1\0").GetHex(), s_1);
BOOST_CHECK_EQUAL(uint256S(std::string{"1\0", 2}).GetHex(), s_1);
BOOST_CHECK_EQUAL(uint256S("0x1").GetHex(), s_1);

...
💬 maflcko commented on pull request "fix: Make TxidFromString() respect string_view length":
(https://github.com/bitcoin/bitcoin/pull/30436#discussion_r1675773282)
> Messed up the first force-push somehow, here is a comparison between what you reviewed and the current state:
> https://github.com/bitcoin/bitcoin/compare/be23937392195c773811fdfc0d723783b2dace67..fcec222ae9386342ff1342e096255ca1ff74964d

No worries. I do proper reviews locally anyway, as I don't trust GitHub, due to its history of data loss and data corruption.
💬 maflcko commented on pull request "fix: Make TxidFromString() respect string_view length":
(https://github.com/bitcoin/bitcoin/pull/30436#discussion_r1675775175)
This is fixed in C++23. Also, most C++17 compilers would already issue a compile warning for this.
💬 ryanofsky commented on pull request "multiprocess: add bitcoin-mine test program":
(https://github.com/bitcoin/bitcoin/pull/30437#issuecomment-2225488531)
Updated 8e9367371b47d7a88136a80d0cb091e1f32d2a4e -> 3c0a13c9a56a11d795b243cedb3b00a71a81042c ([`pr/mine.1`](https://github.com/ryanofsky/bitcoin/commits/pr/mine.1) -> [`pr/mine.2`](https://github.com/ryanofsky/bitcoin/commits/pr/mine.2), [compare](https://github.com/ryanofsky/bitcoin/compare/pr/mine.1..pr/mine.2)) filling in missing serialization for CBlockTemplate and BlockValidationState types, also fixing link errors for test programs that were causing CI tasks to fail.
💬 pythcoiner commented on pull request "descriptors: Be able to specify change and receiving in a single descriptor string":
(https://github.com/bitcoin/bitcoin/pull/22838#issuecomment-2225488932)
ACK 00337ef
I've written some [tests](https://github.com/bitcoin/bitcoin/commit/f6cdf9bec82533e849f6156f5593dc9ceb688306) and tested import descriptors produced by liana wallet
💬 ryanofsky commented on pull request "multiprocess: add bitcoin-mine test program":
(https://github.com/bitcoin/bitcoin/pull/30437#issuecomment-2225503069)
I'll work on dropping the spawn functionality from this PR next, and just having the `bitcoin-mine` program print an error when it can't connect to the node socket, instead of starting the node itself. Sjors suggested this in https://github.com/bitcoin/bitcoin/pull/29432#issuecomment-2225041208:

> If it helps getting IPC stuff merged quicker, it's fine by me if the miner can't spin up a node process (see e.g. [Sjors@b6dfa5f](https://github.com/Sjors/bitcoin/commit/b6dfa5f186e8a4813db21b2547de
...
⚠️ hebasto opened an issue: "depends: `libevent` build fails when `C{C,XX}` are provided"
(https://github.com/bitcoin/bitcoin/issues/30439)
```
$ make -C depends libevent HOST=x86_64-apple-darwin CC=clang CXX=clang++
make: Entering directory '/home/hebasto/git/bitcoin/depends'
Configuring libevent...
-- The C compiler identification is Clang 16.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/clang-16
-- Check for working C compiler: /usr/bin/clang-16 - broken
CMake Error at /usr/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
The C c
...
💬 fanquake commented on issue "depends: `libevent` build fails when `C{C,XX}` are provided":
(https://github.com/bitcoin/bitcoin/issues/30439#issuecomment-2225515985)
Overriding those variables when cross-compiling for macOS isn't currently supported.
💬 fanquake commented on issue "depends: `libevent` build fails when `C{C,XX}` are provided":
(https://github.com/bitcoin/bitcoin/issues/30439#issuecomment-2225521100)
IIRC we also settled on the minimum clang for macOS being 18, so the Clang you're using (16), is likely too old.
💬 fanquake commented on issue "depends: `libevent` build fails when `C{C,XX}` are provided":
(https://github.com/bitcoin/bitcoin/issues/30439#issuecomment-2225523404)
Note that this is also not libevent specific. It's just that it happens to be the first thing compiled in depends.