Commit Graph

54 Commits

Author SHA1 Message Date
Dimitris Apostolou
8fd43c8013
all: fix typos in comments (#28881) 2024-02-05 22:16:32 +01:00
Håvard Anda Estensen
a75a2d6db6
all: replace some cases of strings.SplitN with strings.Cut (#28446) 2023-11-15 14:42:33 +01:00
vuittont60
0004c6b229
accounts, cmd: fix typos (#28300) 2023-10-11 11:29:10 +03:00
Delweng
9358b62fcb
accounts: replace noarg fmt.Errorf with errors.New (#27331)
* accounts: replace noarg fmt.Errorf with errors.New

Signed-off-by: jsvisa <delweng@gmail.com>

* accounts: go autoimport

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-05-25 08:25:58 -04:00
Guillaume Ballet
0c66d971e7
accounts/scwallet: fix keycard data signing error (#25331)
accounts/scwallet: fix keycard data signing
2022-10-27 10:06:28 +02:00
Felix Lange
b628d72766
build: upgrade to go 1.19 (#25726)
This changes the CI / release builds to use the latest Go version. It also
upgrades golangci-lint to a newer version compatible with Go 1.19.

In Go 1.19, godoc has gained official support for links and lists. The
syntax for code blocks in doc comments has changed and now requires a
leading tab character. gofmt adapts comments to the new syntax
automatically, so there are a lot of comment re-formatting changes in this
PR. We need to apply the new format in order to pass the CI lint stage with
Go 1.19.

With the linter upgrade, I have decided to disable 'gosec' - it produces
too many false-positive warnings. The 'deadcode' and 'varcheck' linters
have also been removed because golangci-lint warns about them being
unmaintained. 'unused' provides similar coverage and we already have it
enabled, so we don't lose much with this change.
2022-09-10 13:25:40 +02:00
Seungbae.yu
2697e44d81
all: change format 0x%x to %#x (#25221) 2022-07-04 11:03:32 +03:00
Håvard Anda Estensen
07508ac0e9
all: replace uses of ioutil with io and os (#24869) 2022-05-16 11:59:35 +02:00
ucwong
23471288c8
accouts/scwallet: typo fix (#24207) 2022-01-07 16:45:53 +02:00
lightclient
bbfb1e4008
all: add support for EIP-2718, EIP-2930 transactions (#21502)
This adds support for EIP-2718 typed transactions as well as EIP-2930
access list transactions (tx type 1). These EIPs are scheduled for the
Berlin fork.

There very few changes to existing APIs in core/types, and several new APIs
to deal with access list transactions. In particular, there are two new
constructor functions for transactions: types.NewTx and types.SignNewTx.
Since the canonical encoding of typed transactions is not RLP-compatible,
Transaction now has new methods for encoding and decoding: MarshalBinary
and UnmarshalBinary.

The existing EIP-155 signer does not support the new transaction types.
All code dealing with transaction signatures should be updated to use the
newer EIP-2930 signer. To make this easier for future updates, we have
added new constructor functions for types.Signer: types.LatestSigner and
types.LatestSignerForChainID. 

This change also adds support for the YoloV3 testnet.

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
2021-02-25 15:26:57 +01:00
Guillaume Ballet
9c5729311e
accounts/scwallet: update documentation (#22242) 2021-01-26 16:43:12 +01:00
Felix Lange
ad038b6289
accounts/scwallet: use go-ethereum crypto instead of go-ecdh (#22212)
* accounts/scwallet: use go-ethereum crypto instead of go-ecdh

github.com/wsddn/go-ecdh is a wrapper package for ECDH functionality
with any elliptic curve.

Since 'generic' ECDH is not required in accounts/scwallet (the curve is
always secp256k1), we can just use the standard library functionality
and our own crypto libraries to perform ECDH and save a dependency.

* Update accounts/scwallet/securechannel.go

Co-authored-by: Guillaume Ballet <gballet@gmail.com>

* Use the correct key

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
2021-01-26 16:01:13 +01:00
Alex Prut
810f9e057d
all: remove redundant conversions and import names (#21903) 2020-11-25 21:00:23 +01:00
mr_franklin
66c3eb2f1a
accouts, consensus, core: fix some comments (#21617) 2020-10-12 15:02:38 +02:00
Martin Michlmayr
4f2784b38f
all: fix typos in comments (#21118) 2020-05-25 10:21:28 +02:00
Felix Lange
c8e9a91672
build: upgrade to golangci-lint 1.24.0 (#20901)
* accounts/scwallet: remove unnecessary uses of fmt.Sprintf

* cmd/puppeth: remove unnecessary uses of fmt.Sprintf

* p2p/discv5: remove unnecessary use of fmt.Sprintf

* whisper/mailserver: remove unnecessary uses of fmt.Sprintf

* core: goimports -w tx_pool_test.go

* eth/downloader: goimports -w downloader_test.go

* build: upgrade to golangci-lint 1.24.0
2020-04-08 11:07:29 +03:00
Guillaume Ballet
54d332e1db accounts/scwallet: fix staticcheck warnings (#20370) 2019-11-29 11:42:53 +01:00
Guillaume Ballet
7a22da98b9 accounts/scwallet: flag to specify path to smartcard daemon (#19439)
* accounts/scwallet: Add a switch to enable smartcard support

* accounts: change the meaning of the switch

* disable card support in windows until tested
* only activate account if pcscd socket file is present
* the switch is now the path to the socket file

* accounts/scwallet: holiman's review feedback

* accounts/scwallet: send the path to go-pcsclite

* accounts/scwallet: add default, per platform path

* accounts/scwallet: fix error log warning

* accounts/scwallet: update pcsc lib to latest

* accounts/scwallet: use default path from pcsclite

* scwallet: forgot to change switch name

* cmd: minor style cleanups (error handling first, then happy path)
2019-05-31 12:30:28 +03:00
Guillaume Ballet
048df258dc accounts/scwallet: change sc url scheme to keycard (#19632) 2019-05-28 19:47:53 +03:00
Péter Szilágyi
7bc1cb3677
accounts/scwallet: fix public key confirmation regression 2019-05-27 17:29:02 +03:00
Guillaume Ballet
75a860880c
accounts/scwallet: display PUK retry count, validate PIN/PUK length 2019-05-27 17:29:01 +03:00
Martin Holst Swende
fec3b56f7f accounts, p2p, rpc: make CGO_ENABLED=0 build again (#19593)
* p2p: remove direct import of cgo-library

* accounts, rpc: more nocgo alternatives

* rpc: move unix path constant into separate file

* accounts/scwallet: address review concerns, remove copy-pasta
2019-05-26 01:07:10 +03:00
Péter Szilágyi
7c91038bff
Merge pull request #19438 from karalabe/ledger-new-derivation-path
accounts: switch Ledger derivation path to canonical one
2019-04-25 13:33:17 +03:00
Guillaume Ballet
a1c5017bc5 accounts/scwallet: fix card pairing instruction message (#19436) 2019-04-10 13:46:35 +03:00
Péter Szilágyi
ae7344d799
accounts: switch Ledger derivation path to canonical one 2019-04-10 13:09:08 +03:00
Péter Szilágyi
8cf764da89
Revert "Can now specify the number of empty accounts to derive"
This reverts commit 5b30aa59d6.
2019-04-10 12:51:22 +03:00
Guillaume Ballet
f0b878d56d
accounts/scwallet: Update README for v2.2.1 support (#19425)
Update the app download link to the latest version, as requested in #19418
2019-04-10 10:51:45 +02:00
Guillaume Ballet
5b30aa59d6 Can now specify the number of empty accounts to derive 2019-04-08 13:21:22 +02:00
Guillaume Ballet
6f21520a82 More review feedback 2019-04-08 13:21:22 +02:00
Guillaume Ballet
fc3000d649 more review feedback 2019-04-08 13:21:22 +02:00
Martin Holst Swende
aae61ab16e Apply suggestions from code review
Co-Authored-By: gballet <gballet@gmail.com>
2019-04-08 13:21:22 +02:00
Guillaume Ballet
3b3e1bc07e Update the card preparation instructions based on review feedback 2019-04-08 13:21:22 +02:00
Guillaume Ballet
8c786a1f99 refresh the account list when initializing the card 2019-04-08 13:21:22 +02:00
Guillaume Ballet
79f4cfac2e refuse to overwrite the master key of a previously initialized card 2019-04-08 13:21:22 +02:00
Guillaume Ballet
1d1bee528e fix unnecessary condition linter warning 2019-04-08 13:21:22 +02:00
Guillaume Ballet
714675cd2a Upgrade to keycard app v2.1.1 2019-04-08 13:21:22 +02:00
Guillaume Ballet
35b80f1865 Fix linter issues 2019-04-08 13:21:22 +02:00
Guillaume Ballet
bcf3c52ac9 PK derivation has to be supported by the card 2019-04-08 13:21:22 +02:00
Guillaume Ballet
189a032987 Add instructions on how to install the card 2019-04-08 13:21:22 +02:00
Guillaume Ballet
ec4fba83d4 Formatting fixes 2019-04-08 13:21:22 +02:00
Guillaume Ballet
21b01f590d Update a comment to reflect the workings of the updated system 2019-04-08 13:21:22 +02:00
Guillaume Ballet
9b66a8520a Add some documentation 2019-04-08 13:21:22 +02:00
Guillaume Ballet
e273031dce Fix key derivation 2019-04-08 13:21:22 +02:00
Guillaume Ballet
7ec6fa03d3 fix wallet status update
This is a temporary fix, better checks need to
be performed once the whole process has been
validated.
2019-04-08 13:21:22 +02:00
Guillaume Ballet
42c76a2ba1 Temporary fix to the ADBU status call 2019-04-08 13:21:22 +02:00
Guillaume Ballet
5617dca1c9 Remove the direct dependency on libpcsclite
Instead, use a go library that communicates with pcscd over a socket.

Also update the changes introduced by @gravityblast since this PR's
inception
2019-04-08 13:21:22 +02:00
Guillaume Ballet
ae82c58631 Fix some linter issues 2019-04-08 13:19:37 +02:00
Guillaume Ballet
7b230b7ef1 accounts/scwallet: rebase and update 2019-04-08 13:19:37 +02:00
Péter Szilágyi
a900e80a89 accounts/scwallet: fix crypto API change 2019-04-08 13:19:37 +02:00
Péter Szilágyi
7d5886dcf4 accounts, console: frendly card errors, support pin unblock 2019-04-08 13:19:37 +02:00