Skip to content

kmd: upgrade karalabe/usb to karalabe/hid#6282

Merged
algorandskiy merged 1 commit intoalgorand:masterfrom
nullun:fix-ledger-on-mac
Mar 19, 2025
Merged

kmd: upgrade karalabe/usb to karalabe/hid#6282
algorandskiy merged 1 commit intoalgorand:masterfrom
nullun:fix-ledger-on-mac

Conversation

@nullun
Copy link
Copy Markdown
Contributor

@nullun nullun commented Mar 18, 2025

Having been unable to use a Ledger device with goal on Mac for many months I finally tracked down the issue. The HID Path length specifically on my Mac was too long, and as a result was being replaced with an empty string "". This meant my Ledger would never show in goal wallet list, despite working everywhere else.

It turns out https://github.com/karalabe/usb embeds an old version of the https://github.com/signal11/hidapi implementation that uses Apple's io_string_t type for the path.

After reading similar issues in various repos, it seems karalabe/hid#44 was the solution that updates the underlying issue, and then go-ethereum ultimately moved to this package last year with almost identical changes to the code.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 51.66%. Comparing base (e10cc09) to head (c98bba0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
daemon/kmd/wallet/driver/ledger_hid.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6282      +/-   ##
==========================================
- Coverage   51.68%   51.66%   -0.02%     
==========================================
  Files         647      647              
  Lines       86907    86907              
==========================================
- Hits        44916    44901      -15     
- Misses      39126    39135       +9     
- Partials     2865     2871       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@algorandskiy algorandskiy requested review from cce and jannotti March 18, 2025 19:37
Copy link
Copy Markdown
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While is seems scary to update a low-level package that interacts with Ledgers, we're really trusting the same org/person (karalabe) and following the lead of Ethereum. I'm ok.

@algorandskiy algorandskiy changed the title goal: upgrade karalabe/usb to karalabe/hid kmd: upgrade karalabe/usb to karalabe/hid Mar 19, 2025
@algorandskiy algorandskiy merged commit 52ab8e7 into algorand:master Mar 19, 2025
19 of 20 checks passed
@nullun nullun deleted the fix-ledger-on-mac branch March 19, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants