status-im / open-bounty

Enable communities to distribute funds to push their cause forward.
https://openbounty.status.im/
GNU Affero General Public License v3.0
118 stars 36 forks source link

Add offline transaction signing #303

Closed vitvly closed 6 years ago

vitvly commented 6 years ago

Fixes #302

This adds support for offline transaction signing. Additionally, some unused fns were removed.

Status: Finished.

Note: html2png.sh is needed because of https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2037 (Debian systems cannot run headless)

martinklepsch commented 6 years ago

I think updating the documentation in the README would also be nice, i.e. answering: "How do I use this?"

vitvly commented 6 years ago

Right! Added some.

martinklepsch commented 6 years ago

@rcullito @omartell You've both mentioned some trouble getting Geth set up. If you feel like you could try this PR and let us know if this improves the situation. There's no bounty for testing this but asking doesn't hurt. Thanks! 🍻

rcullito commented 6 years ago

@martinklepsch @siphiuel thank you both... this pass is definitely much more accessible! (at least for a newcomer like me). I had just two remaining questions about the setup process after going through the updated README from this branch.

  1. what exactly is the "bot" account referring to? this comes up a few times in the .edn file for: a.) correct account, password, and wallet file b.) github username + password

I currently have these fields populated but don't believe they are correct for the bot account, and am getting some errors compiling MultiSigTokenWallet.

  1. is it assumed that the :server-address should be the publicly facing equivalent of localhost:3000?
vitvly commented 6 years ago

@rcullito Hi! Responses to your questions below:

  1. what exactly is the "bot" account referring to? It actually refers to both a.) correct account, password, and wallet file - these will be used for posting bounties and transacting contracts. b.) github username + password - these refer to the dummy GitHub user that is used to post GitHub comments for issues with a bounty.

  2. is it assumed that the :server-address should be the publicly facing equivalent of localhost:3000? Yes

Also, what errors exactly are you getting when compiling MultiSigTokenWallet? Are you on proper versions on web3j (should be 2.3.0) and solidity (should be 0.4.15)?

vitvly commented 6 years ago

I think that in order to QA this task the following two env vars have to be set prior to running the commiteth java process:

offline_signing=true eth_rpc_url=<Infura_Ropsten_URL> java -jar commiteth.jar ...
rcullito commented 6 years ago

@siphiuel thanks for addressing all of my questions. I realize was not as clear in asking them as I might have been. Namley, is the “bot” account different from (in my case) either rcullito or status-open-bounty? I wasn’t sure if it was status-open-bounty - how to go about getting the password or generating the wallet file for that account? And then the same question for github user? I have credentials in place, but I am still not sure what the "bot" account refers to?

web3j is at 2.3.0 although installing solidity via brew at that specific sha was failing (Undefined symbols for architecture x86_64:) so I currently have tried with both 0.4.18 and 0.4.20

setting web3j to 2.3.0 solved the original compilation errors I was facing.

Thanks again for helping me work through it. 🙏

vitvly commented 6 years ago

@rcullito You're welcome!

You can use your GitHub user and your Ethereum account for the bot. There's nothing specific about it.

vitvly commented 6 years ago

Don't think it is possible to use credentials in Web3j without WalletUtils/loadCredentials.

churik commented 6 years ago

Already on prod env (offline signing with Infura) Created #346. Tested on testing env and staging env

Environments

Tested functionality

churik commented 6 years ago

Because PR is already in master, merged to develop.