2

I understand that on the bitcoin blockchain only transactions of bitcoin are stored (transactions with the amount of bitcoin, the two public keys of exchangers and their signatures). But Ethereum seems to be based on smart contracts so I suppose that the only things that are stored on the ethereum blockchain are :

  • compiled smart contract code (Compiled from solidity script for example)
  • transactions corresponding of functions calls in those smart contracts

Is that all ?

2

3 Answers 3

3

You can conceptually dive Ethereum store as:

  • Chain data (list of blocks)
  • State data (storage modified by smart contract code)

Chain data containing block hashes is necessary to ensure that all of the transactions are cryptographically consistent. State data is not obligatory as it may be reconstructed by replaying all of the historical transactions. In fact, often the state is pruned to save storage space consumed by the blockchain node.

I hope it answers your question.

1

At the most basic level a 'transaction' stored on the Ethereum blockchain specifies the address of the sender, the address of the receiver, and the amount of Ether sent.

A transaction can also contain input data which is stored on the chain (for example the compiled sourcecode of a contract) or tells the Ethereum Virtual Machine to execute a method on a previously deployed contract.

The way that bytecode is generated (from for example a contract written in Solidity) is a little more complex.

0

This article written by me provides a complete and clear answer to your question. As the explanation is detailed it's better to not to copy and paste so much content here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.