Skip to content
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

bip-0325: clarify the OP_TRUE challenge special case #983

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

kallewoof
Copy link
Member

While OP_TRUE challenges have been implicitly accepted until now, it was never defined exactly how these should be solved. This adds an exception for the case where the challenge is OP_TRUE, that the solution must be absent. I.e. not even an empty signet commitment may be present, or the block should be considered invalid.

Pros: this means a signet node with challenge OP_TRUE works exactly the same as testnet/mainnet, in terms of block generation (i.e. generate* RPC functions in Bitcoin Core can be used out of the box).

bip-0325.mediawiki Outdated Show resolved Hide resolved
@kallewoof kallewoof force-pushed the 202008-signet-empty-commitment branch from cefb70f to a96f481 Compare August 29, 2020 13:27
@kallewoof kallewoof force-pushed the 202008-signet-empty-commitment branch from a96f481 to dfe1d77 Compare August 29, 2020 13:31
@kallewoof
Copy link
Member Author

@luke-jr At your convenience, please merge.

@luke-jr luke-jr merged commit bdb297a into bitcoin:master Sep 1, 2020
@harding
Copy link
Contributor

harding commented Sep 4, 2020

@kallewoof sorry I didn't review this when it was open, but the text in the patch doesn't match the OP in your PR description. The PR description states "where the challenge is OP_TRUE, that the solution must be absent" (my emphasis). The patch says, "if a block's challenge is e.g. OP_TRUE (0x51) [...] the block is also considered valid if the signet commitment is absent."

In short, I read the first as "MUST be absent" and the second as "MAY be absent".

I don't think the difference matters if the only goal is for things like the generate RPC to be usable---but if the goal is also for existing tools to be able to validate OP_TRUE signets, then perhaps "MUST be absent" is required.

@maflcko
Copy link
Member

maflcko commented Sep 5, 2020

existing tools will ignore the commitment anyway, so if it is absent or present shouldn't matter, no?

@harding
Copy link
Contributor

harding commented Sep 5, 2020

@MarcoFalke I think you are correct and I see now that there was a resolved discussion on this PR between you and @kallewoof about this, which explains the reason for the discrepancy between the PR description and the actual change. Thanks!

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.

4 participants