Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Simple signing queue, confirmation APIs exposed in signer WebSockets. #1182

Merged
merged 18 commits into from
Jun 1, 2016

Conversation

tomusdrw
Copy link
Collaborator

@tomusdrw tomusdrw commented May 30, 2016

  1. If --signer is disabled it should just use current implementation (compatibility, see: EthSigningUnsafeClient)
  2. If TrustedSigner is enabled RPC calls are using EthSigningQueueClient, additional personal_* APIs are exposed over WebSockets (PersonalSigner)
  3. Creation of RPC apis is refactored, moved to parity/rpc_apis.rs and used in rpc, dapps and signer.

@tomusdrw tomusdrw added the A0-pleasereview 🤓 Pull request needs code review. label May 30, 2016
@rphmeier
Copy link
Contributor

doesn't interact nicely with the RPC get_transaction_count test yet, but otherwise LGTM

.and_then(|(request, )| {
let queue = take_weak!(self.queue);
queue.add_request(request);
// TODO [ToDr] Block and wait for confirmation?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - current behaviour will break dapps.

in a future PR need to provide a callback-orientated RPC that does a similar job.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have it already fixed on signing-wsnotification branch.
It's waiting for up to 20 seconds and the returns 0x0.

Actually it says here that 0x0 is a valid response if "transaction is not yet available" (whatever that means)
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction

DATA, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning the zero hash here is an acceptable option for the time being given that the spec seems to allow it, and especially since there is a fix pending in another branch.

@gavofyork
Copy link
Contributor

looks good aside from the return value to eth_sendTransaction...

@gavofyork gavofyork added A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. and removed A0-pleasereview 🤓 Pull request needs code review. labels May 31, 2016
@tomusdrw
Copy link
Collaborator Author

Any ideas how to solve waiting for confirmation issue (apart from waiting with timeout which will be done in a next PR when this get's merged)?

Tomasz Drwięga added 2 commits June 1, 2016 13:53
@gavofyork gavofyork merged commit 99e26b8 into master Jun 1, 2016
@gavofyork gavofyork deleted the signer-signing branch June 1, 2016 17:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants