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

P2PKH output script: OP_EQUAL vs. OP_EQUALVERIFY #1100

Open
RequestPrivacy opened this issue Mar 22, 2024 · 2 comments
Open

P2PKH output script: OP_EQUAL vs. OP_EQUALVERIFY #1100

RequestPrivacy opened this issue Mar 22, 2024 · 2 comments

Comments

@RequestPrivacy
Copy link

RequestPrivacy commented Mar 22, 2024

Hello,

I'm going through "Mastering Bitcoin 3th ed." and on page 65 the following output script is printed as an explanation:

OP_DUP OP_HASH160 <Bob's commitment> OP_EQUAL OP_CHECKSIG

4 lines below input and output script are printed together as follows

<sig> <pubkey> OP_DUP OP_HASH160 <commitment> OP_EQUALVERIFY OP_CHECKSIG

Notice the use of OP_EQUAL in the first vs. OP_EQUALVERIFY in the second.

Is this an error as other mentions of such an output script is also with OP_EQUALVERIFY e.g. here:

OP_DUP OP_HASH160 <Key Hash> OP_EQUALVERIFY OP_CHECKSIG

@harding
Copy link
Contributor

harding commented Mar 22, 2024

Hi @RequestPrivacy . It does indeed look like the first script should use OP_EQUALVERIFY. Good catch, thanks!

@RequestPrivacy
Copy link
Author

Thank you for the confirmation and work on the fantastic book!

RequestPrivacy added a commit to RequestPrivacy/bitcoinbook that referenced this issue Mar 29, 2024
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

No branches or pull requests

2 participants