2

I'm fairly new to blockchain technology and need some advice for my first application. I'm creating a dApp for Asset Tracking using a private ethereum blockchain network. I have already created the private network with four nodes and have all the necessary development tools installed on them. Some of the questions I have,

Q1: How do I store the non-transactional data on the block chain?

Q2: Ethers on the private network are free but I want to understand how it can work on the public ethereum network.

Q3: How many accounts do I need? Assets can move from one location to another, does that mean each location requires an account?

Thank you!

1 Answer 1

1

Q1: How do I store the non-transactional data on the blockchain?

There is no "non-transactional" data. The blockchain is a well-ordered set of transactions that may include contract deployments, function invocations and value transfers. Populating a table would be a series of function invocations that would be recorded as immutable transactions. In a sense, the data "lives" in the transaction history.

Q2: Ethers on the private network are free but I want to understand how it can work on the public ethereum network.

Ethers on the private network would be treated as counterfeit on the public chain - worthless.

Q3: How many accounts do I need? Assets can move from one location to another, does that mean each location requires an account?

Data is in all locations at all times. "Users" is largely an application-level concern. Ethereum externally owned accounts are an in-built authentication system. To "be" a user means signing transactions with a private key. What the identified user is entitled to depends on the contract design.

Nodes are replicas. Each node has a replica of the entire chain state. Users need connectivity to one node. A common pattern is to deploy one or more nodes in each organization that will participate in a private network. This, to prevent any organization from having an unfair advantage, particularly if the network involves competitors forming a private network to house something about which they all need a common source of truth.

Hope it helps.

5
  • Wouldn't you still require a traditional database for storing large volume of data within the dApp? For example, product description with image.
    – A. Eth
    Aug 21, 2018 at 16:46
  • Correct. Blockchain is an extraordinary solution. Use it to solve extraordinary problems. It's not a 1:1 replacement for databases or object stores. Aug 21, 2018 at 16:50
  • Thank you for your help! It makes sense. What would be a recommended data storage solution for traditional data within a dApp?
    – A. Eth
    Aug 21, 2018 at 19:16
  • How to do data is a broad question to sum up in a short comment. I would separate concerns and say that data the contracts need for internal logic must be stored in the contract state. Other metadata can be stored elsewhere. If the users need "proof" of that data, then on-chain hashes can provide it. As far as the on-chain component of it, have a look over here: ethereum.stackexchange.com/questions/13167/… and also maybe digest the Medium blog posts on the topic linked at the end. Thanks for accepting the answer. Aug 21, 2018 at 19:31
  • Thank you again! It's a very informative article. medium.com/@robhitchens/solidity-crud-part-1-824ffa69509a
    – A. Eth
    Aug 21, 2018 at 20:25

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.