-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
|
||
let from = GethDirectory::create(dir_type).unwrap(); | ||
let to = DiskDirectory::create(self.keys_path()).unwrap(); | ||
import_accounts(&from, &to).expect("TODO: error here"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty easy TODO
Some(res) | ||
|
||
let sender = request.from; | ||
if let Err(_) = accounts.unlock_account_temporarily(sender, pass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't attacker who is spamming send transaction request take advantage of this temporal unlock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlikely, temp unlock unlocks account only for 1 signing.
But, because this code may appear suspicious, I will alter it to sign the transaction directly, without unlocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this one could be attacker's one? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep :)
Fixed most of the issues. For remaining one mentioned by Nikolay, created a separate issue. |
As discussed in slack, key store should be kept in parity repo |
(yes, but i think you already did it) |
* bump rust-crypto * initial version of account provider utilizing secret store * update lazy_static to latest version * AccountProvider accounts method * new AccountProvider tests in progress * basic tests for new AccountProvider * ethcore compiles with new account provider and secret store * ethcore-rpc build now compiling with new AccountProvider * most rpc tests passing with new accounts_provider * fixed basic_authority tests * fixed eth_transaction_count rpc test * fixed mocked/eth.rs tests * fixed personal tests * fixed personal signer rpc tests * removed warnings * parity compiling fine with new sstore * fixed import direction * do not unlock temporarily when we have the password * removed TODO in account import * display warning on auto account import failure * fixed compiling of ethstore on windows * ethstore as a part of parity repo * added ethkey
In this PR is separated secret store from util. It's now a part of standalone library ethstore. The library itself is much more modular than it used to be.
Few key features:
account_secret
).time
unlockingWhat further improvements this pr enables:
todo:
This pr allows us to remove much more than 2k lines of code. I will do this in next prs.