-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add a BIP to define 24 bits of nVersion as nonce space not 16 #2116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||||
| <pre> | ||||||||
| BIP: ? | ||||||||
| Title: 24 nVersion bits for general purpose use | ||||||||
| Author: Matt Corallo <bips@bluematt.me> | ||||||||
| Status: Draft | ||||||||
| Type: Specification | ||||||||
| Created: 2026-02-26 | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| License: BSD-3-Clause | ||||||||
| CC0-1.0 | ||||||||
|
Comment on lines
+8
to
+9
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since BIP3 deployed, we are using License Expressions for the License header values: https://github.com/bitcoin/bips/blob/master/bip-0003.md#specification-1
Suggested change
|
||||||||
| Replaces: 320 | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw that this was discussed on the mailing list. Please add a Discussion header:
Suggested change
Please also add the corresponding |
||||||||
| </pre> | ||||||||
|
|
||||||||
| ==Abstract== | ||||||||
|
|
||||||||
| 24 bits are reserved in the nVersion field as extra nonce space for miners, providing for additional hashrate with header-only mining without relying on rolling nTime more often than once per second. | ||||||||
|
|
||||||||
| ==Motivation== | ||||||||
|
|
||||||||
| BIP 320 defined 16 bits of nVersion as nonce space for additional nonce space. It turns out that this isn't enough, as some devices have started using 7 bits from nTime for extra nonce space (see https://github.com/stratum-mining/sv2-spec/discussions/187). Given there's limited utility in 16 bits of nVersion space for signaling, instead here we offer 24 bits of nVersion space as extra nonce space. | ||||||||
|
|
||||||||
| ==Specification== | ||||||||
|
|
||||||||
| 24 bits from the block header nVersion field, starting from 5 and ending at 28 inclusive (0x1fffffe0), are reserved for nonce use and removed from BIP8 and BIP9 specifications. A mask of 0xe000001f should be applied to nVersion bits so bits 5-28 inclusive will be ignored for soft-fork signalling and unknown soft-fork warnings. | ||||||||
|
|
||||||||
| ==Rationale== | ||||||||
|
|
||||||||
| Headers-only mining avoids mining devices (either ASICs or the firmware) from having to concern itself with the vast space of consensus logic (handling transactions, merkle trees, etc). It is widely deployed in ASICs, but requires a substantial number of jobs fed across an entire device, keeping the ASIC controller busy. Providing additional nonce space for the ASICs to roll without needing fresh work from the controller may simplify ASIC design somewhat, and as been apparently adopted in some miners by using extra space in nTime as extra nonce space. Doing so in nVersion instead is preferable to using nTime. | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Also, for legibility of review comments, it would be preferable if you limited the length of the lines in the document. |
||||||||
|
|
||||||||
| ==Backwards Compatibility== | ||||||||
|
|
||||||||
| Non-upgraded nodes will interpret the reserved bits of this proposal as signals for soft forks, and may additionally activate the warning system for unknown soft forks. | ||||||||
|
|
||||||||
| At the time of writing no known soft forks are pending using any of 24 bits reserved in this BIP, and given that a non-trivial percentage of the hashrate is already making uses of those bits, future soft forks SHOULD NOT utilize those bits for activation signalling. | ||||||||
|
|
||||||||
| ==Acknowledgements== | ||||||||
|
|
||||||||
| Timo Hanke and Sergio Lerner for originally proposing 15-bit extra nNonce2. Btc Drak for writing BIP 320. | ||||||||
|
|
||||||||
| ==Changelog== | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: It would be preferable to only add this section when it has content. |
||||||||
|
|
||||||||
| ==Copyright== | ||||||||
|
|
||||||||
| This document is dual licensed as BSD 3-clause, and Creative Commons CC0 1.0 Universal. | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.