Commit Graph

36 Commits

Author SHA1 Message Date
Andrea Maria Piana c78e084eb9 Fix tests and lint 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson e0eb96a992 Fix failing tests due to account not present in test env 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 829108c96f Changes to tests to include account where required for account injection 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 16fecf5520 Passing Master info to Messenger 2020-12-17 14:10:00 +01:00
Roman Volosovskyi 6d5a93287b
Separate keystore directory per multiacc
This commit provides `MigrateKeyStoreDir` method which moves multiacc's
keys from a common keystore directory to multiacc specific directory.
2020-07-09 12:41:47 +03:00
Adam Babik 8b61d92d58
Remove protocol and eth-node submodules (#1835) 2020-02-10 12:22:37 +01:00
Pedro Pombeiro 93975aa900 Working Nimbus branch with geth keystore 2020-01-20 13:15:17 +01:00
Pedro Pombeiro d4710faae2 In progress: Use Nimbus keystore 2020-01-20 13:15:17 +01:00
Pedro Pombeiro 6537cae606 Nimbus node support 2020-01-20 13:15:17 +01:00
Pedro Pombeiro c0c963bdaa Use eth-node `keystore` for `generator.go` 2020-01-06 15:45:31 +01:00
Pedro Pombeiro c8a911ebd1 Use goimports instead of gofmt 2020-01-06 10:17:23 +01:00
Pedro Pombeiro 3eaacaa2f4 Move keystore_geth.go to eth-node/bridge/geth 2020-01-06 10:17:23 +01:00
Pedro Pombeiro 527cd38e1f Address code review comments 2020-01-06 10:17:23 +01:00
Pedro Pombeiro 287e5cdf79 Abstract `accounts.Key` and geth `keystore` 2020-01-06 10:17:23 +01:00
Pedro Pombeiro b99af530e1 Migrate more files to eth-node/crypto 2019-12-20 11:24:26 +01:00
Pedro Pombeiro dd894ece15 Start abstracting geth Keystore 2019-12-19 14:11:48 +01:00
Pedro Pombeiro 26b6d7c36a Create a home submodule for Eth node bridges- Rename StatusBackend to GethStatusBackend 2019-11-27 17:02:09 +01:00
Roman Volosovskyi 5f6c7008e1
Add KeyUID to IdentifiedAccountInfo
This field will be used as a deterministic id of multiaccount on
status-react side instead of master key address. The reason why
it is calculated as sha256 of public key is that this way is
already used on keycard side and it will simplify integration.

Rename keycardKeyUid to keyUid

As long as this field will be present in all multiaccounts from now on it
shouldn't be named as keycard specific.
2019-11-22 17:50:24 +02:00
Pedro Pombeiro ed5a5c154d
Move to monorepo structure (#1684)
Move to a monorepo structure with submodules

- Rename status-protocol-go to status-go/protocol
2019-11-21 17:19:22 +01:00
Pedro Pombeiro 2dd74da23d Integrate Nimbus status-protocol-go 2019-11-18 14:30:03 +01:00
Adam Babik 26880b83d7
Upgrade geth to 1.9.5 and Whisper (#1617) 2019-10-04 17:21:24 +02:00
Dmitry Shulyak 63dcdd4e94 Statefull login with keycard (#1587) 2019-09-02 21:03:15 +02:00
Dmitry Shulyak be9c55bc16
Accounts data management (#1530)
* WIP accounts implementation

* Accounts datasore and changes to status mobile API

* Add library changes and method to update config

* Handle error after account selection

* Add two methods to start account to backend

* Use encrypted database for settings and add a service for them

* Resolve linter warning

* Bring back StartNode StopNode for tests

* Add sub accounts and get/save api

* Changes to accounts structure

* Login use root address and fetch necessary info from database

* Cover accounts store with tests

* Refactor in progress

* Initialize status keystore instance before starting ethereum node

* Rework library tests

* Resolve failures in private api test and send transaction test

* Pass pointer to initialized config to unmarshal

* Use multiaccounts/accounts naming consistently

Multiaccount is used as a login identifier
Account references an address and a key, if account is not watch-only.

* Add login timestamp stored in the database to accounts.Account object

* Add photo-path field for multiaccount struct

* Add multiaccoutns rpc with updateAccount method

Update to any other account that wasn't used for login will return an error

* Fix linter in services/accounts

* Select account before starting a node

* Save list of accounts on first login

* Pass account manager to accounts service to avoid selecting account before starting a node

* Add logs to login with save and regualr login
2019-08-20 18:38:40 +03:00
Andrea Maria Piana cb769ccca9 Revert "Initialize status keystore instance before starting ethereum node"
This reverts commit 476240fbd1.
2019-08-05 16:03:18 +02:00
Dmitry 476240fbd1 Initialize status keystore instance before starting ethereum node 2019-08-01 11:01:02 +03:00
Andrea Franz acfe9a721c
Multi account login (#1525)
* multi-account login and signing

put methods count threshold back to 20

* validate login params

* refactoring

* use common.Address

* remove unused var in test
2019-07-26 16:45:10 +02:00
Andrea Franz 2b96aa5456
add multi-account LoadAccount, ImportMnemonic, and Reset functions (#1542)
* add multi-account LoadAccount and Reset functions

* add MultiAccountImportMnemonic

* rename StoreDerived to StoreDerivedAccounts

* add docs
2019-07-26 11:33:38 +02:00
Andrea Franz dcb0fa5262
add multi-account support (#1500)
* add multiaccount support

add multi account ImportPrivateKey and StoreAccount

test derivation from normal keys

* add multiaccount to mobile pkg

* use multiaccount params structs from the mobile pkg

* move multiaccount tests together with the other lib tests

* fix codeclimate warning and temporarily increase methods threshold

* split library_test_utils.go to avoid linter warnings
2019-07-24 20:59:15 +02:00
Andrea Franz dd17860302
create random accounts in memory for onboarding (#1464)
* add account onboarding struct

* add onboarding to account manager

* allow resetting onboarding

* add onboarding functions to lib and mobile

* fix lint warnings

* update mnemonic test

* remove unused fmt

* reset onboarding before selecting account

* expose ResetOnboaring to lib and mobile

* refactoring

* add comment

* update StartOnboarding function

* remove unused var

* update VERSION

* fix returned accounts slice
2019-06-27 00:28:16 +02:00
Andrea Franz 929a5de757
Login with keycard (#1358)
* add InjectChatAccount to account manager

* add InjectChatAccount to Backend

* add comments to LoginWithKeycard

* add LoginWithKeycard test to lib

* fix export comment to avoid lint errors

* ensure wallet and chat keys are empty before injecting chat key

* rename InjectChatAccount to SetChatAccount

* add TestBackendInjectChatAccount

* stop node in TestBackendInjectChatAccount

* SetChatAccount doesn't return error

* add comment to InjectChatAccount

* fix account test
2019-01-24 16:44:46 +01:00
Andrea Franz 4939268edf
Unlock wallet and chat keys (#1346)
* select account decrypting wallet and chat keys

* adapt account tests to use chat and wallet account/keys

* fix tests using chat address

* changes after review

* fix status service e2e tests

* add account.Info struct returned when creating and recovering an account

* use s.EqualValues to compare recovered accounts

* return Info instead of *Info

* add both address and walletAddress to responses

* Update lib/types.go

Co-Authored-By: gravityblast <andrea@gravityblast.com>

* Update lib/types.go

Co-Authored-By: gravityblast <andrea@gravityblast.com>

* update comment to fix lint
2019-01-18 10:01:14 +01:00
Andrea Franz 06d4a99c09
add selected wallet and selected chat accounts (#1326)
* use keyStore.ImportExtendedKeyForPurpose when creating keys

* rename selectecAccount to selectedWalletAccount

* add selectedChatAccount

* update e2e test to check that injected whisper key is the chat public key

* update TestSelectedAccountOnRestart to check that chat key is used in whisper

* use chat account in api/backend

* update mocks

* temporarily update VERSION to build a release

* check that chat/wallet keys are the same in a different test

* add account test to check that wallet and chat keys are the same

* test only that the chat key is injected in whisper

* put back the right VERSION
2019-01-09 09:47:06 +01:00
Adam Babik fa97e6927d
Add CreateAccount RPC function (#1330) (#1334) 2018-12-28 12:37:22 +01:00
Adam Babik db691fd763
fix golang/mock (#1310) 2018-12-10 13:53:27 +01:00
Pedro Pombeiro 3b052098fe Update to geth 1.8.11. Closes #1033
- Replace deprecated common.Hex with hexutil.Encode.
- Remove upstreamed 0010-geth-17-fix-npe-in-filter-system.patch.
- Remove upstreamed 0020-discv5-metrics.patch.
- Remove upstreamed 0026-ethdb-error-deadlock.patch.
- Update goleveldb to same version used by geth 1.8.11.
- Update PublicTransactionPoolAPI.GasPrice return type to match type in internal geth interface.
2018-06-22 18:04:13 +02:00
Adrià Cidre d5be8c525d
[#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +02:00