Things i have learned in my journey learning Ethereum development - Notes 1

in #ethereum6 years ago (edited)


ethereum-notes.jpg

 
✍ The data is stored as part of the smart contract.

✍ There is a limit on the ethereum smart contract storage but its HUGE . Contract storage is a key of 32 bytes and a value of 32 bytes, so the maximum a single contract can store is around 2^261 bytes (2^256 * 32b). Even if the storage is huge you may know that the price of storage is very high so that will be the reason why no one would like to swamp the network with junk data.

✍ The Ethereum chain is not built for storing (& querying) large documents. It 's common practice to have a hash of a big document instead.

✍ A transaction - which is immutable - once in the ledger cannot be changed/deleted.

✍ A Transaction in the ledger can be:

  • transfer of value such as ethers
  • deployment of contract
  • invocation of contract

✍ A contract manages the state by way of storage variables . Transactions can cause the state of the contract to change and all such state changing transactions are recorded in the ledger. State change = storage variable value change.

✍ In Ethereum there is no facility to write a query (traditional sense). It is possible to use the events/logs mechanism because you can easily emit events from the contracts. These events become part of the log data that you may query in an offline manner. Obviously there are constraints if you try to do it against geth/node.

✍ Tought on making data queryable from a DAPP: read the data from events into a tranditional database . Then populate the database to create correlation between the database and blockchain. Now now you may query the Database to get data infromation.

Sort:  

As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64223.84
ETH 3158.34
USDT 1.00
SBD 4.29