mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 22:19:39 +01:00
Merge bitcoin/bitcoin#32521: policy: make pathological transactions packed with legacy sigops non-standard
96da68a38fqa: functional test a transaction running into the legacy sigop limit (Antoine Poinsot)367147954dqa: unit test standardness of inputs packed with legacy sigops (Antoine Poinsot)5863315e33policy: make pathological transactions packed with legacy sigops non-standard. (Antoine Poinsot) Pull request description: The Consensus Cleanup soft fork proposal includes a limit on the number of legacy signature operations potentially executed when validating a transaction. If this change is to be implemented here and activated by Bitcoin users in the future, we should make transactions that are not valid according to the new rules non-standard first because it would otherwise be a trivial DoS to potentially unupgraded miners after the soft fork activates. ML post: https://gnusha.org/pi/bitcoindev/49dyqqkf5NqGlGdinp6SELIoxzE_ONh3UIj6-EB8S804Id5yROq-b1uGK8DUru66eIlWuhb5R3nhRRutwuYjemiuOOBS2FQ4KWDnEh0wLuA=@protonmail.com/T/#u ACKs for top commit: instagibbs: reACK96da68a38fmaflcko: review ACK96da68a38f🚋 achow101: ACK96da68a38fglozow: light code review ACK96da68a38f, looks correct to me Tree-SHA512: 106ffe62e48952affa31c5894a404a17a3b4ea8971815828166fba89069f757366129f7807205e8c6558beb75c6f67d8f9a41000be2f8cf95be3b1a02d87bfe9
This commit is contained in:
@@ -35,6 +35,12 @@ from test_framework.script import (
|
||||
hash160,
|
||||
)
|
||||
|
||||
# Maximum number of potentially executed legacy signature operations in validating a transaction.
|
||||
MAX_STD_LEGACY_SIGOPS = 2_500
|
||||
|
||||
# Maximum number of sigops per standard P2SH redeemScript.
|
||||
MAX_STD_P2SH_SIGOPS = 15
|
||||
|
||||
# To prevent a "tx-size-small" policy rule error, a transaction has to have a
|
||||
# non-witness size of at least 65 bytes (MIN_STANDARD_TX_NONWITNESS_SIZE in
|
||||
# src/policy/policy.h). Considering a Tx with the smallest possible single
|
||||
|
||||
Reference in New Issue
Block a user