Commit Graph

531 Commits

Author SHA1 Message Date
zelig
b375bbee5f settable etherbase
- etherbase flag for block reward destination
- coinbase => etherbase
- CLI- eth Config -> eth, xeth -> RPC / Miner
- use primary instead of coinbase as the unlock magic wildcard
- accounts: firstAddr/Coinbase -> Primary
2015-03-26 21:52:22 +00:00
zelig
7577d12614 max paranoia mode to UNsupport unencrypted keys entirely
- remove account export functionality from CLI
- remove accountExport method,
- remove unencrypted-keys flag from everywhere
- improve documentation
2015-03-26 19:00:18 +00:00
zelig
11d2ebc06f unlocking coinbase without knowing address
- accounts: remove Manager.getKey
- cli: for -unlock coinbase, use account manager Coinbase()
2015-03-26 19:00:18 +00:00
zelig
d1b52efdb5 cli: implement ethereum presale wallet import via cli 2015-03-26 19:00:18 +00:00
zelig
fd8d18ec28 unlocking coinbase
- extract accounts.getKey method - if given empty address it retrieves coinbase (first account)
- cli -unlock coinbase will unlock coinbase
2015-03-26 19:00:18 +00:00
zelig
c4ea921876 import/export accounts
- cli: add passwordfile flag
- cli: change unlock flag only takes account
- cli: with unlock you are prompted for password or use passfile with password flag
- cli: unlockAccount used in normal client start (run) and accountExport
- cli: getPassword used in accountCreate and accountImport
- accounts: Manager.Import, Manager.Export
- crypto: SaveECDSA (to complement LoadECDSA) to save to file
- crypto: NewKeyFromECDSA added (used in accountImport and New = generated constructor)
2015-03-26 19:00:18 +00:00
obscuren
b523441361 Moved ethutil => common 2015-03-16 11:27:38 +01:00
Felix Lange
4ba7871374 accounts: return ErrNoKeys if key directory does not exist 2015-03-10 15:41:08 +01:00
Felix Lange
487f68ec48 accounts: add {Timed,}Unlock, remove SignLocked 2015-03-10 00:19:01 +01:00
Felix Lange
9bf513e993 Merge ethereum/poc-9 into accounts-integration
Conflicts:
	cmd/utils/cmd.go
	cmd/utils/flags.go
	core/manager.go
	eth/backend.go
	rpc/http/server.go
	xeth/xeth.go
2015-03-09 23:25:46 +01:00
Felix Lange
c2e5dacf55 accounts: add Manager.HasAccount, delete Manager.Default 2015-03-09 23:08:46 +01:00
Felix Lange
6684ef201a accounts: don't store address in unlocked and add commentary
This was suggested during review.
2015-03-08 02:47:05 +01:00
Felix Lange
fb53a9362e accounts: AccountManager -> Manager 2015-03-08 01:58:35 +01:00
Felix Lange
3750ec7b7d accounts: prevent early drops and zero keys in memory when dropping
Private keys would be locked early if SignLocked was called more than
once because the unlockLater was still running. Terminate it properly.
2015-03-08 01:44:15 +01:00
obscuren
405c0ca4b0 removed 2015-03-08 01:06:59 +01:00
Felix Lange
d6a7332993 accounts: fix uses of sync.RWMutex
RWMutexes must be write-locked when writing in order
to actually protect the writes.
2015-03-08 00:36:06 +01:00
Felix Lange
afc530ea41 accounts: use time.Duration correctly
There is no point to using time.Duration if the value is interpreted as
milliseconds. Callers should use the standard multiplication idiom to
choose the unit. In fact, the only caller outside of the tests already
does so.
2015-03-08 00:35:23 +01:00
Felix Lange
fda7b4c79d accounts: use pointers consistently
Account is now always a non-pointer. This will be important once
the manager starts remembering accounts.

AccountManager is now always a pointer because it contains locks
and locks cannot be copied.
2015-03-08 00:18:13 +01:00
Felix Lange
d66f93cecd accounts, core, eth, xeth: use account manager for everything
The account manager is now responsible for picking the
default account and the coinbase.
2015-03-07 12:38:33 +01:00
obscuren
49ded3aa77 Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Conflicts:
	accounts/account_manager.go
2015-02-26 12:06:01 +01:00
obscuren
5ab0eaa06d wip 2015-02-26 11:14:54 +01:00
Gustav Simonsson
23f2658091 Remove unneeded initialisation of mutex 2015-02-25 19:30:57 +01:00
Gustav Simonsson
d1311c53ee Address pull request comments
* Use RWMutex instead of Mutex
* Use time.Duration instead of int for unlock time
* Use time.After with select instead of time.Sleep
2015-02-25 18:40:59 +01:00
Gustav Simonsson
b296b36d2b Add automatic locking / unlocking of accounts
* Change account signing API to two sign functions;
  Sign without passphrase - works if account is unlocked
  Sign with passphrase - always works and unlocks the account
* Account stays unlocked for X ms and is then automatically locked
2015-02-25 17:37:12 +01:00
Gustav Simonsson
923950ccaa Fix key store address hex decoding and accounts test
Thanks to https://github.com/jaekwon for original fix!
2015-02-24 18:05:10 +01:00
Maran
40adb7feb6 Implement OS sensitive dataDirs 2015-02-23 11:28:20 +01:00
Felix Lange
4ab7a290cd accounts: use crypto/randentropy in test 2015-02-20 11:40:58 +01:00
obscuren
5e891ea981 Merge branch 'key_store_and_accounts_integration' of https://github.com/Gustav-Simonsson/go-ethereum into Gustav-Simonsson-key_store_and_accounts_integration 2015-01-28 20:55:55 +01:00
Gustav Simonsson
8d9752a557 Address pull request comments
* Use crypto.Sign instead of directly calling secp256k1 lib
* Rename UserAccount to Account and Addr to Address (for consistency)
* Change AccountManager.Sign to take ptr to Account instead of
  address byte array
* Simplify copying of Accounts in Accounts()
* PubkeyToAddress and GetEntropyCSPRNG now exported
2015-01-28 05:12:57 +01:00
obscuren
aa5b29e2f2 Implemented contract ABI 2015-01-27 16:19:21 +01:00
Gustav Simonsson
512ffa2bf4 Add accounts package and refactor key stores
* Add initial UserAccount and AccountManager structs
* Add NewAccount, Sign and Accounts functions
* Refactor key stores to use key address as main identifier
  while keeping the UUID.
* Use key address as file/dir names instead of UUID
2015-01-26 04:30:17 +01:00