Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(cast): cast wallet sign --trezor gives an "Error: operation sign_hash is not supported by the signer" #9944

Closed
2 tasks done
KyrylR opened this issue Feb 24, 2025 · 10 comments
Assignees
Labels
A-dependencies Area: dependencies C-cast Command: cast T-bug Type: bug T-to-reproduce Type: requires reproduction

Comments

@KyrylR
Copy link

KyrylR commented Feb 24, 2025

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.0.0-stable Commit SHA: e144b82 Build Timestamp: 2025-02-13T20:02:34.979686000Z (1739476954) Build Profile: maxperf

What version of Foundryup are you on?

foundryup: 1.0.1

What command(s) is the bug in?

cast w s -t --no-hash 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6

Operating System

macOS (Apple Silicon)

Describe the bug

I am trying to sign the hash with trezor and it says the following:
Error: operation `sign_hash` is not supported by the signer

@KyrylR KyrylR added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Feb 24, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Feb 24, 2025
@Maliksb11

This comment has been minimized.

@zerosnacks
Copy link
Member

Hi @KyrylR

This is likely an error with the underlying Trezor client we are using through Alloy: https://github.com/trezor/trezor-firmware

Would you mind checking if you are using the latest version of the firmware?

@zerosnacks zerosnacks added C-cast Command: cast A-dependencies Area: dependencies T-to-reproduce Type: requires reproduction and removed T-needs-triage Type: this issue needs to be labelled labels Feb 24, 2025
@KyrylR
Copy link
Author

KyrylR commented Feb 24, 2025

Sure

@zerosnacks zerosnacks changed the title cast wallet sign --trezor gives an "Error: \noperation sign_hash is not supported by the signer\n" bug(cast): cast wallet sign --trezor gives an "Error: \noperation sign_hash is not supported by the signer\n" Feb 24, 2025
@zerosnacks zerosnacks changed the title bug(cast): cast wallet sign --trezor gives an "Error: \noperation sign_hash is not supported by the signer\n" bug(cast): cast wallet sign --trezor gives an "Error: operation sign_hash is not supported by the signer" Feb 24, 2025
@KyrylR
Copy link
Author

KyrylR commented Feb 24, 2025

Current version is 2.8.7, trying to install 2.8.8 manually because it is not available via Trezor app

@KyrylR
Copy link
Author

KyrylR commented Feb 24, 2025

But according the the changelog (https://github.com/trezor/trezor-firmware/blob/main/core/CHANGELOG.T2B1.md) this won't help much

@KyrylR
Copy link
Author

KyrylR commented Feb 24, 2025

@zerosnacks Without --no-hash everything works (at least it can sign the message)

@zerosnacks
Copy link
Member

Perhaps blind signing is disabled on your device?

@KyrylR
Copy link
Author

KyrylR commented Feb 24, 2025

Where can I check that?

@zerosnacks
Copy link
Member

zerosnacks commented Feb 24, 2025

On further investigation it appears Trezor has blind signing enabled by default and is unrelated to it.

I've been able to reproduce the issue on my Ledger also yielding: "Error: operation sign_hash is not supported by the signer"

https://github.com/alloy-rs/alloy/blob/88fc40338270756cc1f468319eda642cf01eb153/crates/signer-ledger/src/signer.rs#L82-L89

https://github.com/alloy-rs/alloy/blob/88fc40338270756cc1f468319eda642cf01eb153/crates/signer-trezor/src/signer.rs#L39-L47

It appears we are declaring the operation to be unsupported inside of Alloy.

I'll move this ticket over to Alloy.

@zerosnacks
Copy link
Member

Opened the ticket here: alloy-rs/alloy#2114

Will close this one in favor of that one

@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Feb 24, 2025
@zerosnacks zerosnacks self-assigned this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: dependencies C-cast Command: cast T-bug Type: bug T-to-reproduce Type: requires reproduction
Projects
Status: Done
Development

No branches or pull requests

3 participants