I wish to know about the data storage in blockchain

0 votes
I wish to know how data is stored in blockchain. What happens when a node calls a function in a smart contract and pass a string as a parameter. Where is this string stored?

Does the string stored twice?? Also, does the variables of smart contracts stored as hashes?
Jun 21, 2018 in Blockchain by Shashank
• 10,350 points
28 views

1 answer to this question.

0 votes

That string would be stored in the tranasction that is generated.
However, it depends on the smart contract that you have installed. Maybe, some smart contract wouldn't save it. 

You don't store anything in the contract storage, you only execute the contract. However, Blockchain stores the info twice: 

Ledger: the Ledger stores all the transactions. The ledger is comprised of a blockchain (‘chain’) to store the immutable, sequenced record in blocks. Each node maintains a copy of the ledger. 

State Database: maintains the current state. It represents the latest values for all keys ever included in the chain transaction log. Smart contract invocations execute transactions against the current state data.

answered Jun 21, 2018 by Johnathon
• 9,080 points

Related Questions In Blockchain

+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Consider following tutorial from Hyperledger Fabric "Getting Started" pages. Basically ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
128 views
+5 votes
1 answer

What are the programming languages I should know to become a Blockchain Developer?

Well, what programming language you have to ...READ MORE

answered Sep 25, 2018 in Blockchain by digger
• 26,550 points
75 views
0 votes
0 answers
+1 vote
1 answer

I would like to create a blockchain network which will stay at the same level of complexity, is it possible?

You can very easily create a cryptocurrency having a ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
59 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
169 views
0 votes
1 answer
0 votes
1 answer

How to check the data integrity logic in proof of work mining?

The proof of work is actually works ...READ MORE

answered May 7, 2018 in Blockchain by Johnathon
• 9,080 points
40 views
+1 vote
1 answer

How does a miner get to know that a transaction is verified by all the nodes?

Contrary to the popular belief, it is ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,080 points
85 views