【以太坊】Ethereum Popular Client: go-ethereum

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wuzh1230/article/details/52622665

Architect

Genesis

Difficulty

External Account

Create

List

Balance

Unlock

Mining

Transfer Transaction

Transaction

Field Type Description
from Address the payer’s external account address
to Address the receiver’s external account address
value ether, wei, dai, szable money to transfer
nonce integer incremental number for a account, to identify each tx created by a account
blockHash hash256 hash of mined block, 0x000… if not mined yet
blockNumber integer sequence number of mined block, 0 if not mined yet
gas integer fee = gas * gasPrice, declared only, changes may return to sender if (fee - gasUsed) > 0
gasPrice ether, wei ,dai, etc fee = gas * gasPrice
transactionIndex int position index in a block

TransactionReceipt

Field Type Description
blockHash hash256
blockNumber int
contractAddress Address null if in transfer transaction
cumulativeGasUsed ether ?
from Address
gasUsed ether actually used fee
logs Array of ? ?
root Hash256 ?
to Address
transactionHash Hash256
transactionIndex int

Contract Creation Transaction

Contract Account

External Account Call A Contract

Contract Calls Another Contract

Virtual Machine

Solc etc: From High-level script to ByteCodes(OpCodes)

Database

Sorted Table(*.sst, *.ldb)

Operation sequence(*.log)

Mainfest

Current

LOG file

Export and Import

Block ⇒ DB

DB ⇒ Block

$ ./geth export blocks.0-782.chain
$ hexdump -Cv blocks.0-782.chain

Appendix

  1. LevelDB
  2. leveldb实现解析
  3. Bloom Filter
  4. Frontier.and.its.followers

Notes

  1. Transfer Transaction: directly operate DB by node miner.

  2. Transaction to call a contract: indirectly operate DB by VM with predefined VM ByteCode compiled from High-Level script).

猜你喜欢

转载自blog.csdn.net/wuzh1230/article/details/52622665