bitcoin/src/policy
Andrew Chow 8ff90d9dcf
Merge bitcoin/bitcoin#26291: Update MANDATORY_SCRIPT_VERIFY_FLAGS
1b09cc5959 Make post-p2sh consensus rules mandatory for tx relay (Anthony Towns)
69c31bc748 doc, policy: Clarify comment on STANDARD_SCRIPT_VERIFY_FLAGS (Anthony Towns)

Pull request description:

  The `MANDATORY_SCRIPT_VERIFY_FLAGS` constant was introduced in #3843 to distinguish between block consensus rules and relay standardness rules. However it was not actually used in the consensus code path: instead it only differentiates between the failure being reported as `TX_CONSENSUS` and `mandatory-script-verify-flag-failed` vs `TX_NOT_STANDARD` and `non-mandatory-script-verify-flag`.

  This updates the list of mandatory flags to include the post-p2sh soft forks that are enforced as consensus rules via `GetBlockScriptFlags()`. The effect of this change is that validation.cpp will report `TX_CONSENSUS` failures for txs that fail dersig/csv/cltv/nulldummy/witness/taproot checks, instead of `TX_NOT_STANDARD`, which in turn adds `Misbehaving(100)` via `MaybePunishNodeForTx` in `net_processing`.

ACKs for top commit:
  Sjors:
    Code review ACK 1b09cc5959
  darosior:
    ACK 1b09cc5959
  achow101:
    ACK 1b09cc5959
  theStack:
    Concept and code-review ACK 1b09cc5959

Tree-SHA512: d3e5868e8cece478f2e934956ba0c231d8bb9c2daefd0df1f817774e292049902cfc1d0cd76dbd2e7722627a93eab2d7046ff678199aac70a2b01642e69349f1
2023-08-23 16:19:39 -04:00
..
feerate.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
feerate.h feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee 2023-06-19 14:36:14 -04:00
fees_args.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
fees_args.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
fees.cpp tx fees, policy: doc: update and delete unnecessary comment 2023-08-17 11:09:14 +01:00
fees.h tx fees, policy: doc: update and delete unnecessary comment 2023-08-17 11:09:14 +01:00
packages.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
packages.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
policy.cpp Rename script/standard.{cpp/h} to script/solver.{cpp/h} 2023-08-14 17:39:49 -04:00
policy.h Make post-p2sh consensus rules mandatory for tx relay 2023-08-18 00:59:27 +10:00
rbf.cpp Merge bitcoin/bitcoin#26289: Use util::Result in for calculating mempool ancestors 2023-01-03 16:30:55 -05:00
rbf.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
settings.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
settings.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00