owned this note changed 7 years ago
Linked with GitHub

Life Cycle of An Ethereum Transaction - 陳岱鈴(Miya Chen)

歡迎來到 https://hackmd.io/c/COSCUP2018 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。

請從這裡開始
AMIS Team

  • transaction 為更改 block chain 的單位
  • 可由 account or contract 發起

Life cycle of a transaction

  • 相同 Nonce 未上鍊前可被同樣 Nonce 蓋掉 -> 取消的動作

Sign transaction

牽涉很多 Security 的部分

  • Software wallet - 有聯網
  • Hardware wallet(硬體錢包)
    • 相對安全

Broadcast transaction

  • P2P的世界

Transaction pool

  • 每個節點維護的清單
  • Local transaction:自己產生的
  • Remote transaction:別人傳過來的
  • 當 Transaction pool 不夠大時,可能會只存 Local transaction
  • 能否被執行可分為兩類:
    • Pending
      • 等待上鏈,已可被執行
    • Queued
      • 等待中不被執行,因為 nonce 序號不一致
      • eg. 網路延遲,導致某些 nonce 序號較低的還沒送到

Mine transaction

  • 可以選擇為 miner or node(forwarder or transactor)
  • miner 包 transaction 從自己的 txpool 去包,直到達到 block gas limit
  • Gas price 高者優先
  • 會有人賣空的 Block

transaction 不被執行的原因

  • 發現
    • 發送 ETH 卻沒收到,但明明有上鏈呀!
  • 可能原因
    • Gas 不足 低估 contract 所需
      • 就多給一點吧!反正多的會退回來
    • token balance 不足
    • ETH 網路擁塞
      • 發送後突然暴漲 靠杯
    • 壞鄰居不幫轉送

投影片:

Life Cycle of An Ethereum Transaction

tags: COSCUP2018 blockchain
Select a repo