In theory, Bitcoin Core’s block-building algorithm reserves 4000 WU for miners’ coinbase transactions.
This means it should generate a block template with a weight of 3,996,000 WU.
However, in practice, this is not the case due to an accidental double-reservation bug (see #21950).
As a result, Bitcoin Core generates block templates with a weight of 3,992,000 WU.
There is an ongoing attempt to fix this issue (see #31384), but there are concerns that fixing the issue could lead to some miners generating invalid block templates.
If the PR were to be merged, mining pools using the updated Bitcoin Core version must ensure the sum of the coinbase transaction weight and the weight of all additional transactions added to the block template must not exceed 4000 WU.
Otherwise, the block will exceed the consensus limit for the maximum block weight (4,000,000 WU) and be invalid.
The proposed PR fixes the double reservation issue, which means the block template size is increased by 4000 WU, resulting in blocks with a weight of 3,996,000 WU as expected and matches theory.
Miners or pools needing more than 4000 WU for their coinbase transactions should configure bitcoind
with a lower -blockmaxweight
option.
For example, starting Bitcoin Core with -blockmaxweight=3999000
will free up an additional 1000 WU.
The purpose of this analysis is to examine mining pool behavior and determine the feasibility of this change.
- Blocks Analyzed: 107,313
- Period: 24th December 2022 to 23rd December 2024
Methodology
- I’ve used libbitcoinkernel to read blocks from disk.
- Each block is deserialized, and bitcoin-data/mining-pools tags are used to match the block to a mining pool. The block weight, coinbase transaction, and mining pool information are then saved to disk.
- After saving the data for the entire block interval, I generated the analysis results using this script.
- Charts were generated using a set of scripts.
- More details on the methodology can be found GitHub - ismaelsadeeq/mining-analysis.
Results
Pools Generating Blocks with Coinbase Weight > 4000 WU
Pool Name | Avg. Coinbase Weight | Avg. Block Weight | Min. Coinbase Weight (Height) | Min. Block Weight | Max. Coinbase Weight (Height) | Max. Block Weight |
---|---|---|---|---|---|---|
Ocean.xyz | 6994 | 3,988,137 | 5308 (865820) | 3,986,489 | 9272 (863471) | 3,990,301 |
Unknown pool | 7432 | 958,831 | 7000 (824116) | 1,887,437 | 7864 (785117) | 1,887,437 |
Figure 1: Box Plot of Coinbase Transaction Weights > 4000 WU
This box plot shows the distribution of coinbase transaction weights for pools generating blocks with coinbase weights greater than 4000 WU.
Pools with Blocks (> 3,996,000 WU)
Pool Name | Avg. Block Weight | Min. Block Weight | Min. Coinbase Weight (Height) | Max. Block Weight | Max. Coinbase Weight (Height) |
---|---|---|---|---|---|
F2Pool | 3,997,857 | 3,994,044 (828959) | 1724 (800183) | 3,998,554 (779729) | 1364 (786721) |
Remaining pools with Blocks (< 3,996,000 WU)
Pool Name | Avg. Block Weight | Min. Block Weight | Min. Coinbase Weight (Height) | Max. Block Weight | Max. Coinbase Weight (Height) |
---|---|---|---|---|---|
Foundry USA | 3,993,030 | 3,992,749 (813879) | 748 (813879) | 3,993,523 (874770) | 1192 (874770) |
Binance Pool | 3,993,348 | 3,992,753 (784937) | 748 (784937) | 3,993,768 (846996) | 1440 (846996) |
MARA Pool | 3,993,017 | 3,992,721 (802653) | 720 (802653) | 3,994,944 (859968) | 904 (859968) |
Luxor | 3,993,434 | 3,992,782 (768718) | 780 (768718) | 3,993,811 (841510) | 1480 (841510) |
AntPool | 3,993,554 | 3,992,868 (814783) | 732 (814783) | 3,993,918 (873367) | 1612 (873367) |
ViaBTC | 3,993,324 | 3,992,881 (782955) | 880 (782955) | 3,993,612 (872513) | 1284 (872513) |
Poolin | 3,993,308 | 3,992,987 (855538) | 904 (855538) | 3,993,613 (795979) | 1336 (795979) |
Braiins Pool | 3,993,251 | 3,992,695 (853433) | 684 (853433) | 3,993,416 (853776) | 1124 (853776) |
SBI Crypto | 3,992,911 | 3,992,717 (796840) | 716 (796840) | 3,993,047 (834797) | 716 (834797) |
Ultimus Pool | 3,993,407 | 3,993,076 (852748) | 1056 (852748) | 3,993,768 (842345) | 1440 (842345) |
BTC.com | 3,993,399 | 3,992,745 (796409) | 740 (796409) | 3,993,781 (806063) | 1472 (806063) |
SpiderPool | 3,993,190 | 3,992,912 (856599) | 892 (856599) | 3,993,616 (864899) | 1288 (864899) |
WhitePool | 3,993,072 | 3,992,677 (825268) | 676 (825268) | 3,993,631 (872281) | 1304 (872281) |
Ocean.xyz | 3,988,137 | 3,986,489 (865820) | 5308 (865820) | 3,990,301 (863471) | 9272 (863471) |
EMCDPool | 3,993,273 | 3,993,081 (781934) | 1080 (781934) | 3,993,428 (796046) | 1304 (796046) |
Pega Pool | 3,992,894 | 3,992,690 (783729) | 688 (783729) | 3,993,018 (781576) | 688 (781576) |
Titan | 3,992,974 | 3,992,926 (768641) | 696 (768641) | 3,993,020 (769939) | 696 (769939) |
KuCoin Pool | 3,993,282 | 3,993,101 (781030) | 1092 (781030) | 3,993,504 (796188) | 1316 (796188) |
Terra Pool | 3,993,032 | 3,992,863 (776927) | 844 (776927) | 3,993,172 (780396) | 844 (780396) |
CleanIncentive | 3,992,946 | 3,992,748 (823029) | 728 (823029) | 3,993,038 (822604) | 728 (822604) |
1THash | 3,993,276 | 3,993,085 (837937) | 1084 (837937) | 3,993,412 (814830) | 1084 (814830) |
NiceHash | 3,992,987 | 3,992,782 (789503) | 780 (789503) | 3,993,148 (785085) | 820 (785085) |
CKPool | 3,993,102 | 3,992,897 (863890) | 856 (863890) | 3,993,181 (822636) | 856 (822636) |
Figure 2: Line Chart of Coinbase Transaction Weights
This line chart shows the average, minimum, and maximum coinbase transaction weights for various mining pools.
Figure 3: Line Chart of Mining pool block Weights
This line chart shows the average, minimum, and maximum block weights for various mining pools.
Key Observations
- Most mining pools adhere to Bitcoin Core’s default setup, keeping coinbase transaction weights well below 4000 WU. However, two pools stand out:
- Ocean.xyz consistently uses larger coinbase transactions, with an average weight of 6,994 WU. Their smallest coinbase weight was 5,308 WU (in block 865820), and their largest reached 9,272 WU (block 863471). This suggests Ocean.xyz configures its node with a reduced
-blockmaxweight
setting, as their average block size is 3,986,489 WU, well below the default template size. - An Unknown Pool/miner also exceeded the default coinbase weight, averaging 7,432 WU, with a maximum of 7,864 WU but a very low block weight average which is unusual behavior.
- Ocean.xyz consistently uses larger coinbase transactions, with an average weight of 6,994 WU. Their smallest coinbase weight was 5,308 WU (in block 865820), and their largest reached 9,272 WU (block 863471). This suggests Ocean.xyz configures its node with a reduced
- F2Pool blocks have an average weight of 3,997,857 WU. For instance, block 779729 reached 3,998,554 WU with a coinbase weight of just 1,588 WU, showcasing F2 optimal use of the available block weight.
- The majority of pools—such as Foundry USA, Binance Pool, and AntPool—produce blocks averaging around 3,993,000 WU, consistent with Bitcoin Core’s current behavior. However, this depicts underutilization which is a direct result of the double-reservation bug.
- The small increase in the weights of the blocks among these pools suggests minor additions of transactions by miners after building a block template.
If the double-reservation issue is fixed, block templates will increase to 3,996,000 WU, aligning theoretical and actual limits. This change benefits pools by allowing full utilization of the block weight while preserving 4000 WU for coinbase transactions and other small additions.
Miners who need more space, such as Ocean.xyz, can still configure their nodes with a reduced -blockmaxweight
. For example, setting it to 3,999,000 WU frees up 1000 WU for larger coinbase transactions, ensuring compliance with consensus rules.
I think addressing this bug will enhance fairness across the mining pools and fix the ambiguity for developers working with the bitcoin core codebase.