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

Several updates to BIP62 #117

Closed
wants to merge 10 commits into from
Closed

Several updates to BIP62 #117

wants to merge 10 commits into from

Conversation

sipa
Copy link
Member

@sipa sipa commented Nov 5, 2014

No description provided.

sipa added 2 commits October 26, 2014 00:48
Clarify that BIP62 rule 6 (clean stack) only applies after potential P2SH redeemscript evaluation.
Applying it before the redeemscript evaluation means that every P2SH script will fail it,
as P2SH by definition uses an unclean stack (to specify the redeemscript inputs).
* All transactions in v3 blocks are required to follow rules #1-#2.
* v3 (and higher) transactions in v3 blocks are required to follow rules #3-#7 as well.
* All transactions in v3 blocks are required to follow rules #1 and #2.
* v2 transactions in v3 blocks are required to follow rules #3-#7 as well. Transactions with version 1 or a version higher than 2 do not have this requirement, even when in a v3 block.
Copy link
Member

Choose a reason for hiding this comment

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

Seems to me the permanent rules should be #1 and #3. It's conceivable we may at some point want executable scriptSig content...

Copy link
Member Author

Choose a reason for hiding this comment

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

Not requiring #2: If it's controversial, we should drop the requirement, but I really no reason.
Requiring #3: no. There may be existing P2SH scripts (unknown to the senders) which do a non-compliant push (for example for the multisig counts).

Copy link
Contributor

Choose a reason for hiding this comment

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

@luke-jr I've got a use-case for executable scriptSig content to be able to sign how much fees a tx spends, among many other cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

And yeah, I think only allowing pushdata ops in P2SH scriptSigs was a mistake.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, removed rule 2 being mandatory.

@sipa
Copy link
Member Author

sipa commented Nov 8, 2014

Removed the hashtype requirement (as it's not required for malleability protection, and may be useful otherwise), and added a clarification that even non-evaluated CHECKMULTISIG signatures need to be strict DER (even though the implementation of the opposite is easier, the semantics become more complex to explain). Thanks to @petertodd for pointing that out.

@sipa sipa force-pushed the only3 branch 2 times, most recently from fd45435 to 5163846 Compare November 9, 2014 11:34
@laanwj
Copy link
Member

laanwj commented Dec 16, 2014

Needs rebase

@laanwj
Copy link
Member

laanwj commented Mar 11, 2015

Stil needs rebase (or close, if no longer relevant).

@laanwj
Copy link
Member

laanwj commented Dec 8, 2015

Closing this - IIRC BIP62 is retracted

@laanwj laanwj closed this Dec 8, 2015
luke-jr pushed a commit to luke-jr/bips that referenced this pull request Jun 6, 2017
We dropped reference 1 and 2 during the split, and the offset
numbering is causing a bit of head-scratching. This renumbers the
reference.

Closes bitcoin#117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants