区块链系列五:Ethereum学习笔记

Ethereum的一些笔记。

账号管理

externally owned accounts (EOAs) and contract accounts

Contracts and Transactions

This execution needs to be completely deterministic, its only context is the position of the block on the blockchain and all data available.

Gas

Clearly Ethereum is not about optimising efficiency of computation. Its parallel processing is redundantly parallel.

The fact that contract executions are redundantly replicated across nodes, naturally makes them expensive, which generally creates an incentive not to use the blockchain for computation that can be done offchain.

Estimating transaction costs

Total cost = gasUsed * gasPrice

Contracts generally serve four purposes:

  • Maintain a data store
  • “forwarding contract”
  • Manage an ongoing contract or relationship between multiple users.
  • serving as a software library.

Dapps

Remember that because of the redundant nature of computation on the Ethereum network, the gas costs of execution will always be higher than private execution offchain. This incentivizes dapp developers to restrict the amount of code they execute and amount of data they store on the blockchain.

  • Dapp directories
  • Dapp browsers
  • IDE / frameworks
  • console
  • Whisper
  • Swarm
  • RANDAO
  • EVM

开发工具

其他