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

shinghim / rust-bitcoin / 10223219320
83%
master: 84%

Build:
Build:
LAST BUILD BRANCH: units-fuzz
DEFAULT BRANCH: master
Ran 02 Aug 2024 11:19PM UTC
Jobs 1
Files 95
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

01 Aug 2024 04:02PM UTC coverage: 83.216%. First build
10223219320

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#3113: Push up the Default bound on HashEngine in order to better support keyed hash functions

<a class=hub.com/shinghim/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/shinghim/rust-bitcoin/commit/2969b032f9dcc2b6436ff4d29e6b260efc2474fe">2969b032f Push up the Default bound on HashEngine (Nick Johnson)

Pull request description:

  Backstory for this patch is in #3084, and this might be enough to close that issue, but I think some follow up work might be required.

  I took Kixunil's advice and pushed up the `Default` bound on `HashEngine` all the way to the default methods themselves on the `GeneralHash` trait. I initially placed the bound just on the assocated type `Engine` of `GeneralHash`, which is a tad cleaner and keeps the bound from "leaking" downstream into things like `Hmac` and `Hkdf` implementations. However, that restricts `GeneralHash` implementations to just unkeyed hash functions and I believe there will be value in having `Poly1305` and `SipHash24` still leverage the interface. I struggled a bit on the best spots to put these bounds (even found the syntax a little jarring at times, I found [RFC2289](https://rust-lang.github.io/rfcs/2289-associated-type-bounds.html) helpful if others do too).

  Refactored the existing keyed hash function, `SipHash24`, to no longer have `Default` functions with zero-value keys. I kept the test coverage though by just hardcoding the zero-value keys over in the tests.

  Refactoring the `hash_type` macro for keyed hashes was getting a little hairy, so backed off and just wrote the bare minimum for `SipHash24` inline. Once `Poly1305` lands there will be two keyed hash functions and I think it will make more sense to then generalize over them.

ACKs for top commit:
  Kixunil:
    ACK 2969b032f9dcc2b6436ff4d29e6b260efc2474fe
  apoelstra:
    ACK 2969b032f9dcc2b6436ff4d29e6b260efc2474fe

Tree-SHA512: 9ca8f8baaed5e299658bfa2a48869328f5a

32 of 37 new or added lines in 4 files covered. (86.49%)

19683 of 23653 relevant lines covered (83.22%)

15606.55 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10223219320.1 02 Aug 2024 11:19PM UTC 0
83.22
GitHub Action Run
Source Files on build 10223219320
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10223219320
  • 8c0de957 on github
  • Next Build on siphash (#10223232197)
  • 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