Bitcoin Core Github
43 subscribers
123K links
Download Telegram
👍 laanwj approved a pull request: "Cleanups to port mapping module post UPnP drop"
(https://github.com/bitcoin/bitcoin/pull/31157#pullrequestreview-2551977080)
Code review ACK 70398ae05bc36a2788e87f67ae06962f43fe35a6
📝 hebasto opened a pull request: "depends: Always set `CMAKE_BUILD_TYPE=None` globally"
(https://github.com/bitcoin/bitcoin/pull/31661)
This PR fixes a regression for the `libevent` package introduced in https://github.com/bitcoin/bitcoin/pull/29835.

Instead of configuring `CMAKE_BUILD_TYPE=None` per package, set it globally to ensure consistent behaviour. This prevents packages with a default build type (usually "Release") from overriding our build type-specific flags, such as `-O2` or `-O1 -g`.

For packages that do not set a default build type, this change does not affect their behaviour.
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#issuecomment-2592154041)
The first commit a7d43645ea353021b2143407ab06336105c82434 changes `coinbaseMaxAdditionalWeight` in the Mining interface to `blockReservedWeight`. This decouples it from the Stratum v2 concept of `CoinbaseOutputDataSize` which is strictly limited to the outputs added:

> The maximum additional serialized bytes which the pool will add in coinbase transaction outputs

https://github.com/stratum-mining/sv2-spec/blob/main/07-Template-Distribution-Protocol.md#71-coinbaseoutputdatasize-client---se
...
👍 maflcko approved a pull request: "ci: Supply `--platform` argument to `docker build`."
(https://github.com/bitcoin/bitcoin/pull/31657#pullrequestreview-2552091496)
lgtm, but I left some feedback
💬 maflcko commented on pull request "ci: Supply `--platform` argument to `docker build`.":
(https://github.com/bitcoin/bitcoin/pull/31657#discussion_r1916282815)
Does this env var work for podman as well? Regardless, I am wondering if it was easier to just pass `--platform` to `docker build` in `./ci/test/02_run_container.sh` (and possibly `docker run`, if needed)?

Something like:

```bash
CI_IMAGE_PLATFORM="" # native platform (default)
```

Alternatively, with the added benefit of possibly supporting macos (see https://github.com/bitcoin/bitcoin/issues/31344#issuecomment-2493612110 (expand "docker setup")):

```bash
CI_IMAGE_PLATFORM="--os
...
💬 maflcko commented on pull request "ci: Supply `--platform` argument to `docker build`.":
(https://github.com/bitcoin/bitcoin/pull/31657#discussion_r1916269793)
```suggestion
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
```

nit: I think you can now remove the redundant arch here? (same for the others)
🤔 Sjors reviewed a pull request: "mining: bugfix: Fix duplicate coinbase tx weight reservation"
(https://github.com/bitcoin/bitcoin/pull/31384#pullrequestreview-2552083345)
Code review ad1bc03245181b00a25ea0182373eddae1c151e1, mostly happy.
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916285431)
I would leave out this sentence, or say "Setting a lower value is prevented at startup."
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916264865)
a7d43645ea353021b2143407ab06336105c82434: you can leave out "(scriptSig, witness and outputs)" as well as "This must include ...", they are left-overs from when this reflected `CoinbaseOutputDataSize`, see https://github.com/bitcoin/bitcoin/pull/31384#issuecomment-2592154041

Suggested text:

> The default reserved weight for the block header, transaction count and coinbase transaction.
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916290653)
Maybe add:

> This accounts for the block header, var_int encoding of the transaction count and a minimally viable coinbase transaction. It adds an additional safety margin, because even with a thorough understanding of block serialization, it's easy to make a costly mistake when trying to squeeze every last byte.
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916296390)
ad1bc03245181b00a25ea0182373eddae1c151e1: the header and
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916279728)
131eb4e630f958f1b5330bb9d170716c33655880: this should be a constant, not part of `BlockCreateOptions`.

E.g. `MINIMUM_BLOCK_RESERVED_WEIGHT{2000}` defined next to `DEFAULT_BLOCK_MAX_WEIGHT`.
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916278786)
131eb4e630f958f1b5330bb9d170716c33655880: sane -> safety
💬 Sjors commented on pull request "mining: bugfix: Fix duplicate coinbase tx weight reservation":
(https://github.com/bitcoin/bitcoin/pull/31384#discussion_r1916275287)
9990552514328da45c19ed294c5bc79562aa12bc nit: "including"
fanquake closed an issue: "The 28.1 release is not tagged in github"
(https://github.com/bitcoin/bitcoin/issues/31660)
💬 fanquake commented on issue "The 28.1 release is not tagged in github":
(https://github.com/bitcoin/bitcoin/issues/31660#issuecomment-2592293287)
I've published a release: https://github.com/bitcoin/bitcoin/releases/tag/v28.1.
👍 stickies-v approved a pull request: "refactor: Check translatable format strings at compile-time"
(https://github.com/bitcoin/bitcoin/pull/31061#pullrequestreview-2547086177)
ACK fa51381790fe19e37e04a01a39cc94a00dcc441c - replacing linters with compile time checks is a very nice win. The newly introduced `TranslatedLiteral` and `BilingualFmt` make for a nice interface, and `RuntimeFormat` preserves the ability to bypass compile-time checks in a clear and convenient way.

A couple of non-blocking nits (sorry, I thought I'd posted them already) that shouldn't hold up this PR.
💬 stickies-v commented on pull request "refactor: Check translatable format strings at compile-time":
(https://github.com/bitcoin/bitcoin/pull/31061#discussion_r1913420814)
in fad276ad6518a394d065943d458e8c7cce3f997c

nit: could-reuse `TranslateFn`:

<details>
<summary>git diff on fad276ad65</summary>

```diff
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 5c5965245b..1b2d97faff 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -50,7 +50,7 @@ using util::ToString;
// just use a plain system_clock.
using CliClock = std::chrono::system_clock;

-const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
+co
...
💬 stickies-v commented on pull request "refactor: Check translatable format strings at compile-time":
(https://github.com/bitcoin/bitcoin/pull/31061#discussion_r1913646741)
Yeah it's fine as is too. The change I had in mind was just adding `RunTimeWrapped-wrapped` in case users just read the docstring and don't understand why their std::string argument fails.

> // Added for Bitcoin Core. Wrapper for checking format strings at
// compile time. Unlike ConstevalFormatString this supports
// RunTimeFormat-wrapped std::string for runtime string formatting
// without compile time checks.
💬 stickies-v commented on pull request "refactor: Check translatable format strings at compile-time":
(https://github.com/bitcoin/bitcoin/pull/31061#discussion_r1913600974)
style nit: using `internal` function overloads seems a bit more readable to me, but up to you what you prefer

<details>
<summary>git diff on fa93b05a4d</summary>

```diff
diff --git a/src/util/translation.h b/src/util/translation.h
index 27747a16f2..347bc5151d 100644
--- a/src/util/translation.h
+++ b/src/util/translation.h
@@ -81,29 +81,26 @@ consteval auto _(util::TranslatedLiteral str) { return str; }
/** Mark a bilingual_str as untranslated */
inline bilingual_str Untranslated
...