Skip to content

Commit 386eecf

Browse files
committed
doc: add release notes
1 parent 3eaa0a3 commit 386eecf

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

doc/release-notes-31384.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
- Node and Mining
2+
3+
---
4+
5+
- **PR #31384** fixed an issue where block reserved weight for fixed-size block header, transactions count,
6+
and coinbase transaction was done in two separate places.
7+
Before this pull request, the policy default for the maximum block weight was `3,996,000` WU, calculated by
8+
subtracting `4,000 WU` from the `4,000,000 WU` consensus limit to account for the fixed-size block header,
9+
transactions count, and coinbase transaction. During block assembly, Bitcoin Core clamped custom `-blockmaxweight`
10+
value to not be more than the policy default.
11+
12+
Additionally, the mining code added another `4,000 WU` to the initial reservation, reducing the effective block template
13+
size to `3,992,000 WU`.
14+
15+
Due to this issue, the total reserved weight was always `8,000 WU`, meaning that even when specifying a `-blockmaxweight`
16+
higher than the policy default, the actual block size never exceeded `3,992,000 WU`.
17+
18+
The fix consolidates the reservation into a single place and introduces a new startup option,
19+
`-blockreservedweight` (default: `8,000 WU`). This startup option specifies the reserved weight for
20+
the fixed-size block header, transactions count, and coinbase transaction.
21+
The default value of `-blockreservedweight` was chosen to preserve the previous behavior.
22+
23+
**Upgrade Note:** The default `-blockreservedweight` ensures backward compatibility for users who relied on the previous behavior.
24+
25+
Users who manually set `-blockmaxweight` to its maximum value of `4,000,000 WU` should be aware that this
26+
value previously had no effect since it was clamped to `3,996,000 WU`.
27+
28+
Users lowering `-blockreservedweight` should ensure that the total weight (for the block header, transaction count, and coinbase transaction)
29+
does not exceed the reduced value.
30+
31+
As a safety check, Bitcoin core will **fail to start** when `-blockreservedweight` init parameter value is lower than `2000` weight units.
32+
33+
Bitcoin Core will also **fail to start** if the `-blockmaxweight` or `-blockreservedweight` init parameter exceeds
34+
consensus limit of `4,000,000` weight units.

0 commit comments

Comments
 (0)