WalletWasabi: [Fluent] Send-action from Trezor One doesn't work
General Description
I tried to send (testnet) from trezor one to other wasabi wallet, trezor asks for confirmation but after that gui (wasabi) gives authorization error. When click ‘OK’ it went back to ‘Preview Transaction’ view.
How To Reproduce?
- Go to ‘Send’
- Paste address, choose amount and label(s)
- Click Continue
- Confirm transfer in Trezor
- See error
Screenshots
Check video: https://user-images.githubusercontent.com/59436067/130683207-5015a34e-7b11-41c8-9e6b-652278fc9a2d.mp4
Operating System
Linux Mint 20.2 Cinnamon Trezor One firmware version 1.10.2
Logs
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (106) Calculating dynamic transaction fee...
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (175) Fee: 26085 Satoshi.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (178) Estimated tx size: 141 vBytes.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (204) The transaction fee is 26.1% of the sent amount.
Sending: 0.001 BTC.
Fee: 26085 Satoshi.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (219) Signing transaction...
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (307) Transaction is successfully built: 14ac5a14f03ac2e5cd74b3c586386e7c47b109f343ee9f5957d9de81f1e79a66.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (106) Calculating dynamic transaction fee...
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (175) Fee: 20350 Satoshi.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (178) Estimated tx size: 110 vBytes.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (204) The transaction fee is 5.2% of the sent amount.
Sending: 0.00390745 BTC.
Fee: 20350 Satoshi.
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (219) Signing transaction...
2021-08-24 22:30:05 [81] INFO TransactionFactory:BuildTransaction (307) Transaction is successfully built: 5bd18c79c96769b6260f9a8ab2513a560d12eb78bf5c73d29ce3a12c0592eadd.
2021-08-24 22:30:27 [1] ERROR HardwareWalletAuthDialogViewModel:Authorize (55) WalletWasabi.Hwi.Exceptions.HwiException: ProcessError: Failed to compile input
at WalletWasabi.Hwi.HwiClient.ThrowIfError(String responseString, IEnumerable`1 options, String arguments, Int32 exitCode) in WalletWasabi/Hwi/HwiClient.cs:line 284
at WalletWasabi.Hwi.HwiClient.SendCommandAsync(IEnumerable`1 options, Nullable`1 command, String commandArguments, Boolean openConsole, CancellationToken cancel, Boolean isRecursion, Action`1 standardInputWriter) in WalletWasabi/Hwi/HwiClient.cs:line 52
at WalletWasabi.Hwi.HwiClient.SignTxImplAsync(Nullable`1 deviceType, String devicePath, Nullable`1 fingerprint, PSBT psbt, CancellationToken cancel) in WalletWasabi/Hwi/HwiClient.cs:line 172
at WalletWasabi.Hwi.HwiClient.SignTxAsync(HDFingerprint fingerprint, PSBT psbt, CancellationToken cancel) in WalletWasabi/Hwi/HwiClient.cs:line 166
at WalletWasabi.Fluent.ViewModels.Dialogs.Authorization.HardwareWalletAuthDialogViewModel.Authorize() in WalletWasabi.Fluent/ViewModels/Dialogs/Authorization/HardwareWalletAuthDialogViewModel.cs:line 44
Wasabi Version
Fluent, Master
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 23 (1 by maintainers)
Well done @andrewkozlik, that is indeed the problem.
I cannot reproduce without
--chain test
but I can reproduce with--chain test
. I can also sign the given transaction if I first disable safety checks viatrezorctl set safety-checks prompt
.I can also reproduce the same issue on a Trezor T, if safety checks are enabled.
Trezor is strictly correct in rejecting this, because you’re asking to sign testnet transaction (coin symbol displayed on screen will be
TEST
), but using mainnet paths. An attacker could trivially construct a transaction spending your actual mainnet coins if this were enabled by default.“Failed to compile input” would indicate that this function is failing: https://github.com/trezor/trezor-firmware/blob/b957dfbddb4222c5f9e573f3d4dc21fcbc6ff3a9/legacy/firmware/signing.c#L668-L706
The most likely reason for that function to fail would be if
coin_path_check()
fails: https://github.com/trezor/trezor-firmware/blob/b957dfbddb4222c5f9e573f3d4dc21fcbc6ff3a9/legacy/firmware/crypto.c#L540-L785The first thing that comes to mind is that
84'/0'/0'/0/0
is a mainnet path. If this is being sent to Trezor as a testnet transaction, thencoin_path_check()
would fail. Testnet paths are84'/1'/*'/*/*
. I haven’t looked any deeper, I am leaving the investigation to @matejcik and the rest of the team.This is fixed by #6550
I was able to send tBTC to my other wallet with Trezor One, after i unlocked it in
Trezor Web Suite
. The Kata test is passing too.We are going to have a look
I’ve made a similar tx as a test but cannot replicate the issue. Unfortunately it is difficult to figure out what is wrong without being able to replicate the issue.
I have not encountered any issues with signing on Trezors. HWI’s CI is currently passing.
Can you provide the full HWI command and its output?
Good catch! This is not UI related though, can somebody from the code team take a look? @zkSNACKs/code-team