[wallet] Support CMV signing of 17~20 key template #11545

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:20of20 changing 2 files +41 −7
  1. instagibbs commented at 3:09 pm on October 21, 2017: member
    Useful in cases where a larger signing set is possible than legacy p2sh(segwit v0?), and for general testing.
  2. Support CMV signing of 17~20 key template ffee424de3
  3. instagibbs renamed this:
    Support CMV signing of 17~20 key template
    [wallet] Support CMV signing of 17~20 key template
    on Oct 21, 2017
  4. jonasschnelli added the label Wallet on Oct 23, 2017
  5. in src/script/standard.cpp:166 in ffee424de3
    165                     char n = (char)CScript::DecodeOP_N(opcode1);
    166                     vSolutionsRet.push_back(valtype(1, n));
    167-                }
    168-                else
    169+                } else if (opcode1 == 0x01 && CScriptNum(vch1, true).getint() > 16 && CScriptNum(vch1, true).getint() <= 20) {
    170+                    // Handle single-byte pushes followed by values from 17 up to 20 for 20-of-20 CMV
    


    TheBlueMatt commented at 4:10 pm on October 24, 2017:
    Dont you mean CM not CMVerify?
  6. in src/script/standard.cpp:165 in ffee424de3
    164+                    (opcode1 >= OP_1 && opcode1 <= OP_16)) {
    165                     char n = (char)CScript::DecodeOP_N(opcode1);
    166                     vSolutionsRet.push_back(valtype(1, n));
    167-                }
    168-                else
    169+                } else if (opcode1 == 0x01 && CScriptNum(vch1, true).getint() > 16 && CScriptNum(vch1, true).getint() <= 20) {
    


    TheBlueMatt commented at 9:43 pm on November 2, 2017:
    Do we handle scriptnum_error here?

    instagibbs commented at 5:29 pm on November 3, 2017:
    it should be a single byte being read in here, yes? I’m not as knowledgeable on Bitcoin script numerics.

    TheBlueMatt commented at 9:25 pm on November 3, 2017:
    Hmm? I’m referring to the fact that CScriptNum will throw scriptnum_error here if vch1 is {0x80} (ie negative 0).
  7. TheBlueMatt commented at 9:43 pm on November 2, 2017: member
    Concept ACK, I suppose.
  8. TheBlueMatt commented at 10:22 pm on December 17, 2017: member
    Will break the blind casting at https://github.com/bitcoin/bitcoin/blob/62fdf9b07087b80d2142799bdd2324f61483359d/src/script/standard.cpp#L244 (moves to validateaddress’ DescribeAddressVisitor in #11403).
  9. instagibbs commented at 6:12 pm on March 6, 2018: member
    closing as this is broken, and I am not going to fix
  10. instagibbs closed this on Mar 6, 2018

  11. sipa commented at 3:32 am on May 9, 2018: member
    Doing some refactoring first: #13194
  12. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me