Fix unsigned integer overflow in tapscript validation weight calculation #24217

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2201-tapscriptInt changing 1 files +2 −2
  1. MarcoFalke commented at 3:41 pm on January 31, 2022: member

    Change the tapscript validation weight constants from uint64_t to int64_t, since the type of m_validation_weight_left is also int64_t. Otherwise this will cause sanitizer warnings.

    This should be safe because signed integer overflow isn’t expected to happen.

  2. Fix unsigned integer overflow in tapscript validation weight calculation fadc54b79b
  3. MarcoFalke commented at 3:50 pm on January 31, 2022: member
    On my system, this commit doesn’t change the binary for gcc with O2, but it does change it for clang
  4. DrahtBot added the label Consensus on Jan 31, 2022
  5. PastaPastaPasta approved
  6. PastaPastaPasta commented at 5:13 am on February 1, 2022: contributor
    utACK fadc54b79b14ba0bbdcf5eff1277295851fe7a9e
  7. MarcoFalke commented at 10:39 am on February 1, 2022: member
    centos 8 CI failure can be ignored
  8. theStack approved
  9. theStack commented at 12:28 pm on February 1, 2022: member

    Code-review ACK fadc54b79b14ba0bbdcf5eff1277295851fe7a9e

    For reference, these are the only instances where the constants VALIDATION_WEIGHT_{PER_SIGOP_PASSED,OFFSET} are used: https://github.com/bitcoin/bitcoin/blob/133f73e86bd7c3114263500be2fb5090dd76b4bc/src/script/interpreter.cpp#L386 https://github.com/bitcoin/bitcoin/blob/133f73e86bd7c3114263500be2fb5090dd76b4bc/src/script/interpreter.cpp#L1953

  10. luke-jr approved
  11. luke-jr commented at 8:53 pm on February 5, 2022: member
    utACK
  12. MarcoFalke merged this on Feb 7, 2022
  13. MarcoFalke closed this on Feb 7, 2022

  14. MarcoFalke deleted the branch on Feb 7, 2022
  15. sidhujag referenced this in commit 60fac3010d on Feb 7, 2022
  16. DrahtBot locked this on Feb 7, 2023

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-03 15:12 UTC

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