Skip to content

Commit

Permalink
Update tannerang.md 0212
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerang committed Feb 12, 2025
1 parent 721fc52 commit 6deabe6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tannerang.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@ EIP-1559

把 Week2 影片看完,筆記明日補上

### 2025.02.12

在 CL 的 verifyHeader 中的 `errInvalidUncleHash`:
- `Uncle Block` 是指兩個重複且高度一樣的 block,它只在 PoW 下存在,原因是當兩個礦工幾乎同時挖出新區塊且節點之間尚未溝通,但只有一個可被加入 Canonical chain,另一個則是 Uncle Block
- Uncle Block 雖然不是主鏈的一部分,但仍然會獲得部分獎勵,藉 Uncle 機制可以用來減少 PoW 中心化挖礦的優勢
- Uncle Chain 不等於 Orphaned Chain,當發生較長的分叉,較短的那條鏈就會成為 Orphaned Chain,在上面的區塊不會得到任何獎勵,且會被網絡拋棄,交易需要重新打包到主鏈中
- 由於 PoS 的驗證者是預先選定的,不像 PoW 存在多個礦工同時競爭的情況,所以 `UncleHash` 在 PoS 之下沒有意義,在 CL 會直接將 `UncleHash` 判斷為 `EmptyUncleHash`,否則回傳 `errInvalidUncleHash`
- `header.Difficulty` 在 PoS 後也是 0



<!-- Content_END -->

0 comments on commit 6deabe6

Please sign in to comment.