Skip to content

Commit

Permalink
jjeejj add 2025.02.15
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeejj committed Feb 15, 2025
1 parent 55a34f6 commit a208818
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions jjeejj.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,18 @@ timezone: Pacific/Auckland # 新西兰标准时间 (UTC+12)
2. 共识客户端 一共包含 2 个客户端:Beacon Node 客户端、验证客户端
3. Beacon Node 客户端 可以单独运行,验证客户端必须依赖 Beacon Node 客户端运行

### 2025.02.15

1. ETH Account 账号模型 (更接近银行账户的概念,比较好理解)
1. 分为 外部账户 EOA(External Owned Account) 和 合约账户 (Contract Account)
2. 核心字段
1. nonce:
1. EOA: 账户发送的交易数量,每个交易都会增加 nonce, 主要用于防止重放攻击(Replay Attack),即确保每笔交易只能被执行一次
2. CA: 合约账户,该合约账户已创建的合约数量
2. balance: 账户的 eth 余额 以 wei 为单位(1 ETH = 10^18 wei)
3. codeHash, code: 合约账户 保存相关的代码 和代码的 hash 值
4. storageRoot: 合约账户 存储合约状态的 Merkle 树根哈希
3. 如何创建
1. EOA:通过密钥对 生成 address 地址
2. 通过部署合约创建,根据部署者 address 和当前的 nonce 生成
<!-- Content_END -->

0 comments on commit a208818

Please sign in to comment.