forked from CounterpartyXCP/counterparty-lib
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
Bytespersigop
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
938febd
to
6f7680b
Compare
desired_input_count = 1 | ||
|
||
if encoding == 'multisig' and data_output and util.enabled('bytespersigop'): | ||
desired_input_count = len(data_output) * 2 |
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.
given that data_output = (data_array, data_value)
, do you mean desired_input_count = len(data_output[0]) * 2
??
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.
was supposed to be len(data_array)
7aa0927
to
ee2d1dc
Compare
…cast text messages. the old way had an issue when the string was exactly the switch point (52), because it turned into a 53 long string (+1 from length byte) and that resulted in length byte becoming part of the result. now always use a varint to specify the length.
40de8b7
to
cd455e2
Compare
…ctly-52chars-varstring Problem with broadcast text exactly 52 chars! (PROTOCOL CHANGE)
…-missing-tag cleanup `destroy.parse` and add unittests for it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
In Bitcoin Core v0.12.1 a PR was merged to add
-bytespersigop
which limits the ratio of sigops:bytes.This DOS protection uses a shortcut way of counting sigops which counts OP_CHECKMULTISIG as 20 sigops (the max allowed) and results in CP TXs that use multisig encoding not being relayed and mined by v0.12.1 nodes (when > 80 bytes it no longer fits in opreturn).
this is an edge case, there's been 250 CP TXs with > 80 bytes in the history of CP;
I'm talking to core devs to get this fixed in core, hopefully for the next release, but before v0.12.1 is widely adopted we need a fix for this that we keep in place until v0.12.1 is phased out.
This PR consists of 2 fallbacks to deal with this problem: