-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New "unlock to send a transaction" method name discussion #113
Comments
|
|
I would really like to avoid anything with unlocked. This function doesn't unlock the account like I also don't like As a disadvantage for
Personally I don't think that there is anything wrong with |
I personally also want to change But thats off topic |
How about just |
Can't you extend the |
In favor of the last two proposed: |
I'd like to point out this API might encourage Ðapp Devs to accept passwords in the UI, which normalizes the act of typing a secret password into a foreign input. I think passwords are more safely handled at the client level, and a good client should notify the user and prompt for a password in response to a normal sendTransaction call if the account is locked. |
@FlySwatter agreed. |
What @FlySwatter proposed is not feasible. Let's consider geth - Mist architecture. geth keeps password protected accounts, but it cannot show up a popup out of nowhere asking for a password on top of Mist UI. If passing a password in JSON RPC is the issue, maybe we can use some better authorisation scheme. I only know there exist authorisation schemes where a server challenges a client with a puzzle that can be solved only if the client knows the password. Password is not revealed, the challenge is changed every session. I'm not able to name nor explain how it works, any help here? Bringing that to our JSON RPC protocol, we could keep |
I agree that The problem is that nodes currently encrypt the private key's with the password and need to have it in order to decrypt the private key that is used to sign the transaction. A challenge response system would not allow for the secure exchange of the password. In the past I have thought of something like "geth-agents". When the node starts you can give it an agent endpoint. The node will connect to this endpoint and forwards (unsigned) transactions to it. The agent asks the user for the password if necessary, sends the signed transaction back to the node which broadcasts it onto the network. In that way the node doesn't need account management and anyone can write a custom agent suitable for their needs. For example, Mist can also act as an agent if it starts geth in the background. But this will break the current |
This is an interesting discussion for me - I have always thought that |
@bas-vk it sounds like you're describing this with your agents proposal: @chfast what I propose is entirely feasible when the keys are stored in a separate process from the node, like the link I just posted suggests, and looking at geth for security guidance is an awful idea. Keys should not be stored in the node, there should be no unlocked mode where the node signs everything, and if you don't see why, look at Mist's recent $80k theft. I entirely agree with @jimkberry that this inter-tangling was a development convenience, but it should not be treated as a fact of the platform, and certainly not entrenched with new standards. |
Oh sorry @jimkberry I partly misrepresented: It's an interesting point there. Yes, I have been working on a client that allows secure prompted signing on sendTransaction. SendRawTransaction would be hard to work with alone, because it takes the authorization object entirely out of the web3 object, and in turn out of the responsibility of the Ethereum browser, and now other measures would have to be taken for users to sign txs (copy this into your wallet to sign??) While I don't think nodes and wallets should share a process, I do think there's value in a web3 method for requesting a user signature, as long as it's coupled with good UX, and requires confirmation. |
So i would rather focus here on the name, and i prefer The whole, "how and where to sign" discussion, and as @bas-vk says we were thinking already about that since a while, needs to take place in its own ERC. for now its still in geth, but we should warn people when using this In the future only |
Sorry @frozeman for hijacking, it hadn't occurred to me that naming might be an EIP before the actual feature was up for discussion. I'll look forward to the actual discussion, I do think as a community we should make sure these interfaces have common understandings around them, which it sounds like they don't. |
|
Abstract
The following will help finding the right name for the new function to unlock an account and send a transaction in one go.
The function works the same as
eth_sendTransaction
, except that it accepts a password as last parameter, whcih will autounlock the account for this one transaction.So the steps are:
-> method is called with tx object and password
Motivation
The idea is to find a name which is intuitive enough so that people won't get confused when using the API.
API names should be clear, intuitive and distinct from other function names.
Currently we have in geth implemented
personal_signAndSendTransaction
and web3.js uses the nameweb3.eth.unlockAndSendTransaction
.This ERC is to dicuss and find a proper name, which everybody feels comfortable with and which reduces confusion.
Possible names, so far
This names falls under the
personal_
namespace, we currently have:personal_signAndSendTransaction
eth_sendTransaction
, as this one is signing also, just not unlocking the account first (it has to be unlocked)personal_unlockAccountAndSendTransaction
personal_unlockAccount
function, thoPlease give your input on those names, or ideas for better ones.
And lets make this a quick one..
The text was updated successfully, but these errors were encountered: