-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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-325: correct placement of challenge #1005
Conversation
Ping @ajtowns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I guess that was either a copy and paste error, or leftover from the previous approach?
bip-0325.mediawiki
Outdated
@@ -60,8 +60,10 @@ The "to_sign" transaction is: | |||
vin[0].prevout.hash = to_spend.txid | |||
vin[0].prevout.n = 0 | |||
vin[0].nSequence = 0 | |||
vin[0].sigScript = [ signet_challenge first data push, if any ] | |||
vin[0].scriptWitness = [ signet_challenge second data push, if any ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are from the signet solution, not the signet challenge, and there's only a single data push of the serialization of the scriptSig and and scriptWitness concatenated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh, I meant the signet solution.
There's a single push, of the 1-2 pushes of sigScript followed by optional scriptWitness, right? That's what I'm referring to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, I meant the solution, not challenge.
ccbb7bf
to
fd50eea
Compare
bip-0325.mediawiki
Outdated
@@ -60,8 +60,10 @@ The "to_sign" transaction is: | |||
vin[0].prevout.hash = to_spend.txid | |||
vin[0].prevout.n = 0 | |||
vin[0].nSequence = 0 | |||
vin[0].sigScript = [ signet_solution first data push, if any ] | |||
vin[0].scriptWitness = [ signet_solution second data push, if any ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vin[0].scriptWitness = [ signet_solution second data push, if any ] | |
vin[0].scriptWitness = [ signet_solution scriptWitness (y bytes), if any ] |
Maybe refer to it with the length to avoid the "data push" confusion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
fd50eea
to
bb989a6
Compare
Looks good to me |
Ping @luke-jr |
In #1003 (comment) (where I adopt the approach here), it is pointed out that the message signature going into the scriptPubKey of the spending transaction is weird.
It should go into the scriptSig and/or scriptWitness, and the scriptPubKey for the spending tx is OP_RETURN.