HomePhabricator

Add a flag that update default datacarriersize to 220 byte

Description

Add a flag that update default datacarriersize to 220 byte

Summary: To disincentivize the use of other methods to embed data into the chain, in particular via P2SH, the default datacarriersize is raised from 80 byte to 220 byte, so it becomes the "cheapest" way of embedding data into the chain. The default value is changed when a flag is passed to IsStandardTx

Test Plan:

  1. Check, if a script with max custom provided payload size is considered standard, with and without the flag
  2. Check, if a script with max custom provided payload size + 1 is considered non-standard, with and without the flag
  3. Check, if a script with max old default payload size (83 byte total) is considered standard, when the HF is not active
  4. Check, if a script with max old default payload size + 1 (84 byte total) is considered non-standard, when the HF is not active
  5. Check, if a script with max new default payload size (223 byte total) is considered standard, when the HF is active
  6. Check, if a script with max new default payload size + 1 (224 byte total) is considered non-standard, when the HF is active

Via: make check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, dexX7, schancel, matiu

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, dexX7, schancel, matiu

Subscribers: jasonbcox, matiu, schancel, deadalnix, teamcity

Maniphest Tasks: T302

Differential Revision: https://reviews.bitcoinabc.org/D1158

Details

Provenance
dexX7Authored on Mar 15 2018, 16:54
deadalnixCommitted on Mar 16 2018, 13:29
deadalnixPushed on Mar 16 2018, 13:30
Reviewer
Restricted Owners Package
Differential Revision
D1158: Add a flag that update default datacarriersize to 220 byte
Parents
rABCcbaa7fe447d2: Various nits in policy.cpp
Branches
Unknown
Tags
Unknown