Skip to content

bip54: additional coinbase fields for GBT#1

Closed
Sjors wants to merge 25 commits intomasterfrom
coinbase-fields
Closed

bip54: additional coinbase fields for GBT#1
Sjors wants to merge 25 commits intomasterfrom
coinbase-fields

Conversation

@Sjors
Copy link
Owner

@Sjors Sjors commented Jan 27, 2026

PR to self for initial feedback.

(initially this was intended as a separate BIP, now it's just an extension of bip54)

Copy link

@darosior darosior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One overall conceptual question i have is whether to mandate that nVersion MUST be set to a specific value given by the server when pools actively use it to transmit some job metadata to hashers. cc @average-gary maybe you have an opinion here

Comment on lines +54 to +55
The `coinbase_sequence` field specifies a value that MUST be used
for the coinbase transaction input's `nSequence` field.[^sequence]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent with the locktime field for the same reason as nVersion but also because it is given meaning by BIP 54.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the trade-off comment below: #1 (comment)

Unless miners are currently using this for something, which we should investigate, I'd rather make it safe for future soft forks.

If there's no miner use case right now, but they find one in the future, one can add a new field that adds bit flag, which then takes precedence over coinbase_sequence. Pending such a use case, that seems like needless complexity.

Comment on lines +64 to +65
that do not understand these fields may ignore them. However, they will produce
invalid blocks if [BIP 54](bip-0054.md) is activated, unless they independently

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a broader sentence "in case they are given meaning in the future, for instance with ..."?

Comment on lines +86 to +88
The `nLockTime` field could potentially be used as an `extraNonce`, which
downstream software may need to roll. However, BIP 54 activation would rule
out this use case. It requires an `nLockTime` that's interpreted as a height

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a valid "use case". As has been discussed at length, it's extremely theoretical. Much more relevant i think would be MARA's and f2pool's actual use of nLockTime for actually useful purposes.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll link to discussions for both, although the chart you link to gives me no clue on what these pools are doing.

I don't think this BIP should adjudicate use cases. The question is whether downstream software should be able to modify the field, even for bad reasons, or whether it MUST use the value provided by the node.

The trade-off is that if we say MUST, it will work for any future soft fork, but restricts what miners can do now.

Copy link
Owner Author

@Sjors Sjors Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a Stack Exchange post that explains the nLockTime use: https://bitcoin.stackexchange.com/a/119370/4948

Comment on lines +91 to +92
[^sequence]: **Why not use a bit mask?**
The only restriction BIP 54 proposes for `nSequence` is to disallow

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fairly BIP 54 centric, whereas my understanding this BIP intends to cover forward compatibility more broadly?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than BIP54, is there any other proposal with specific rules for this field?

Requiring clients to use nSequence as provided is the most flexible, when it comes to future soft forks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so but i think it's good to be as general as possible.

is the most flexible

i agree

@Sjors
Copy link
Owner Author

Sjors commented Jan 27, 2026

Regarding nVersion, clients should be allowed to modify:

  • the signalling bits; and
  • the BIP320 bits

I'll adjust the text for that.

(confused block version and coinbase version)

@darosior
Copy link

the signalling bits; and

Hmm? Is this mixing up block version and tx version?

@Sjors
Copy link
Owner Author

Sjors commented Jan 27, 2026

Yes, I got those confused.

For all three fields, there's a triangle trade-off:

  • allow any future soft fork (clients MUST use the field)
  • allow miners to tweak things (client MAY use the field, enumerate restrictions that miners MUST use)
  • complexity of the standard and implementation

My general thinking about that trade-off is to:

  1. Allow existing miner use cases at the expense of soft fork flexibility
  2. Prioritize soft fork flexibility otherwise
  3. Keep it simple, since new BIP22 fields can be added to superseede existing ones

jurvis and others added 4 commits February 4, 2026 12:58
…oin#2004)

* Add Chaincode Delegation BIP

* Update license to BSD-3-Clause and expand blinded signing documentation

* Address initial PR comments

* Update with BIP number assignment

* Fix delegator_sign test vector

* Upgrade secp256k1lab and add license file

- Upgrade vendored secp256k1lab to commit a265da1 (adds type annotations)
- Add COPYING file to satisfy MIT license requirements
- Document secp256k1lab commit reference in BIP text

* Fix type checker and linter issues in reference implementation

- Fix TweakContext to use Scalar types for gacc/tacc
- Replace HashFunction enum with Callable type alias
- Fix bytearray to bytes conversion in blind_sign
- Move imports to top of file
- Fix boolean comparison style (use 'not' instead of '== False')
- Add proper type annotations and casts for dict handling
- Remove unused imports and type ignore comments

* Address PR review comments on terminology and clarity

- Add intro explaining delegation naming (chain code is delegated, not
  signing authority)
- Reorder terminology to list Delegator before Delegatee
- Replace "quorum" with clearer "can co-sign for UTXOs" language
- Clarify derivation constraints in terms of delegatee's extended key
- Rename "Delegatee Signing" section to "Signing Modes"
- Fix "delegatee can apply" to "delegator can produce" (line 112)
- Replace undefined "caller" with "delegatee" (line 173)
- Clarify "Change outputs" to "Tweaks for change outputs" (line 98)
- Add note that message is separate from CCD bundle
- Add note on application-specific verification (addresses, amounts)
- Add transition sentence clarifying non-concurrent protocol scope

* Add changelog entry for 0.1.3

* Fix header: use Authors (plural) for multiple authors

* Fix BIP header format for CI compliance

- Change Type from 'Standards Track' to 'Specification' (valid type)
- Change 'Created' to 'Assigned' (correct field name per BIP format)
- Change 'Post-History' to 'Discussion' (recognized field in buildtable.pl)

* Apply suggestion from @murchandamus

---------

Co-authored-by: Jesse Posner <jesse.posner@gmail.com>
* Reduced Data Temporary Softfork

* BIP-RDTS: update and expand according to PR feedback

* BIP-RDTS: minor updates to wording to address feedback

* Address PR comments: update Reference Implementation and Deployment

* Address PR comments: Clarify deployment name and bit

* Address PR comments: Update BIP number, creation date, and README entry

* Address @murchandamus X comment: Add activation threshold

* Address PR comments: Update to BIP-3; clarify rationale and deployment

* Address PR comments: Clarify scriptPubKey limit rationale and LOCKED_IN behavior
@Sjors
Copy link
Owner Author

Sjors commented Feb 9, 2026

I changed the approach to just expanding BIP54. This gets rid of the triangle complexity since inside the BIP54 text we can just assume BIP54 is there.

I'm still including version so we get completeness, but it's marked as SHOULD.

If you want, please take another look and then I'll open it upstream.

@Sjors Sjors changed the title Add BIP-xxxx: additional coinbase fields for GBT bip54: additional coinbase fields for GBT Feb 9, 2026
@darosior
Copy link

darosior commented Feb 9, 2026

I don't think this should go in BIP 54. This is purely informational and not going to matter for anyone upgrading their pool on any reasonable timeline, and GBT extensions should have their own BIP (see Segwit for instance)

@Sjors
Copy link
Owner Author

Sjors commented Feb 9, 2026

I don't think the SegWit (only) historical precedent means we have to make it a separate BIP. It was a more complicated extension, including a new transaction format.

Extending BIP54 fits naturally, given the existing text:

We encourage mining pools to update their software to craft coinbase transactions that are forward-compatible with the changes proposed in this BIP.

This text explains how to actually do that.

The above confusion made it clear to me that writing it as an independent BIP gets confusing.

not going to matter for anyone upgrading their pool on any reasonable timeline

If bitcoin/bitcoin#34419 makes it into v31 then pools can start setting these values in a forward compatible manner as soon as its released.

@darosior
Copy link

darosior commented Feb 9, 2026 via email

@Sjors
Copy link
Owner Author

Sjors commented Feb 9, 2026

Done in bitcoin#2097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants