# FROM: ./beacon-kitcurl -o "./build/bin/config/beacond/config/genesis.json" "https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80084/genesis.json";
# [Expected Output]:# % Total % Received % Xferd Average Speed Time Time Time Current# Dload Upload Total Spent Left Speed# 100 46860 100 46860 0 0 295k 0 --:--:-- --:--:-- --:--:-- 293k
# FROM: ./beacon-kitcurl -o "./build/bin/config/beacond/kzg-trusted-setup.json" "https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80084/kzg-trusted-setup.json";
# [Expected Output]:# % Total % Received % Xferd Average Speed Time Time Time Current# Dload Upload Total Spent Left Speed# 100 436k 100 436k 0 0 2744k 0 --:--:-- --:--:-- --:--:-- 2747k
# FROM: ./beacon-kit# Rename the monikerMONIKER_NAME=<YOUR_NODE_MONIKER>; # Ex: MONIKER_NAME=BingBongNodesed-i''"s/^moniker = \".*\"/moniker = \"$MONIKER_NAME\"/""$PWD/build/bin/config/beacond/config/config.toml";# set jwt.hex pathJWT_PATH=$PWD/build/bin/config/beacond/jwt.hex; # generating in next stepsed -i '' "s|^jwt-secret-path = \".*\"|jwt-secret-path = \"$JWT_PATH\"|" "$PWD/build/bin/config/beacond/config/app.toml";
# seeds# - Comma separated list of seedsseeds_url="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80084/cl-seeds.txt";seeds=$(curl-s"$seeds_url"|tail-n+2|tr'\n'','|sed's/,$//');sed-i''"s/^seeds = \".*\"/seeds = \"$seeds\"/""$PWD/build/bin/config/beacond/config/config.toml";# persistent peers# - Comma separated list of nodes to keep persistent connections tosed -i '' "s/^persistent_peers = \".*\"/persistent_peers = \"$seeds\"/" "$PWD/build/bin/config/beacond/config/config.toml";
第 3 步:生成JWT令牌
这将创建一个JSON Web令牌,以允许BeaconKit共识客户端与EVM执行客户端通信。
运行以下代码,创建JWT令牌:
# FROM: ./beacon-kit./build/bin/beacondjwtgenerate-o./build/bin/config/beacond/jwt.hex;# [Expected Output]:# Successfully wrote new JSON-RPC authentication secret to: ./build/bin/config/jwt.hex
# FROM: ./beacon-kitmkdirsnapshots;curl-LEXAMPLE_SNAPSHOT_FILE.tar.lz4>./snapshots/EXAMPLE_SNAPSHOT_FILE.tar.lz4;# [Example Output]:# % Total % Received % Xferd Average Speed Time Time Time Current# Dload Upload Total Spent Left Speed# 0 43.0G 0 78.1M 0 0 18.7M 0 0:39:07 0:00:04 0:39:03 18.7M
下载完成,解压快照文件并验证数据:
# FROM: ./beacon-kit# make a directory and download snapshotsmkdirsnapshots/tmp;mkdirsnapshots/tmp/beacond;mkdirsnapshots/tmp/reth;# curl ...# unzip# - beacondlz4-dc<./snapshots/EXAMPLE_SNAPSHOT_BEACOND.tar.lz4|tarxvf--C./snapshots/tmp/beacond;# [Expected Output]:# ...# x data/application.db/012580.sst# x data/application.db/012780.sst# x data/application.db/012421.sst# x data/application.db/012420.sst# - rethlz4-dc<./snapshots/EXAMPLE_SNAPSHOT_RETH.tar.lz4|tarxvf--C./snapshots/tmp/reth;# [Expected Output]:# ...# x static_files/static_file_transactions_0_499999# x static_files/static_file_receipts_1000000_1499999.off# x static_files/static_file_headers_0_499999
# FROM: ./beacon-kit./build/bin/beacondstart--home./build/bin/config/beacond;# [Expected Output]:# ...# INFO Starting service type=validator-updates-broker# INFO Starting service type=engine-client# INFO Initializing connection to the execution client... service=engine.client dial_url=http://localhost:8551# INFO Waiting for execution client to start... 🍺🕔 service=engine.client dial_url=http://localhost:8551# INFO Waiting for execution client to start... 🍺🕔 service=engine.client dial_url=http://localhost:8551
# FROM: ./beacon-kitcurl -o "./build/bin/config/reth/eth-genesis.json" "https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80084/eth-genesis.json";
# [Expected Output]:# % Total % Received % Xferd Average Speed Time Time Time Current# Dload Upload Total Spent Left Speed# 100 7232 100 7232 0 0 42532 0 --:--:-- --:--:-- --:--:-- 42792