Skip to content

Commit d5f2d8d

Browse files
author
corey
committed
clean
1 parent 8ae80bd commit d5f2d8d

File tree

9 files changed

+110
-2002
lines changed

9 files changed

+110
-2002
lines changed

node/core/sequencers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ func (e *Executor) VerifySignature(tmPubKey []byte, messageHash []byte, blsSig [
3838
e.logger.Info("we are in dev mode, do not verify the bls signature")
3939
return true, nil
4040
}
41+
//// Skip BLS verification for non-sequencer nodes (they may not have correct sequencer set from their geth)
42+
//if !e.isSequencer {
43+
// e.logger.Debug("non-sequencer node, skip bls signature verification")
44+
// return true, nil
45+
//}
4146
if len(e.valsByTmKey) == 0 {
4247
return false, errors.New("no available sequencers found in layer2")
4348
}

ops/mpt-switch-test/README.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# MPT Switch 测试
1+
# MPT Switch Test
22

3-
测试 sequencer node sentry node MPT 升级时间点的客户端切换逻辑。
3+
Test the client switching logic of sequencer node and sentry node at MPT upgrade time.
44

5-
## 架构
5+
## Architecture
66

77
```
8-
升级前: 升级后 (交换):
8+
Before upgrade: After upgrade (swap):
99
┌─────────────┐ ┌─────────────┐
1010
│ Sequencer │──► ZK Geth │ Sequencer │──► MPT Geth
1111
│ Node │ (:8545) │ Node │ (:9545)
@@ -17,17 +17,17 @@
1717
└─────────────┘ └─────────────┘
1818
```
1919

20-
**关键点:**
21-
- 两个 Node 共用同样的两个 Geth 实例
22-
- 升级时间到达后,两个 Node 交换 Geth 连接
20+
**Key points:**
21+
- Both nodes share the same two Geth instances
22+
- When upgrade time is reached, both nodes swap Geth connections
2323
- Sequencer: ZK Geth → MPT Geth
2424
- Sentry: MPT Geth → ZK Geth
2525

26-
## 前置条件
26+
## Prerequisites
2727

28-
### 准备二进制文件
28+
### Prepare Binaries
2929

30-
将所有二进制文件放到 `bin` 目录下:
30+
Place all binaries in the `bin` directory:
3131

3232
```bash
3333
ops/mpt-switch-test/bin/
@@ -36,55 +36,55 @@ ops/mpt-switch-test/bin/
3636
└── tendermint
3737
```
3838

39-
Genesis 文件 (`genesis-l2.json`) 已包含在目录中。
39+
Genesis file (`genesis-l2.json`) is already included in the directory.
4040

41-
## 使用方法
41+
## Usage
4242

4343
```bash
4444
cd /Users/corey.zhang/workspace/morph/ops/mpt-switch-test
4545

46-
# 1. 启动测试环境 (60秒后触发切换)
46+
# 1. Start test environment (switch triggers after 60 seconds)
4747
./test-mpt-switch-local.sh start 60
4848

49-
# 2. 监控 Sequencer 切换日志
49+
# 2. Monitor Sequencer switch logs
5050
./test-mpt-switch-local.sh monitor sequencer
5151

52-
# 3. 监控 Sentry 切换日志
52+
# 3. Monitor Sentry switch logs
5353
./test-mpt-switch-local.sh monitor sentry
5454

55-
# 4. 查看状态
55+
# 4. Check status
5656
./test-mpt-switch-local.sh status
5757

58-
# 5. 停止服务
58+
# 5. Stop services
5959
./test-mpt-switch-local.sh stop
6060

61-
# 6. 清理数据
61+
# 6. Clean data
6262
./test-mpt-switch-local.sh clean
6363
```
6464

65-
## 命令列表
65+
## Command List
6666

67-
| 命令 | 说明 |
68-
|------|------|
69-
| `start [delay]` | 启动测试环境,delay MPT 切换延迟秒数 (默认 60) |
70-
| `stop` | 停止所有服务 |
71-
| `clean` | 清理所有测试数据 |
72-
| `status` | 查看服务状态和区块高度 |
73-
| `monitor [target]` | 监控日志 (sequencer/sentry/all) |
74-
| `logs [service]` | 查看日志 (sequencer/sentry/zk-geth/mpt-geth/all) |
67+
| Command | Description |
68+
|---------|-------------|
69+
| `start [delay]` | Start test environment, delay is MPT switch delay in seconds (default 60) |
70+
| `stop` | Stop all services |
71+
| `clean` | Clean all test data |
72+
| `status` | Check service status and block height |
73+
| `monitor [target]` | Monitor logs (sequencer/sentry/all) |
74+
| `logs [service]` | View logs (sequencer/sentry/zk-geth/mpt-geth/all) |
7575

76-
## 端口分配
76+
## Port Allocation
7777

78-
| 服务 | HTTP | Engine | P2P |
79-
|------|------|--------|-----|
78+
| Service | HTTP | Engine | P2P |
79+
|---------|------|--------|-----|
8080
| ZK Geth | 8545 | 8551 | 30303 |
8181
| MPT Geth | 9545 | 9551 | 30304 |
8282
| Sequencer Node | - | - | 26656 (RPC: 26657) |
8383
| Sentry Node | - | - | 26756 (RPC: 26757) |
8484

85-
## 预期日志
85+
## Expected Logs
8686

87-
两个 Node 都应该看到类似的切换日志:
87+
Both nodes should see similar switch logs:
8888

8989
```
9090
MPT switch time reached, MUST wait for MPT node to sync
@@ -97,22 +97,22 @@ Successfully switched to MPT client
9797
remote_block=<n> target_block=<m> wait_duration=<duration>
9898
```
9999

100-
## 文件结构
100+
## File Structure
101101

102102
```
103103
mpt-switch-test/
104-
├── test-mpt-switch-local.sh # 测试脚本
105-
├── README.md # 本文档
106-
├── genesis-l2.json # L2 创世文件 (已包含)
107-
├── bin/ # 二进制文件目录 (需手动放置)
104+
├── test-mpt-switch-local.sh # Test script
105+
├── README.md # This document
106+
├── genesis-l2.json # L2 genesis file (included)
107+
├── bin/ # Binary directory (needs to be placed manually)
108108
│ ├── geth
109109
│ ├── morphnode
110110
│ └── tendermint
111-
└── .testdata/ # 测试数据目录 (启动时生成)
112-
├── zk-geth/ # ZK Geth 数据
113-
├── mpt-geth/ # MPT Geth 数据
114-
├── sequencer-node/ # Sequencer Node 数据
115-
├── sentry-node/ # Sentry Node 数据
116-
├── jwt-secret.txt # JWT 密钥
117-
└── *.log # 日志文件
111+
└── .testdata/ # Test data directory (generated on startup)
112+
├── zk-geth/ # ZK Geth data
113+
├── mpt-geth/ # MPT Geth data
114+
├── sequencer-node/ # Sequencer Node data
115+
├── sentry-node/ # Sentry Node data
116+
├── jwt-secret.txt # JWT secret
117+
└── *.log # Log files
118118
```

ops/mpt-switch-test/local-test/engine-make-block-loop.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

ops/mpt-switch-test/local-test/engine-make-block.sh

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)