Skip to content

Commit

Permalink
Update poyucheese.md 0214
Browse files Browse the repository at this point in the history
  • Loading branch information
poyucheese authored Feb 14, 2025
1 parent 6d6a800 commit 12cebc4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions poyucheese.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,37 @@ week 4 是有關 Ethereum 測試的內容。
- 區塊鏈負測試(Blockchain Negative Testing):
- 插入無效區塊,檢查客戶端是否能正確拒絕此區塊並 revert 到先前的有效區塊。

### 2025.02.14

#### [SGweek4](https://epf.wiki/#/eps/week4)

##### Consensus Layer Testing

- 用於驗證 Ethereum 共識層的行為,確保所有 CL 客戶端遵循相同的規範,並在相同條件下得出一致的結果,防止因實作差異導致區塊鏈分叉或共識錯誤。
- 測試用例包含在規範內,適用於所有客戶端。
- 提供比 EVM 測試更多樣的格式,讓開發者能針對不同需求對各部分進行不同程度的測試。
- CL 測試涵蓋 Ethereum 2.0 的信標鏈,驗證區塊提議、驗證者行為等重要機制。核心測試內容包括:
- **區塊處理(Block Processing)**
>測試信標鏈如何處理新的區塊,確保狀態轉換符合規範。

- **狀態轉換(State Transition)**
>確保不同客戶端在相同條件下,最終產生相同的信標鏈狀態。
- **驗證者(Validators)行為測試**
>測試驗證者的投票、獎勵和懲罰機制,確保一致性。
- **同步協議(Sync Protocols)**
>測試客戶端如何下載並同步信標鏈數據。
- **罰沒機制(Slashing Conditions)**
>驗證當驗證者違反規範時,客戶端是否能正確執行罰沒機制。
- **最終性檢查(Finality Checks)**
>確保共識協議能夠正確確定哪些區塊已被最終化。
---
##### CL 測試的重要性

CL 在 Ethereum 2.0 中負責整個網絡的共識機制。若 CL 客戶端出現錯誤,可能會導致**區塊無法最終化****錯誤的區塊被最終化****驗證者錯誤行為**,導致資金損失或網絡不穩定。
因此,CL 測試確保 所有 CL 客戶端遵循相同的共識規則,保證以太坊網絡的安全性和穩定性。

<!-- Content_END -->

0 comments on commit 12cebc4

Please sign in to comment.