• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 9550731109
83%

Build:
DEFAULT BRANCH: master
Ran 17 Jun 2024 03:49PM UTC
Jobs 1
Files 93
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jun 2024 03:47PM UTC coverage: 83.129% (-0.01%) from 83.143%
9550731109

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#2794: Enforce script size limit when hashing scripts

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/6014788a743ad0a39266853e75ececaaeadf3332">6014788a7<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/de7da692988ff9d101f74182582f652bb6cbe6b4"> api: Run just check-api (Tobin C. Harding)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/e87a54f617a42e58db6900910173e9dfebeb9c77">e87a54f61</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/de7da692988ff9d101f74182582f652bb6cbe6b4"> Enforce script size limit when hashing scripts (Tobin C. Harding)
</a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/4686d48ec481bff497592ce243719253ffdac87a">4686d48ec</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/de7da692988ff9d101f74182582f652bb6cbe6b4"> Rename p2wsh script to witness_script (Tobin C. Harding)
</a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/9cdb5144342bb7892aa74463e2ad9509f767f0bb">9cdb51443</a> Remove odd script hash test (Tobin C. Harding)

Pull request description:

  There are two limits that the Bitcoin network enforces in regard to hashing scripts

  - For P2SH the redeem script must be less than 520 bytes (bip 16)
  - For P2WSH the witness script must be less than 10,000 bytes (bip 141)

  Currently we are only enforcing the p2sh limit when creating an address with `Address::p2sh`.

  There are various ways to create addresses from script hashes and if users manually hash a script then use the `ScriptHash` (or `WScritpHash`) our APIs assume the script that was hashed is valid. This means there is the potential for users to get burned by creating addresses that cannot be spent, something we would like to avoid.

  - Add fallible constructors to `ScriptHash` and `WScriptHash`
  - Add `TryFrom` impls as well to both types
  - Remove the `From` impls

  Close: #2794

ACKs for top commit:
  apoelstra:
    ACK 6014788a743ad0a39266853e75ececaaeadf3332

Tree-SHA512: 90c722ee632831a0d6319d1845d557c436f

80 of 109 new or added lines in 6 files covered. (73.39%)

2 existing lines in 1 file now uncovered.

19581 of 23555 relevant lines covered (83.13%)

16280.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9550731109.1 17 Jun 2024 03:49PM UTC 0
83.13
GitHub Action Run
Source Files on build 9550731109
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #9550731109
  • de7da692 on github
  • Prev Build on master (#9541336859)
  • Next Build on master (#9551233748)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc