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

policy: Add new constant MAX_STANDARD_MULTISIG_KEYS #6902

Closed
wants to merge 1 commit into from
Closed

policy: Add new constant MAX_STANDARD_MULTISIG_KEYS #6902

wants to merge 1 commit into from

Conversation

dajohi
Copy link
Contributor

@dajohi dajohi commented Oct 29, 2015

No description provided.

// Support up to x-of-3 multisig txns as standard
if (n < 1 || n > 3)
// Support up to x-of-MAX_STANDARD_MULTISIG_KEYS multisig txns as
// standard
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe Support up to m-of-MAX_ ... (note, the m, not x)

@dcousens
Copy link
Contributor

utACK

@dajohi
Copy link
Contributor Author

dajohi commented Oct 29, 2015

@dcousens Agree. Updated.

@laanwj
Copy link
Member

laanwj commented Oct 30, 2015

Trivial ACK

@gmaxwell
Copy link
Contributor

I think the result of this is confusing, if you go read policy.h post patch you think that bitcoin multisig will not allow more keys. But this isn't true, the restriction is specific to bare multisig-- something virtually no one cares about-- which was more or less apparent from the code in context but isn't otherwise; and in the updated version the new comment is arguably outright factually incorrect.

FWIW, the constant movement of trivial bits of code behavior across multiple files is very frustrating to me. The net result of this is that I am less likely to review future changes that changes around that test in IsStandard, because I have to go scatter and read many different files (which involves first figuring out where its defined) to have any idea of what the code actually does.

@luke-jr
Copy link
Member

luke-jr commented Oct 30, 2015

IMO this should become an option or bare multisig made unconditionally non-IsStandard.

@sipa
Copy link
Member

sipa commented Oct 30, 2015

@gmaxwell Seems that at least the comment should be fixed to say it's about bare multisig.

* The maximum number of public keys allowed in a multi-signature transaction
* output script to be considered standard.
*/
static const unsigned int MAX_STANDARD_MULTISIG_KEYS = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe MAX_STANDARD_BARE_MULTISIG_KEYS, in light of @gmaxwell's comment

@dcousens
Copy link
Contributor

Agreed the indirection of extracting constants can be frustrating for review, but, IMHO the only [equally balanced] alternative is to remove the constants themselves.

This is probably an exception though, given it is a 1:1 mapping and the motivation for extraction is solely a style choice.
I think the underlying question should be: if we are encouraging [already motivated] users to modify these constants (by extracting them all to 1 place), should we be pointing them at tweaking constants, or tweaking the policy code itself?

If we have an answer to that, this could be a trivial ACK or NACK.

@laanwj laanwj closed this Nov 2, 2015
@laanwj
Copy link
Member

laanwj commented Nov 2, 2015

Too controversial for a trivial change, closing

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants