Skip to content

BIP 440, 441: revise costs from measured primitives - #2358

Open
jmoik wants to merge 3 commits into
bitcoin:masterfrom
jmoik:gsr-440-441
Open

jmoik wants to merge 3 commits into
bitcoin:masterfrom
jmoik:gsr-440-441

Conversation

@jmoik

@jmoik jmoik commented Nov 16, 2026 •

Copy link
Copy Markdown

Update to BIP 440 and BIP 441 (version 0.3.0).

BIP 440:

  • only Tapleaf 0xc2 inputs fund the budget; legacy, witness v0, key path and Tapleaf 0xc0 inputs no longer do
  • flat cost for every opcode and literal push
  • variable costs composed from measured primitives, priced from benchmarks on several machines
  • one SIGCHECK per elliptic curve operation
  • security considerations for the shared budget

BIP 441:

  • opcode costs composed from BIP 440's primitives
  • five opcode definitions corrected
  • states that BIP 342's sigops budget does not apply
  • security considerations

@murchandamus murchandamus added the BIP Update by Owner PR by Author or Deputy to modify their own BIP label Nov 16, 2026

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Concept ACK. Are you looking for reviews from any particular people, or independent/additional benchmarks on hardware?

@jmoik

jmoik commented Nov 17, 2026

Copy link
Copy Markdown
Author

Concept ACK. Are you looking for reviews from any particular people, or independent/additional benchmarks on hardware?

An interesting benchmark would be from a non Apple Arm64 chip like a Snapdragon X, but I don't think it's required for this PR, the exact values can easily be adjusted in the future, and since each price covers the slowest of the existing seven machines, any additional machine would only change a price if it is slower than all of the existing ones, relative to its own reference workload, which is unlikely.

I would be delighted to see review by @ajtowns, @instagibbs, @darosior, who showed interest in the budget in the past, but from our side this is ready.

this page also summarizes and visualizes the calibration:
https://jmoik.github.io/varopsData/report/calibration.html

@murchandamus

Copy link
Copy Markdown
Member

Concept ACK

I would be delighted to see review by @ajtowns, @instagibbs, @darosior, who showed interest in the budget in the past, but from our side this is ready.

Okay, let’s keep this open for a couple weeks or so, but happy to merge it when you want it merged.

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

Labels

BIP Update by Owner PR by Author or Deputy to modify their own BIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants