Skip to content

Commit

Permalink
Merge branch 'main' of github.com:IntensiveCoLearning/Ethereum-Protoc…
Browse files Browse the repository at this point in the history
…ol-Fellowship
  • Loading branch information
rayjun committed Feb 15, 2025
2 parents f3443e1 + 1e1b7e0 commit 44fe64f
Show file tree
Hide file tree
Showing 27 changed files with 673 additions and 55 deletions.
4 changes: 4 additions & 0 deletions CHENFANGC.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,8 @@ EOA 可以发起交易,交易类型包括:
- week 2 视频观看完成,深入研究以太坊的执行层。深入探讨 Lightclient 的 EL 内部结构。
- 阅读了关于 EVM 的一些介绍。https://www.evm.codes/about

### 2025.02.14

观看 [Town Hall 的回放](https://youtu.be/7L1270CWjXw)

<!-- Content_END -->
28 changes: 28 additions & 0 deletions Echocipher.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,32 @@ Yes!!!
5. 以太坊建立了成熟的生态系统:De-FI
6. 更好的节点硬件=更好的以太坊性能。

### 2025.02.14

#### 区块链定义

通过多个区块组成链条,每个区块包含一组交易信息,并与前一个区块通过Hash进行连接,该链条被保存在所有分布式网络的节点,只要有一个节点可以工作,整个区块链数据就是安全的。
要想修改区块链中的信息,必须半数以上的节点同意
相比传统网络,区块链核心特点为:数据难以篡改,去中心化

#### 区块链工作流程

1. 创建交易
2. 交易验证
3. 交易打包成区块
4. 区块广播

共识机制:解决分布式的节点之间怎么达成共识的问题,各个区块链平台都有一个节点共同遵守的算法协议,这便是共识机制。常见的共识机制有比特币所使用的 POW(工作量证明)、以太坊使用的POS(权益证明)

工作量证明(PoW):矿工节点通过解决复杂的数学问题来竞争区块的添加权,解决问题最快的节点将区块添加到区块链中,并获得比特币奖励
权益证明(PoS):PoS 有很多变种,在 Pos 中,质押一定数量的代币可成为验证者,网络通过一定的随机算法从验证者中选出出块的验证者

#### 区块链解决问题

1. 中心化控制问题
2. 隐私和数据安全问题
3. 高昂的中介成本
4. 缺乏透明度
5. 内容审查和限制

<!-- Content_END -->
3 changes: 3 additions & 0 deletions LouisTsai-Csie.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ Watching the video for introducing the EOF and some examples in the update: http
### 2025.02.13
Watch this video to learn stack validation algorithm in EOF upgrade: https://www.youtube.com/watch?v=80szRrNW0MM It is hard to learn purely from EIP, but the video demonstration is clear.

### 2025.02.14
Start reviewing the EEST codebase and try to find an issue I could contribute to, and dive deeper into the EOF implementation.

<!-- Content_END -->
13 changes: 13 additions & 0 deletions Lvista.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,17 @@ a committee, [with each person randomly sitting in power](# "随机坐庄").
- You should become a staker before validator(Means that holding ETH in fact)

### 2025.02.14

#### Why is the committee set to 128 people
[Minimum Committee Size Explained](https://medium.com/@chihchengliang/minimum-committee-size-explained-67047111fa20)
> See also: https://ethos.dev/beacon-chain
This photo is one from the article above.
![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*hoRCxFzkTaHZuXdo1kfqyQ.png)
- A constant `TARGET_COMMITTEE_SIZE` of 128 is chosen as an approximate number of 111 because every constant in the specification is defined as a power of 2.
- $\frac{1}{3}$:Supposing the rate of attackers😈 in all validators is $\frac{1}{3}$.
- $k = [\frac{2}{3}n]$: k means the num of attackers😈 when a new committee
with $n$ validators is chosen. The $\frac{2}{3}$ here does not means the rate of honest validators😇 in all validators($1-\frac{2}{3}$). In PoS of ethereum, it needs 2/3rd majority to attest and block on to the beacon chain.

### 2025.02.15
<!-- Content_END -->
33 changes: 33 additions & 0 deletions PubYuCHe.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,37 @@ Finality (最終性): 當一個檢查點 (checkpoint) 被驗證 (justified) 時

### 2025.02.14


執行層測試

EVM 測試
主要目的: 驗證每個執行客戶端是否都遵守規範,否則可能會在鏈中引起潛在的正向分叉。
設定: 為每個客戶端提供相同的輸入,並期望在給定相同的環境、前狀態、硬分叉激活規則的情況下,從每個客戶端獲得相同的輸出。
測試的重要特徵:
前狀態 (Pre-state): 以太坊鏈的完整組成,由包含餘額、nonce 值、程式碼和儲存的帳戶組成。
環境 (Environment): 根據測試的類型,環境可以指定諸如時間戳、先前的 RANDAO、區塊號、先前的區塊哈希值、總 gas 限制、基礎費用和硬分叉激活時間等內容。
交易 (Transaction(s)): 發送到區塊鏈的消息,用於在區塊鏈上執行操作,其中包含發起和目標帳戶、以太幣價值、gas 限制和資料。
後狀態 (Post-state): 由修改或創建的帳戶組成的結果狀態。

EVM 測試 - 測試填充
測試填充的定義: 將測試原始碼編譯成一個「fixture」(測試夾具) 的過程,這個 fixture 可以被任何執行客戶端所使用。
測試填充 vs 客戶端單元測試: 對於測試填充來說,完全相同的測試可以在任何客戶端實作中執行。而對於客戶端單元測試來說,不同的客戶端團隊之間的測試可能會有所不同。

特點: 所有不同格式的測試夾具 (test fixtures) 都是單一的 JSON 檔案,可供每個客戶端使用。
1. 狀態測試
使用狀態根 (state root) 進行驗證: 給定相同的前狀態 (pre-state) 和相同的交易 (transaction),不同的客戶端應該返回相同的狀態根 (state root)。
狀態根 (State root): 安全地提交狀態的所有內容的密碼學計算結果。

2. 模糊差異狀態測試 (Fuzzy differential state testing)
在設計好的交易之上,將使用 FuzzyVM 工具添加模糊測試的智能合約程式碼。 仍然期望不同的客戶端返回相同的狀態根 (state root)。

3. 區塊鏈測試 (Blockchain testing)
由於我們在執行客戶端上檢查的並非所有內容都是 EVM 執行的一部分,例如先前區塊的執行結果、1559 基礎費用等,因此也需要完整的區塊測試來驗證客戶端的執行。

4. 區塊鏈負面測試 (Blockchain negative testing)
在某個時間點添加一個無效區塊,以檢查客戶端是否可以為了設計目的拒絕該無效區塊,返回到先前的有效區塊並聲稱它是鏈頭 (chain head)。


### 2025.02.15

<!-- Content_END -->
Loading

0 comments on commit 44fe64f

Please sign in to comment.