Commit Graph

34 Commits

Author SHA1 Message Date
Martin Holst Swende
d5c7a6056a
cmd/clef: encrypt the master seed on disk (#17704)
* cmd/clef: encrypt master seed of clef

Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>

* keystore: refactor for external use of encryption

* clef: utilize keystore encryption, check flags correctly

* clef: validate master password

* clef: add json wrapping around encrypted master seed
2018-10-09 11:05:41 +02:00
Martin Holst Swende
6f004c46d5 accounts/keystore: double-check keystore file after creation (#17348) 2018-09-19 18:08:38 +02:00
Roc Yu
70176cda0e accounts/keystore: rename skipKeyFile to nonKeyFile to better reveal the function purpose (#17290) 2018-08-03 10:25:17 +03:00
Péter Szilágyi
d9575e92fc crypto/secp256k1: remove external LGPL dependencies (#17239) 2018-07-26 13:33:13 +02:00
Ralph Caraveo III
5d30be412b all: switch out defunct set library to different one (#16873)
* keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set.

* whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
2018-07-16 10:54:19 +03:00
Wenbiao Zheng
c95e4a80d1 accounts/keystore: assign schema as const instead of var (#16985) 2018-06-14 17:24:35 +03:00
GagziW
541f299fbb accounts: changed if-else blocks to conform with golint (#16654) 2018-05-03 11:37:56 +03:00
Armin
afc2039f22 accounts/keystore: Improved error message
* Fix for #15668
2017-12-18 12:28:34 +01:00
Péter Szilágyi
0981d2e566
Merge pull request #15498 from nonsense/account_cache_modtime_test_fix
accounts/keystore: change modtime for test case files to be bigger than 1sec.
2017-11-24 16:21:39 +02:00
Martin Holst Swende
bedf6f40af cmd/geth: make geth account new faster with many keys (#15529) 2017-11-20 17:39:53 +01:00
Martin Holst Swende
e2b3a23663
accounts/keystore: Ignore initial trigger of rescan-event 2017-11-20 12:35:30 +01:00
Péter Szilágyi
6810674de9
accounts/keystore: lock file cache during scan, minor polish 2017-11-20 12:21:52 +02:00
Anton Evangelatov
b64525694b accounts/keystore: comments above time.Sleep 2017-11-16 15:01:02 +01:00
Anton Evangelatov
448abb61eb accounts/keystore: change modtime for test cases to be bigger than 1sec. 2017-11-16 14:17:28 +01:00
Martin Holst Swende
88b1db7288 accounts/keystore: scan key directory without locks held (#15171)
The accountCache contains a file cache, and remembers from
scan to scan what files were present earlier. Thus, whenever
there's a change, the scan phase only bothers processing new
and removed files.
2017-10-09 12:40:50 +02:00
Péter Szilágyi
5d9ac49c7e
accounts: refactor API for generalized USB wallets 2017-08-09 13:26:07 +03:00
Péter Szilágyi
db568a61e2
accounts, console, internal: support trezor hardware wallet 2017-08-09 11:30:17 +03:00
Egon Elbre
7c74e166b0 accounts: fix megacheck warnings (#14903)
* accounts: fix megacheck warnings

* accounts: don't modify abi in favor of full cleanup
2017-08-07 14:11:15 +03:00
Felix Lange
225de7ca0a tests: update tests and implement general state tests (#14734)
Tests are now included as a submodule. This should make updating easier
and removes ~60MB of JSON data from the working copy.

State tests are replaced by General State Tests, which run the same test
with multiple fork configurations.

With the new test runner, consensus tests are run as subtests by walking
json files. Many hex issues have been fixed upstream since the last
update and most custom parsing code is replaced by existing JSON hex
types. Tests can now be marked as 'expected failures', ensuring that
fixes for those tests will trigger an update to test configuration. The
new test runner also supports parallel execution and the -short flag.
2017-07-11 13:49:14 +02:00
Péter Szilágyi
72dd51e25a
accounts/keystore, crypto: don't enforce key checks on existing keyfiles 2017-06-01 11:11:06 +03:00
Péter Szilágyi
aa73420207
accounts/keystore, crypto: enforce 256 bit keys on import 2017-05-23 14:58:03 +03:00
Felix Lange
0cc492f815 all: update license information 2017-04-14 10:29:00 +02:00
Péter Szilágyi
94c71c171f Merge pull request #3723 from karalabe/logger-updates-2
Logger updates
2017-02-28 16:55:37 +02:00
Felix Lange
5f7826270c all: unify big.Int zero checks, use common/math in more places (#3716)
* common/math: optimize PaddedBigBytes, use it more

name              old time/op    new time/op    delta
PaddedBigBytes-8    71.1ns ± 5%    46.1ns ± 1%  -35.15%  (p=0.000 n=20+19)

name              old alloc/op   new alloc/op   delta
PaddedBigBytes-8     48.0B ± 0%     32.0B ± 0%  -33.33%  (p=0.000 n=20+20)

* all: unify big.Int zero checks

Various checks were in use. This commit replaces them all with Int.Sign,
which is cheaper and less code.

eg templates:

    func before(x *big.Int) bool { return x.BitLen() == 0 }
    func after(x *big.Int) bool  { return x.Sign() == 0 }

    func before(x *big.Int) bool { return x.BitLen() > 0 }
    func after(x *big.Int) bool  { return x.Sign() != 0 }

    func before(x *big.Int) int { return x.Cmp(common.Big0) }
    func after(x *big.Int) int  { return x.Sign() }

* common/math, crypto/secp256k1: make ReadBits public in package math
2017-02-28 15:09:11 +01:00
Péter Szilágyi
e588e0ca2b
all: next batch of log polishes to contextual versions 2017-02-28 15:03:20 +02:00
Péter Szilágyi
46eea4d105
accounts, eth/downloader: use "err" instead of "error" in logs 2017-02-27 13:17:58 +02:00
Péter Szilágyi
23a5d64fd0
accounts, cmd: port packages over to the new logging system 2017-02-23 12:16:46 +02:00
Péter Szilágyi
d4fd06c3dc
all: blidly swap out glog to our log15, logs need rework 2017-02-23 12:16:44 +02:00
Felix Lange
9b0af51386 crypto: add btcec fallback for sign/recover without cgo (#3680)
* vendor: add github.com/btcsuite/btcd/btcec

* crypto: add btcec fallback for sign/recover without cgo

This commit adds a non-cgo fallback implementation of secp256k1
operations.

* crypto, core/vm: remove wrappers for sha256, ripemd160
2017-02-18 09:24:12 +01:00
Péter Szilágyi
e99c788155
accounts: ledger and HD review fixes
- Handle a data race where a Ledger drops between list and open
- Prolong Ledger tx confirmation window to 30 days from 1 minute
- Simplify Ledger chainid-signature calculation and validation
- Simplify Ledger USB APDU request chunking algorithm
- Silence keystore account cache notifications for manual actions
- Only enable self derivations if wallet open succeeds
2017-02-13 14:00:12 +02:00
Péter Szilágyi
205ea95802
accounts, cmd, internal, node: implement HD wallet self-derivation 2017-02-13 14:00:09 +02:00
Péter Szilágyi
c5215fdd48
accounts, cmd, internal, mobile, node: canonical account URLs 2017-02-13 14:00:08 +02:00
Péter Szilágyi
fad5eb0a87
accounts, cmd, eth, internal, miner, node: wallets and HD APIs 2017-02-13 14:00:07 +02:00
Péter Szilágyi
833e4d1319
accounts, cmd, eth, internal, mobile, node: split account backends 2017-02-13 14:00:02 +02:00