Skip to content

Conversation

@jl2012
Copy link
Contributor

@jl2012 jl2012 commented Sep 19, 2016

This is an alternative to #8755 and #8654

This implements a static estimation of sighash size for a transaction. A transaction with more than 90bytes of sighash per weight is non-standard. This is equivalent to 36MB for an 100kB non-segwit transaction, or 360MB for a block in the worst case. All existing standard transactions with legitimate use of CHECK(MULTI)SIG should remain standard with this limit.

The estimation of sighash is based on the assumption that SignatureHash is performed once only for each signature within a CHECKMULTISIG. This PR does not depend on any other policy or softforks like those in #8755. Despite the counting is more conservative, legitimate standard transactions for #8755 should also be standard in this implementation.

Todo: unit tests

@jl2012 jl2012 force-pushed the sighashpolicylite branch 2 times, most recently from 63db0c6 to ed71079 Compare September 19, 2016 11:00
@laanwj laanwj added the P2P label Sep 21, 2016
@jl2012
Copy link
Contributor Author

jl2012 commented Sep 21, 2016

@jl2012 jl2012 changed the title Implement excessive sighashing protection policy with conservative counting Implement excessive sighashing protection policy with loose sighash estimation Sep 30, 2016
@jl2012
Copy link
Contributor Author

jl2012 commented Sep 30, 2016

Unit tests are completed and related BIP updated

This implements a static estimation of sighash size for a transaction. A transaction with more than 90bytes of sighash per weight is non-standard. This is equivalent to 36MB for an 100kB non-segwit transaction, or 360MB for a block in the worst case. All transactions below 100kB with legitimate use of CHECK(MULTI)SIG should remain standard with this limit.
This makes sure that SignatureHash is performed once only for each signature within a CHECKMULTISIG. Alternative to bitcoin#8654.
@jl2012 jl2012 force-pushed the sighashpolicylite branch from 5cd44e8 to 3d3337a Compare October 27, 2016 18:06
@jl2012 jl2012 force-pushed the sighashpolicylite branch from 3d3337a to e20b6c6 Compare October 28, 2016 08:48
@jl2012
Copy link
Contributor Author

jl2012 commented Dec 23, 2016

closed in favor of #8755

@jl2012 jl2012 closed this Dec 23, 2016
@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.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants