Daniel Liu
db3dc1932c
accounts/usbwallet: support dynamic tx ( #30180 )
...
Adds support non-legacy transaction-signing using ledger
---------
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-01-24 16:54:12 +08:00
Daniel Liu
5beff83a6d
all: remove deprecated protobuf dependencies ( #30232 )
...
The package `github.com/golang/protobuf/proto` is deprecated in favor
`google.golang.org/protobuf/proto`. We should update the codes to
recommended package.
Signed-off-by: Icarus Wu <icaruswu66@qq.com>
2025-01-24 16:54:12 +08:00
Daniel Liu
1fcc36a2dc
build: add check for stale generated files ( #30037 )
...
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-01-24 16:54:12 +08:00
Daniel Liu
a0a1322d84
accounts/usbwallet/trezor: upgrade to generate with protoc 27.1 ( #30058 )
2025-01-24 16:54:12 +08:00
Daniel Liu
13d39173b3
accounts/usbwallet: update hid library ( #29176 )
2025-01-24 16:54:12 +08:00
Daniel Liu
745c276ed3
fix: update outdated link to trezor docs ( #28966 )
...
fix: update link to trezor
2025-01-24 16:54:12 +08:00
Daniel Liu
0a0784d324
acounts/usbwallet: fix typo ( #28815 )
...
acounts:fix typo
2025-01-24 16:54:12 +08:00
Daniel Liu
36bf7311cd
accounts: properly close managed wallets when closing manager ( #28710 )
2025-01-24 16:54:12 +08:00
Daniel Liu
3bce105c95
accounts: use atomic type ( #27857 )
2025-01-24 16:54:12 +08:00
Daniel Liu
ba053a5468
accounts/usbwallet: mitigate ledger app chunking issue ( #26773 )
...
This PR mitigates an issue with Ledger's on-device RLP deserialization, see
https://github.com/LedgerHQ/app-ethereum/issues/409
Ledger's RLP deserialization code does not validate the length of the RLP list received,
and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately
before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is
uninitialized, it is 0 during this signing flow. This may cause the user to accidentally
sign the transaction with chain_id = 0. That signature would be returned from the device 1
packet earlier than expected by the communication loop. The device blocks the
second-to-last packet waiting for the signer flow, and then errors on the successive
packet (which contains the chain_id, zeroed r, and zeroed s)
Since the signature's early arrival causes successive errors during the communication
process, geth does not parse the improper signature produced by the device, and therefore
no improperly-signed transaction can be created. User funds are not at risk.
We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the
final chunk.
2025-01-24 16:54:11 +08:00
Daniel Liu
80f3eaac01
accounts/usbwallet: support Ledger Nano S Plus and FTS ( #25933 )
...
* usbwallet support Ledger Nano S Plus
* accounts/usbwallet: add definitions + ref to ledger docs
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-01-24 16:54:11 +08:00
Daniel Liu
e2b5a03ce8
accounts: lint comments ( #25726 )
2025-01-24 16:54:11 +08:00
Daniel Liu
c046f36afd
accounts: fix some typos ( #25551 )
2025-01-24 16:54:11 +08:00
Daniel Liu
9e82b201c7
accouts/scwallet: typo fix ( #24207 )
2025-01-24 16:18:30 +08:00
Daniel Liu
345ed3dc36
accounts: eip-712 signing for ledger ( #22378 )
...
* accounts: eip-712 signing for ledger
* address review comments
2025-01-24 16:18:30 +08:00
Daniel Liu
3946405983
accounts/usbwallet: fix ledger version check ( #21733 )
...
The version check logic did not take into account the second digit (i.e. the '4' in v1.4.0) - this one line patch corrects this.
2025-01-24 16:18:30 +08:00
Daniel Liu
5b48621c36
accouts, core: fix some comments ( #21617 )
2025-01-24 16:18:30 +08:00
Daniel Liu
321bcff620
accounts/usbwallet, signer/core: show accounts from ledger legacy derivation paths ( #21517 )
...
* accounts/usbwallet, signer/core: un-hide accounts from ledger legacy derivation paths
* Update accounts/usbwallet/wallet.go
* Update signer/core/api.go
* Update signer/core/api.go
2025-01-24 16:18:29 +08:00
Daniel Liu
193ee6d606
accounts/usbwallet: fix staticcheck warnings ( #20372 )
2025-01-24 16:18:29 +08:00
Daniel Liu
f571689bab
signer/core: fix reference issue in key derivation ( #19827 )
...
* signer/core: fix reference issue in key derivation
* Review feedback
2025-01-24 16:18:29 +08:00
Daniel Liu
e6df5f8798
account/usbwallet: abort usb enumeration after failures ( #19671 )
2025-01-24 16:18:29 +08:00
Daniel Liu
2e21b96101
accounts/usbwallet: add webusb trezor support ( #19588 )
2025-01-24 16:18:29 +08:00
Daniel Liu
b2a9e1cb67
accounts/usbwallet: enable the Nano X and upcoming Ledger IDs ( #19623 )
2025-01-24 16:18:29 +08:00
Daniel Liu
b5ace99624
accounts/usbwallet: fix a comment typo in trezor driver ( #19535 )
2025-01-24 16:18:29 +08:00
Daniel Liu
194a77505f
accounts: switch Ledger derivation path to canonical one ( #19438 )
2025-01-24 16:18:29 +08:00
Daniel Liu
e7d8247fda
usbwallet: check error returned by driver close ( #18057 )
...
Although current two implementations(ledgerDriver, trezorDriver) of interface driver.Close do not actually return any error. Instead, they only return nil.
But since the declaration of Close function returns error, it is better to check the returned error in case in future some new implementation of Close function returns error and we may forget to modify the function which invokes Close function at that time.
2025-01-24 16:18:29 +08:00
Daniel Liu
4955476db4
accounts: prefer nil slices over zero-length slices ( #19079 )
2025-01-24 16:18:29 +08:00
Daniel Liu
43e6c8ecdc
accounts: implemented EIP191/712 ( #17789 )
2025-01-24 16:18:29 +08:00
Daniel Liu
07935ce124
accounts: support for external signer API ( #18079 )
2025-01-24 16:18:29 +08:00
Daniel Liu
fe14069bd7
accounts: support for external signer API ( #18079 )
2025-01-24 16:18:29 +08:00
Daniel Liu
f0ed12486a
accounts/usbwallet/trezor: expose protobuf package ( #17980 )
...
When some of the same messages are redefined anywhere in a Go project,
the protobuf package panics (see
https://github.com/golang/protobuf/issues/178 ).
Since this package is internal, there is no way to work around it, as
one cannot use it directly, but also cannot define the same messages.
There is no downside in making the package accessible.
2025-01-24 16:18:29 +08:00
Daniel Liu
e3c75c01c7
accounts/usbwallet: support trezor passphrases ( #16503 )
...
When opening the wallet, ask for passphrase as well as for the PIN
and return the relevant error (PIN/passphrase required). Open must then
be called again with either PIN or passphrase to advance the process.
This also updates the console bridge to support passphrase authentication.
2025-01-24 16:18:29 +08:00
Daniel Liu
5e6fa602c9
usbwallet: check returned error when decoding hexstr ( #18056 )
...
* usbwallet: check returned error when decoding hexstr
* Update accounts/usbwallet/ledger.go
Co-Authored-By: CoreyLin <514971757@qq.com>
* usbwallet: check hex decode error
2025-01-24 16:18:28 +08:00
Daniel Liu
b469d70433
accounts/usbwallet: simplify code using -= operator ( #17904 )
2025-01-24 16:18:28 +08:00
Daniel Liu
e5b484b63b
accounts/usbwallet: correct comment typo ( #16998 )
2025-01-24 16:18:28 +08:00
Daniel Liu
8d2fb8c280
accounts/usbwallet: correct comment typo ( #17008 )
2025-01-24 16:18:28 +08:00
Daniel Liu
fbe415c975
accounts/usbwallet: remove unused variables in ledger.go ( #16446 )
2025-01-24 16:18:28 +08:00
Daniel Liu
18a5493575
accounts: add function UnmarshalJSON to parse URL ( #16154 )
2025-01-24 16:18:28 +08:00
Justin Dhillon
009542a92e
accounts/usbwallet, common/bitutil: fix broken links in docs ( #29078 )
...
fixes some links in documentation
2024-12-28 09:06:31 +08:00
Daniel Liu
ad5e7d6db3
crypto: add SignatureLength constant and use it everywhere ( #19996 )
2024-12-09 17:48:59 +08:00
Daniel Liu
a79411fa06
all: fix staticcheck warning ST1005: incorrectly formatted error string
2024-10-24 09:48:20 +08:00
Daniel Liu
01e1728a94
all: add support for EIP-2718, EIP-2930 transactions ( #21502 )
2024-05-14 23:15:35 +08:00
olumuyiwadad
b5abbfed79
new EVM Upgrade
...
- Solidity Upgraded up to v0.8.0
- Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
571c41f891
FIx Bad block error.
2021-09-17 17:59:06 +05:30
Corey Lin
b3be9b7cd8
usbwallet: check returned error when decoding hexstr ( #18056 )
...
* usbwallet: check returned error when decoding hexstr
* Update accounts/usbwallet/ledger.go
Co-Authored-By: CoreyLin <514971757@qq.com>
* usbwallet: check hex decode error
2018-12-13 10:21:52 +01:00
Evgeny
331fa6d307
accounts/usbwallet: simplify code using -= operator ( #17904 )
2018-10-16 00:34:50 +02:00
Husam Ibrahim
28aca90716
accounts/usbwallet: correct comment typo ( #16998 )
2018-06-19 14:43:20 +03:00
Husam Ibrahim
3e57c33147
accounts/usbwallet: correct comment typo ( #17008 )
2018-06-19 14:36:35 +03:00
thomasmodeneis
ba1030b6b8
build: enable goimports and varcheck linters ( #16446 )
2018-04-18 00:53:50 +02:00
Martin Holst Swende
ec3db0f56c
cmd/clef, signer: initial poc of the standalone signer ( #16154 )
...
* signer: introduce external signer command
* cmd/signer, rpc: Implement new signer. Add info about remote user to Context
* signer: refactored request/response, made use of urfave.cli
* cmd/signer: Use common flags
* cmd/signer: methods to validate calldata against abi
* cmd/signer: work on abi parser
* signer: add mutex around UI
* cmd/signer: add json 4byte directory, remove passwords from api
* cmd/signer: minor changes
* cmd/signer: Use ErrRequestDenied, enable lightkdf
* cmd/signer: implement tests
* cmd/signer: made possible for UI to modify tx parameters
* cmd/signer: refactors, removed channels in ui comms, added UI-api via stdin/out
* cmd/signer: Made lowercase json-definitions, added UI-signer test functionality
* cmd/signer: update documentation
* cmd/signer: fix bugs, improve abi detection, abi argument display
* cmd/signer: minor change in json format
* cmd/signer: rework json communication
* cmd/signer: implement mixcase addresses in API, fix json id bug
* cmd/signer: rename fromaccount, update pythonpoc with new json encoding format
* cmd/signer: make use of new abi interface
* signer: documentation
* signer/main: remove redundant option
* signer: implement audit logging
* signer: create package 'signer', minor changes
* common: add 0x-prefix to mixcaseaddress in json marshalling + validation
* signer, rules, storage: implement rules + ephemeral storage for signer rules
* signer: implement OnApprovedTx, change signing response (API BREAKAGE)
* signer: refactoring + documentation
* signer/rules: implement dispatching to next handler
* signer: docs
* signer/rules: hide json-conversion from users, ensure context is cleaned
* signer: docs
* signer: implement validation rules, change signature of call_info
* signer: fix log flaw with string pointer
* signer: implement custom 4byte databsae that saves submitted signatures
* signer/storage: implement aes-gcm-backed credential storage
* accounts: implement json unmarshalling of url
* signer: fix listresponse, fix gas->uint64
* node: make http/ipc start methods public
* signer: add ipc capability+review concerns
* accounts: correct docstring
* signer: address review concerns
* rpc: go fmt -s
* signer: review concerns+ baptize Clef
* signer,node: move Start-functions to separate file
* signer: formatting
2018-04-16 15:04:32 +03:00