以太坊柏林硬分叉正式激活,主網將迎哪些更新?

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021 年 4 月 15 日(星期四)下午 6:12 分左右,柏林硬分叉在主網的 12244000 區塊上正式激活。近一週以太坊全網算力均值爲502.37 TH\/s,平均出塊時間13秒。目前已有74.6%的客戶端準備就緒。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/d0\/d09381ac1f7143e312c4c988eb3d24e3.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"據悉,因 Geth 客戶端的過於集中化的問題,本預期在 2020 年 7 月上線的柏林硬分叉一路延期至今。與早期以太坊網絡升級略有不同,此輪升級不需要在 Meta EIP 中進行跟蹤。柏林硬分叉之後,其他升級工作均將在 eth1.0-specs repo 當中進行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"柏林硬分叉中包含哪些變更?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"此次柏林硬分叉主要優化以太坊的主網性能、優化合約,涵蓋 Gas 效率、以太坊虛擬機 (EVM) 讀取代碼方式的更新,以及防止拒絕服務 (DDOS) 攻擊等。在部署到主網以前,此次升級會先在 Ropsten、Goerli 和 Rinkeby 測試網上運行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"具體操作中,柏林硬分叉將以下四個 EIP 引入以太坊網絡。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":5},"content":[{"type":"text","text":"EIP-2565:降低 ModExp 預編譯合約成本"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/eips.ethereum.org\/EIPS\/eip-2565","title":"","type":null},"content":[{"type":"text","text":"https:\/\/eips.ethereum.org\/EIPS\/eip-2565"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"該項提案主要是對先前用於模塊化乘冪的預編譯機制 EIP-198 進行重新定價。EIP-198 是一項專門用於模塊化冪去處的函數,引入了多種加密算法以支持 RSA 簽名驗證。EIP-2565 將降低 gas 成本,使其與其他操作的執行成本保持一致。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/wechat\/images\/12\/124cbd0fdaace336e088fd0c834af5b5.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"PEEPanEIP-2565 發佈的 gas 定價圖表"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":5},"content":[{"type":"text","text":"EIP-2718: 增加交易類型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/eips.ethereum.org\/EIPS\/eip-2718","title":"","type":null},"content":[{"type":"text","text":"https:\/\/eips.ethereum.org\/EIPS\/eip-2718"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這項提案將引入一種新的交易類型,能夠以“信封”(Envelope)形式輕鬆支持多種交易類型。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當初在以太坊首次登陸主網時,僅支持一種交易類型,其字段爲“To”(交易執行的位置)與“Data”(交易中所包含的一切數據)。以太坊客戶端採取同步行動,且必須保證各方在完全相同的時間內執行完全相同的變更。因此,如果“To”字段爲 0,則所有客戶端就必須將“Data”字段解釋爲合約部署並以特定方式立即執行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一段時間以來,用戶對於交易類型的需求不斷髮展。這方面趨勢最早在 EIP-155 — 對簡單重播攻擊的保護 中有所體現。但客戶當時並不同意引入新的交易類型,而是更傾向於以差異化方式解釋該字段。EIP-155 中的“僞龍(Spurious Dragon)”硬分叉是一項共識變更硬分叉,要求所有客戶就該字段的解釋達成共識。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"此次 EIP-2718 的發佈無法直接解釋 EIP-155 的複雜性問題,但有助於阻止未來更多複雜性因素的引入,同時也讓新型交易類型(例如 EIP-1559 式交易)的添加變得更加輕鬆易行。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":5},"content":[{"type":"text","text":"EIP-2929: 增加狀態訪問操作碼的 GAS 消耗"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/eips.ethereum.org\/EIPS\/eip-2929","title":"","type":null},"content":[{"type":"text","text":"https:\/\/eips.ethereum.org\/EIPS\/eip-2929"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這項提案關注的是在交易中首次使用 SLOAD,CALL, BALANCE, EXT與 SELFDESTRUCT 時,存在的 Gas 成本增加問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"例如,首次執行會令 CALL 系列函數的 gas 成本由 700 大幅增加至 2600,SLOAD 系列函數則增加至 2100。但對於各個地址或存儲槽位,這種高額費用只會產生一次。這意味着除首次調用之外,交易中任意數量的後續調用都僅耗費 100 gas。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"之所以上調首次調用的 Gas 成本,是爲了緩解以太坊中的最大 DoS 攻擊向量。這種設計也有助於在無狀態以太坊環境下限制必要的見證人規模。目前,Merkle 證明所需要的見證人數量要遠大於驗證特定區塊鏈的必要數量,以太坊正在尋求新的規模控制方法。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然 EIP-2929 還無法徹底解決證人數量問題,但至少控制住了過高的 Gas 成本。另外,EIP-2929 還能降低預編譯的調用成本,消除預編譯訪問所產生的額外 700 gas 開銷。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":5},"content":[{"type":"text","text":"EIP-2930: 可選訪問列表"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/eips.ethereum.org\/EIPS\/eip-2930","title":"","type":null},"content":[{"type":"text","text":"https:\/\/eips.ethereum.org\/EIPS\/eip-2930"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"此項提案的主要目標是修復現有合約中的重大變更並緩解由 EIP-2929 所引發的部分 Gas 成本增長。此提案將添加一種交易類型,其中包含交易操作打算訪問的目標列表(即地址與存儲鍵列表)。通過指定訪問列表,客戶可以更輕鬆地處理交易,更安全地降低 Gas 成本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"EIP 管理與治理方面迎來哪些變更?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“繆爾冰川”是一項獨立的升級提案,也是當初在鏈上發佈 Ice Age 功能時的必要網絡要求。爲了趁早與其他提案一同部署,以太坊團隊在 2020 年 1 月將“繆爾冰川”部署在了主網之上。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了設計出更好的網絡升級流程,EIP 編輯、EIP 作者、客戶端開發者、ECH 以及其他社區成員組成了 EIP 改進流程(EIPIP)小組。以太坊 Cat Herders 還組織了一輪項目關鍵安裝調查,希望瞭解以太坊客戶羣體中的多樣性現狀。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"此外,客戶端開發者將持續研究不同建議,不斷改善網絡性能與安全性,併爲後續升級打下堅實的基礎。由於升級週期較爲平緩,我們可以充分利用這段時間爲下一次的“倫敦(London)”升級添加更多新功能。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"節點運營者或礦工需要下載以太坊客戶端的最新版本,目前可升級的 Eth1.0 客戶端包括:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}],"text":"Geth — "},{"type":"link","attrs":{"href":"https:\/\/github.com\/ethereum\/go-ethereum\/releases\/tag\/v1.10.1","title":null,"type":null},"content":[{"type":"text","text":"Gemini Sigma (v1.10.1)"}],"marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}],"text":"OpenEthereum — "},{"type":"link","attrs":{"href":"https:\/\/github.com\/openethereum\/openethereum\/releases\/tag\/v3.2.0","title":null,"type":null},"content":[{"type":"text","text":"OpenEthereum v3.2.0"}],"marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}],"text":"Nethermind — "},{"type":"link","attrs":{"href":"https:\/\/github.com\/NethermindEth\/nethermind\/releases\/tag\/1.10.31","title":null,"type":null},"content":[{"type":"text","text":"v1.10.31"}],"marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}]}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}],"text":"Besu — "},{"type":"link","attrs":{"href":"https:\/\/github.com\/hyperledger\/besu\/releases\/tag\/21.1.2","title":null,"type":null},"content":[{"type":"text","text":"21.1.2"}],"marks":[{"type":"color","attrs":{"color":"#494949","name":"user"}}]}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"注:如果您在以太坊公鏈上使用 Besu,則必須升級至 21.1.2。此版本包含所有受支持的測試網與以太坊主網 Berlin 激活區塊。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"相關鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/medium.com\/ethereum-cat-herders\/the-berlin-upgrade-overview-2f7ad710eb80","title":"","type":null},"content":[{"type":"text","text":"https:\/\/medium.com\/ethereum-cat-herders\/the-berlin-upgrade-overview-2f7ad710eb80"}]}]},{"type":"heading","attrs":{"align":null,"level":5}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章