go-ethereum/accounts
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
..
abi accounts/abi/abigen: fix a flaky bind test case NewSingleStructArgument (#31501) 2025-04-01 16:13:37 +02:00
external all: implement eip-7702 set code tx (#30078) 2024-12-16 11:29:37 +01:00
keystore cmd/geth: remove unlock commandline flag (#30737) 2024-11-15 10:15:15 +01:00
scwallet accounts: avoid duplicate regex compilation (#29943) 2024-06-12 10:46:36 +03:00
usbwallet accounts/usbwallet: full 32bit chainId support for Trezor (#17439) 2025-04-10 12:46:54 +02:00
accounts.go all: fix some typos in comments and names (#31023) 2025-01-14 14:16:15 +01:00
accounts_test.go accounts: run tests in parallel (#28544) 2023-12-04 14:55:06 +01:00
errors.go accounts: fix typo in comments (#24805) 2022-05-03 08:49:41 +02:00
hd.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
hd_test.go accounts: run tests in parallel (#28544) 2023-12-04 14:55:06 +01:00
manager.go cmd/geth: remove unlock commandline flag (#30737) 2024-11-15 10:15:15 +01:00
sort.go accounts, console: frendly card errors, support pin unblock 2019-04-08 13:19:37 +02:00
url.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
url_test.go accounts: run tests in parallel (#28544) 2023-12-04 14:55:06 +01:00