scripted-diff: Rename key size consts to be relative to their class #12461

pull Empact wants to merge 2 commits into bitcoin:master from Empact:key-size-consts changing 8 files +45 −45
  1. Empact commented at 8:39 PM on February 16, 2018: member

    And introduce CPubKeySig to host code relative to key sigs.

  2. Empact cross-referenced this on Feb 16, 2018 from issue Add header-sensitive size checking via CPubKey::ValidSize, and prefer key/sig size const references by Empact
  3. fanquake added the label Refactoring on Feb 17, 2018
  4. in src/pubkey.h:29 in 3f457249c1 outdated
      25 | @@ -26,40 +26,48 @@ class CKeyID : public uint160
      26 |  
      27 |  typedef uint256 ChainCode;
      28 |  
      29 | +class CPubKeySig
    


    jonasschnelli commented at 11:11 AM on February 17, 2018:

    Why not a namespace?

  5. jonasschnelli commented at 11:12 AM on February 17, 2018: contributor

    Concept ACK. Not sure if CPubKeySig needs its own space.

  6. Empact force-pushed on Feb 19, 2018
  7. Empact force-pushed on Feb 19, 2018
  8. Empact commented at 12:26 AM on February 19, 2018: member

    Thanks, made PubKeySig a namespace.

  9. Empact force-pushed on Feb 20, 2018
  10. Empact commented at 8:51 PM on February 20, 2018: member

    On second thought, dropped PubKeySig - without any other code it's barely a separate concern.

  11. Empact renamed this:
    Refactor key / signature size consts to be relative to their relevant class
    Refactor key size consts to be relative to their relevant class
    on Feb 20, 2018
  12. instagibbs commented at 7:01 PM on February 26, 2018: member

    seemingly unrelated travis error:

    File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/rpc_net.py", line 54, in _test_getnettotals assert_equal(before['bytesrecv_per_msg']['pong'] + 32, after['bytesrecv_per_msg']['pong'])

    kicked travis

  13. Empact commented at 7:35 PM on February 26, 2018: member

    @instagibbs thanks - seems like that is a timing-related failure, I pushed #12545 to increase the wait, and reduce the likelihood of spurious failures.

  14. MarcoFalke commented at 1:10 AM on March 19, 2018: member

    Needs rebase if still relevant

  15. Empact force-pushed on Mar 19, 2018
  16. Empact force-pushed on Mar 19, 2018
  17. Empact commented at 7:01 AM on March 21, 2018: member

    Rebased

  18. fanquake requested review from sipa on Mar 21, 2018
  19. Empact force-pushed on Apr 12, 2018
  20. Empact force-pushed on Apr 12, 2018
  21. Empact commented at 8:32 PM on April 12, 2018: member

    Rebased & reimplemented as a scripted-diff

  22. Empact renamed this:
    Refactor key size consts to be relative to their relevant class
    scripted-diff: Rename key size consts to be relative to their class
    on Apr 12, 2018
  23. Empact force-pushed on Apr 13, 2018
  24. Empact force-pushed on Apr 17, 2018
  25. Empact cross-referenced this on May 16, 2018 from issue Remove template matching and pseudo opcodes by sipa
  26. sipa commented at 12:16 AM on May 17, 2018: member

    utACK f1583f26f2d9cb199ace6054a67797e1d4d9bed0

  27. Empact force-pushed on Jun 1, 2018
  28. Empact commented at 12:18 PM on June 1, 2018: member

    Rebased and updated to cover #13194

  29. Empact force-pushed on Jun 1, 2018
  30. Empact force-pushed on Jul 17, 2018
  31. Empact commented at 6:08 PM on July 17, 2018: member

    Rebased to confirm scripted-diff still applies. It does. 👍

  32. DrahtBot cross-referenced this on Aug 30, 2018 from issue export der always compressed by fingera
  33. MarcoFalke commented at 6:04 PM on September 7, 2018: member

    utACK 2dda5dd034, but please note that the scripted diff will modify files outside the git tree. I'd prefer to avoid that.

  34. MarcoFalke closed this on Sep 7, 2018

  35. MarcoFalke reopened this on Sep 7, 2018

  36. DrahtBot cross-referenced this on Sep 11, 2018 from issue Pass privkey export DER compression flag correctly by fingera
  37. Empact force-pushed on Sep 11, 2018
  38. Empact force-pushed on Sep 11, 2018
  39. Empact commented at 4:55 AM on September 11, 2018: member

    Updated to include 2 new cases, and brought it down to a single sed call which only acts on files in the repo.

  40. DrahtBot added the label Needs rebase on Sep 13, 2018
  41. Empact force-pushed on Sep 15, 2018
  42. Empact commented at 5:35 PM on September 15, 2018: member

    Rebased for #14195

  43. DrahtBot removed the label Needs rebase on Sep 15, 2018
  44. in src/pubkey.h:37 in 40c69642bd outdated
      32 | @@ -33,33 +33,33 @@ class CPubKey
      33 |      /**
      34 |       * secp256k1:
      35 |       */
      36 | -    static constexpr unsigned int PUBLIC_KEY_SIZE             = 65;
      37 | -    static constexpr unsigned int COMPRESSED_PUBLIC_KEY_SIZE  = 33;
      38 | +    static constexpr unsigned int SIZE             = 65;
      39 | +    static constexpr unsigned int COMPRESSED_SIZE  = 33;
    


    ken2812221 commented at 7:17 AM on December 2, 2018:

    nit: Could have another commit to fix the format here

  45. ken2812221 approved
  46. ken2812221 commented at 7:18 AM on December 2, 2018: contributor

    utACK 40c69642bd4bed49d17b75e3f544afbc8d10e8ae

  47. DrahtBot commented at 12:50 PM on December 17, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #16463 ([BIP 174] Implement serialization support for GLOBAL_XPUB field. by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  48. DrahtBot added the label Needs rebase on Feb 14, 2019
  49. Empact force-pushed on Mar 4, 2019
  50. Empact commented at 9:28 AM on March 4, 2019: member

    Rebased, added a commit to fixup whitespace.

  51. scripted-diff: Rename CPubKey and CKey::*_KEY_SIZE and COMPRESSED_*_KEY_SIZE
    To SIZE and COMPRESSED_SIZE
    
    -BEGIN VERIFY SCRIPT-
    sed -i 's/PRIVATE_KEY_SIZE/SIZE/g' src/*.h src/*.cpp src/**/*.h src/**/*.cpp
    sed -i 's/COMPRESSED_PRIVATE_KEY_SIZE/COMPRESSED_SIZE/g' src/*.h src/**/*.cpp src/**/*.h src/**/*.cpp
    sed -i 's/PUBLIC_KEY_SIZE/SIZE/g' src/*.h src/*.cpp src/**/*.h src/**/*.cpp
    sed -i 's/COMPRESSED_PUBLIC_KEY_SIZE/COMPRESSED_SIZE/g' src/*.h src/*.cpp src/**/*.h src/**/*.cpp
    -END VERIFY SCRIPT-
    47101bbb27
  52. Fixup whitespace 0580f86bb4
  53. Empact force-pushed on Mar 4, 2019
  54. DrahtBot removed the label Needs rebase on Mar 4, 2019
  55. laanwj referenced this in commit 36191a8bb5 on Nov 20, 2019
  56. laanwj merged this on Nov 20, 2019
  57. laanwj closed this on Nov 20, 2019

  58. sidhujag referenced this in commit 118ec28752 on Nov 20, 2019
  59. MarkLTZ cross-referenced this on Apr 4, 2020 from issue Bitcoin PR tracking by MarkLTZ
  60. jasonbcox referenced this in commit 64fb78dde1 on Oct 7, 2020
  61. sidhujag referenced this in commit 1af8b4b2c2 on Nov 10, 2020
  62. UdjinM6 referenced this in commit 81b8eb4083 on Aug 10, 2021
  63. 5tefan referenced this in commit da55971c71 on Aug 12, 2021
  64. bitcoin locked this on Dec 16, 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: 2026-05-20 06:55 UTC