11

I'm working on developing a decentralized application which requires every user of the Android app to have separate account containing his ether balance information and other user-specific information.

I read about the concept of light-clients and full-nodes but came to know the official Ethereum light-client is still under development.

Then I stumbled on these articles about using ethereum in Android and Iphone. So they kind of suggested of creating a Full-Ethereum node and make your app interact with this node using JSON-RPC protocol. So I came up with the following architecture:

Android App (Contains user's private key and data) ----> Ethereum Full-node server (Set up using available clients for ethereum (in python)) -----> Ethereum Virtual Machine.

I've some questions as follows:

  1. Is the above architecture safe? (What happens if server is compromised or the server is biased)

  2. Do I need to create a Full-node Ethereum client corresponding to every Android app user.

  3. What type of user's data will the Full-node server need to process a transaction on its behalf?

Last one is slightly out of context and might be very vague, Given a JSON-RPC library like [web3j][3] and a full-node client like [pyethapp][4] running on a different device, How would I make the web3j interact with pyethapp

4
  • 3
    Hi. You may want to check this blog post. web3j.github.io/web3j/infura.html Disclaimer: I am INFURA Founder. Dec 20, 2016 at 11:17
  • @HermanJunge Is it possible to use testrpc instead of Infura? Because I don't have Ethers to test on live network.
    – Satwik
    Dec 22, 2016 at 8:26
  • And can we connect my remote ethereum client to Android app using web3j and service like ngrok
    – Satwik
    Dec 22, 2016 at 8:30
  • 1
    Consider investigating the Status mobile app; currently preleased here: status.im Jan 17, 2017 at 17:00

1 Answer 1

2
  1. Is the above architecture safe? (What happens if server is compromised of the server is biased)

Provided the users keys are stored only locally on the users device, this is a pretty safe architecture. However, I can imagine a possible attack vector where traffic between your users and your node is compromised, and incorrect information about the statement of the network is provided, causing your users to make ill-advised transactions. I'm not sure how likely that actually is for your application, but if it seems like something you should defend against, then using a secondary source of truth would help.

  1. Do I need to create a Full-node Ethereum client corresponding to every Android app user.

No

  1. What type of user's data will the Full-node server need to process a transaction on its behalf?

None, provided transactions are all properly signed before sending

To interact with the remote node, you can just provide the ip and port to web3.js like this:

web3.setProvider(new web3.providers.HttpProvider('http://ipaddress:port'));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.