Show Posts
|
Pages: [1]
|
Hi,
For this public string data; it can be any data. For example some status information about an ingredient.
I am just a learner, so not really sure if blockchain will have any use when financial transactions are not involved.
Thinking for example recent food scandal (some company put horse meat in beef products), if the database can be decentralized and queried by everyone, but only certain nodes can write to db, it will be easy for everyone to see where the beef was sourced as we can trace from top to bottom. Maybe that will deter people from doing such thing?
|
|
|
Hi, Thanks for the reply, you are right a private key will stop the hacker.
Do you think that a transaction is needed or not in this example? I am still thinking not.
|
|
|
I learned blockchain concept by using some tutorials based on cryptocurrency.
However, to make me understand this fully, I am thinking of this example: A blockchain to track the ingredients for restaurants so their customers know that the food they eat are indeed from the claimed source.
In this example usage, do I still need the concept of transaction? Can't I use a minimal block like this
public class Block{ public int number; public string hash; public string previoushash; public int timestamp; public string data; }
I am not sure how to solve a conflict? Say a restaurant and a hacker both send a block relating to an ingredient, how the algorithm knows which one is valid? The tutorial says longer chain will win, but how it works in reality?
Say in total there are 10 nodes. 2 nodes send a conflicting block (say block 10) and as a third node on the network, how can I know which block is valid if no further block has been added?
|
|
|
|