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
• 26,740 points
1,449 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,370 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 21, 2019 in Blockchain by Rajendra
828 views
0 votes
0 answers

How I can check where the data is actually stored when we deploy blockchain?

How I can check where the data ...READ MORE

May 14, 2020 in Blockchain by Zara
• 140 points
1,020 views
0 votes
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
1,916 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
• 26,740 points
45,200 views
0 votes
1 answer

How do I add multiple recipients for transactions via Blockchain API?

Convert the recipes into JSON objects. x = ...READ MORE

answered Jul 6, 2018 in Blockchain by Perry
• 17,100 points
880 views
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,370 points
677 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP