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
49 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,040 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
62 views
+1 vote
1 answer
0 votes
1 answer

How can I modify stored data in blockchain??

One of the important feature of a ...READ MORE

answered Apr 18, 2018 in Blockchain by Christine
• 15,790 points
22 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
60 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
1,504 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,040 points
13 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.