$ systemctl start docker # 启动Docker
$ systemctl enable docker # 设置开机自启
$ brew install kurtosis-tech/tap/kurtosis-cli
$ echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
$ sudo apt update && sudo apt install kurtosis-cli
$ kurtosis version
$ kurtosis run --enclave my-testnet github.com/ethpandaops/ethereum-package
enclave
参数指定隔离环境名称(如my-testnet
)。Successfully added 1 EL participants
Service 'el-1-geth-lighthouse' added with service UUID...
network_params.yaml
文件,定义网络参数。例如: participants:
- el_type: geth
cl_type: lighthouse
network_params:
network: "holesky-shadowfork" # 支持Shadowfork模式
persistent: true # 启用持久化存储(Shadowfork必需)
additional_services:
- apache # 启用文件共享服务
el_type
/cl_type
:指定执行层(Geth、Nethermind等)和共识层客户端(Lighthouse、Teku等)。network
:支持公共测试网(如holesky
)或Shadowfork(如holesky-shadowfork
)。persistent
:启用持久化存储,防止数据丢失。$ kurtosis run --enclave my-testnet github.com/ethpandaops/ethereum-package --args-file network_params.yaml
el_volume_size
和cl_volume_size
调整存储大小)。network_params.yaml
中定义Kubernetes容忍(Tolerations): participants:
- el_type: reth
cl_type: teku
el_tolerations: # 覆盖全局配置
- key: "gpu-node"
operator: "Exists"
global_tolerations:
- key: "node-role.kubernetes.io/master"
effect: "NoSchedule"
$ kurtosis service logs my-testnet el-1-geth-lighthouse
$ kurtosis files download my-testnet el-genesis-data ~/Downloads
$ kurtosis service shell my-testnet el-1-geth-lighthouse
network_params:
network: "mainnet-shadowfork-verkle" # Verkle树测试
electra_fork_epoch: 1 # 指定分叉区块
persistent: true
mev_params:
mode: "full" # 或 "mock" 模拟模式
$ kurtosis enclave rm -f my-testnet # 删除整个环境
$ kurtosis clean -a # 清理所有资源
通过以上步骤,可以灵活部署一个多客户端、可观测性强的以太坊开发网络。更多配置细节可参考官方文档。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。