0

Hi I'm an ethereum noob and I have a few questions about integrating ethereum into my app.

Imagine I want to create a transaction on the blockchain every time a user opens the MySecret app. I want to log this information. Eventually I will reward the users with "MySecret" tokens for letting me log this information. My questions are:

  1. Can I just use the standard Ethereum blockchain? Or do I need to create my own private chain?
  2. When I create this transaction, do I need special nodes to verify this transaction was indeed from a real device (and generated by a hacker)? Or does Ethereum handle this already? If I need special nodes to verify the transaction, won't I need several devices that have a lot of computing power?
2

1) For production, you can (and should) use the standard ethereum network, a.k.a "mainnet", network id #1. All other ethereum networks are for testing/development. For local developement, the easiest is to use the npm package ethereumjs-testrpc, a local blockchain that does not connect to any other node.

2) You dont need to run any special node to verify transactions. A standard ethereum node already does this. You can either run your own node for more security or just broadcast your transaction to an external node, like infura. Please not that the ethereum network will just check that the transaction was signed by the entity claiming to have created the transaction. It does not perform other checks like "does this come from a real device?". It will be up to you to perform this verification, outside the ethereum network.

One solution to perform extra verification would be the following: First, you determine that the transaction satisfies all your criteria (come from a real device, etc..). Then, you sign it with your own private key and send it to the ethereum network. In your smart contract it will check that the transaction was signed by you, and perform the transaction if thats the case.

  • Thanks! For determining if a transaction comes from a real device, does that mean I need to have a local copy of the private key on every client? Is this safe? – bigpotato Nov 20 '17 at 14:22
  • Im not quite sure what you mean by "a transaction come from a real device", but all I can tell you is that its not something the blockchain will provide you, so you need to handle this outside the blockchain – Julien Klepatch Nov 20 '17 at 23:05
  • Is there a way to check that it's not a hacker who made the transaction from his basement? That's what I meant by "a transaction from a real device". Would I have to generate a public key for each device? – bigpotato Nov 22 '17 at 21:14
  • As long as you use ethereum accounts for your users and in your smart contract you check access based on msg.sender, the security is guaranteed by the network, and is probably much better that a traditional web apps with user/password – Julien Klepatch Nov 23 '17 at 5:33
2

Can I just use the standard Ethereum blockchain? Or do I need to create my own private chain?

You don't need to create any private chain for integrating you DAPP with blockchain. You can directly link the DAPP to Ethereum Main Network, through web3 and truffle.

When I create this transaction, do I need special nodes to verify this transaction was indeed from a real device (and generated by a hacker)? Or does Ethereum handle this already? If I need special nodes to verify the transaction, won't I need several devices that have a lot of computing power?

You don't need to verify any of your submitted transaction, Ethereum will take care of verifications. After successfully your transaction was mined Ethereum will return the Transaction status as 0x0 (failure) or 0x1 (Success). Based on this you can determine either the transaction was deployed successfully or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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