Add CMR to compiler JSON output#231
Merged
apoelstra merged 1 commit intoBlockstreamResearch:masterfrom Mar 17, 2026
Merged
Conversation
stringhandler
approved these changes
Mar 12, 2026
Contributor
stringhandler
left a comment
There was a problem hiding this comment.
Good idea. This is possible already with hal-simplicity. but that is a whole other binary.
Collaborator
|
@0ceanSlim could you please sign your GPG sign your commit? Then I can merge. https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
delta1
added a commit
to delta1/SimplicityHL
that referenced
this pull request
Mar 13, 2026
ddaabe0 Add CMR to compiler output (0ceanslim) Pull request description: The compiler currently outputs only the program binary (base64). Callers deploying programs on-chain also need the Commitment Merkle Root (CMR) to: - Derive the taproot address (P2TR scriptPubKey) - Build the control block for script-path spending Without CMR in the output, callers must reimplement the entire commitment hash computation externally. Since the CMR is already computed internally during compilation, this patch exposes it by adding a cmr field (hex string) to both the Output struct and the JSON output (--json flag). The human-readable display also prints it. The change is non-breaking — existing callers that ignore unknown JSON fields are unaffected. ACKs for top commit: delta1: ACK ddaabe0; tested locally, adds CMR to the output Tree-SHA512: 6640d185acdabd22dc49444bf162de8647ad325a85de193b86cf42156b04cd1b527c0c3db40e9d6b3408cd878a39488c289b9b5d5dfb1cb91dab4e8fae120ea7
b9fd5b0 to
8ab4613
Compare
Contributor
Author
|
All done. I initially made a new verified commit but then realized you needed the pr rebased to sign the initial commit. Looks good now. Thanks! |
8ab4613 to
5c63de2
Compare
Contributor
|
In 8ab4613: This commit was empty, so I took the liberty of removing it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The compiler currently outputs only the program binary (base64). Callers deploying programs on-chain also need the Commitment Merkle Root (CMR) to:
Without CMR in the output, callers must reimplement the entire commitment hash computation externally. Since the CMR is already computed internally during compilation, this patch exposes it by adding a cmr field (hex string) to
both the Output struct and the JSON output (--json flag). The human-readable display also prints it. The change is
non-breaking — existing callers that ignore unknown JSON fields are unaffected.