Aptos测试网部署教程 | Aptos测试网空投
使用 Docker
如果你之前运行过 devnet 全节点,请先停止,防止端口冲突导致无法运行测试网验证者节点。
If you have run a devnet full node before, please stop it first to prevent port conflicts from running the testnet validator node.
安装 Docker 和 docker-compose(Install Docker and docker-compose)
# Install Docker
wget -O get-docker.sh https://get.docker.com
sudo sh get-docker.sh
rm -f get-docker.sh
# Install docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
创建目录(Create Directory)
sudo mkdir -p ~/aptos-node/testnet && cd ~/aptos-node/testnet
生成密钥对(节点所有者密钥、共识密钥和网络密钥)(Generate private keys)
sudo docker run --rm \
-v $(pwd):/data/aptos-cli \
suugee/aptos-cli:v1 \
aptos genesis generate-keys --output-dir /data/aptos-cli
下载编排文件(Download files)
sudo wget -O docker-compose.yaml https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/docker-compose.yaml
sudo wget -O validator.yaml https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/validator.yaml
sudo wget -O fullnode.yaml https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/fullnode.yaml
生成验证者配置(Generate Validator Info)
- 您的节点名称<your-node-name>
- 验证者节点IP或DNS域名:端口<your-vlidator-node-ip:port>
- 全节点IP或DNS域名:端口<your-full-node-ip:port>
xiajie
是我的节点名称 ?(xiaojie is my node name)
sudo docker run --rm \
-v $(pwd):/data/aptos-cli \
suugee/aptos-cli:v1 \
aptos genesis set-validator-configuration \
--keys-dir /data/aptos-cli --local-repository-dir /data/aptos-cli \
--username 您的节点名称<your-node-name> \
--validator-host 验证者节点IP或DNS域名:端口<your-vlidator-node-ip:port> \
--full-node-host 全节点IP或DNS域名:端口<your-full-node-ip:port>
示例(Example):
sudo docker run --rm \
-v $(pwd):/data/aptos-cli \
suugee/aptos-cli:v1 \
aptos genesis set-validator-configuration \
--keys-dir /data/aptos-cli --local-repository-dir /data/aptos-cli \
--username sg \
--validator-host 49.12.236.115:6180 \
--full-node-host 49.12.236.115:6182
生成 layout 文件(Generate layout YAML file)
- needn't modify the root key(官方文档中提及,可不需要修改 root_key)
- modify the node name(只需要修改 你的节点名称)
sudo vi layout.yaml
按i插入:
---
root_key: "0x5243ca72b0766d9e9cbf2debf6153443b01a1e0e6d086c7ea206eaf6f8043956"
users:
- 您的节点名称<your-node-name>
chain_id: 23
示例:(Example)
---
root_key: "0x5243ca72b0766d9e9cbf2debf6153443b01a1e0e6d086c7ea206eaf6f8043956"
users:
- sg
chain_id: 23
生成 genesis blob 和 waypoint(Generate genesis blob and waypoint file)
sudo docker run --rm \
-v $(pwd):/data/aptos-cli \
suugee/aptos-cli:v1 \
sh -c "rm -rf /data/aptos-cli/genesis.blob && rm -rf /data/aptos-cli/waypoint.txt && rm -rf /data/aptos-cli/framework && cp -r /framework /data/aptos-cli && aptos genesis generate-genesis --local-repository-dir /data/aptos-cli --output-dir /data/aptos-cli && rm -rf /data/aptos-cli/framework"
启动节点(Run node)
sudo docker-compose up -d
申请激励测试网(Apply for Incentivized Testnet)
网站(Website):https://community.aptoslabs.com/
你可以查看文件以获取
PUBLIC KEYS
, VALIDATOR NODE
和 FULL NODE
信息。You can check the file content for
PUBLIC KEYS
, VALIDATOR NODE
and FULL NODE
information.cat 你的节点名称<your-node-name>.yaml
示例(Example):
cat sg.yaml
共有 0 条评论