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

in ethereum •  7 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.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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