go-ethereum/accounts/usbwallet
HackyMiner 4906c99113
accounts/usbwallet: full 32bit chainId support for Trezor (#17439)
This fix allows Trezor to support full 32bit chainId in geth, with the
next version of firmware.

For `chainId > 2147483630` case, Trezor returns signature bit only.
- Trezor returns only signature parity for `chainId > 2147483630` case.
- for `chainId == 2147483630` case, Trezor returns `MAX_UINT32` or `0`,
but it doesn't matter.
  (`2147483630 * 2 + 35` = `4294967295`(`MAX_UINT32`))

chainId | returned signature_v | compatible issue
---------|------------------------|--------------------
0 < chainId <= 255 | chainId * 2 + 35 + v | no issue (firmware `1.6.2`
for Trezor one)
255 < chainId <= 2147483630 | chainId * 2 + 35 + v | ***fixed.***
*firmware `1.6.3`*
chainId > 2147483630 | v | *firmware `1.6.3`*

Please see also: full 32bit chainId support for Trezor
- Trezor one: https://github.com/trezor/trezor-mcu/pull/399 ***merged***
- Trezor model T: https://github.com/trezor/trezor-core/pull/311
***merged***

---------

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2025-04-10 12:46:54 +02:00
..
trezor all: remove deprecated protobuf dependencies (#30232) 2024-08-01 16:25:55 +02:00
hub.go accounts/usbwallet: fix ledger access for latest firmware and add Ledger Flex (#31004) 2025-01-24 10:59:33 +01:00
ledger.go accounts/usbwallet: support dynamic tx (#30180) 2024-11-08 14:57:29 +01:00
trezor.go accounts/usbwallet: full 32bit chainId support for Trezor (#17439) 2025-04-10 12:46:54 +02:00
wallet.go accounts/usbwallet: update hid library (#29176) 2024-03-06 12:31:50 +02:00