Where is the data stored in blockchain?

0 votes
I am new to blockchain technology and I have understood the basics of how it works.
My question is: when a smart contract is executed or when a node calls a functions passing some values, where are these values stored? Are they stored in the smart contract or in the block? And also can someone tell me how a block looks like?
Jun 29, 2018 in Blockchain by digger
• 27,620 points
76 views

1 answer to this question.

0 votes
The smart contract is just the business logic of the blockchain so it does not store any values. Whether the data is stored in the blockchain or not depends on the smart contract. The smart contract can choose to store or not to store the values in the block.

The blockchain stored the values/information in two places:

1. Ledger: It stores all the transactions and is immutable.

2. State Database: It maintains the current state and represents the most recent values or changes made to the
chain.

To know the structure of the block, see the following link:
https://dev.to/damcosset/blockchain-what-is-in-a-block-48jo
answered Jun 29, 2018 by slayer
• 29,050 points

Related Questions In Blockchain

+1 vote
1 answer

How the data stored in the blockchain is verified?

Hey @mayukha. When a transaction is is ...READ MORE

answered May 20 in Blockchain by Rajendra
30 views
+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
91 views
+1 vote
1 answer
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
105 views
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 27,620 points
2,141 views
0 votes
1 answer
0 votes
1 answer

why are permissions not stored in blockchain?

When a channel is created, the configurations ...READ MORE

answered Jul 10, 2018 in Blockchain by slayer
• 29,050 points
16 views