sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install wget -y
sudo apt-get install unzip -y
sudo wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo wget -O get-docker.sh https://get.docker.com &&sudo sh get-docker.sh && sudo rm -f get-docker.sh
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
wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v0.3.1/aptos-cli-0.3.1-Ubuntu-x86_64.zip
unzip aptos-cli-0.3.1-Ubuntu-x86_64.zip
mkdir -p ~/bin
mv aptos ~/bin
chmod +x ~/bin/aptos
export PATH=~/bin:$PATH
aptos help
5 创建工作目录 和 用户名
export WORKSPACE=testnet
export USERNAME=l1l
mkdir ~/$WORKSPACE
cd ~/$WORKSPACE
wget https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/docker-compose.yaml
wget https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/validator.yaml
aptos genesis generate-keys --output-dir ~/$WORKSPACE/keys
四个 key files under ~/$WORKSPACE/keys 目录(如果CPU不支持指令集就会报非法指令的错误)
aptos genesis set-validator-configuration \
--local-repository-dir ~/$WORKSPACE \
--username $USERNAME \
--owner-public-identity-file ~/$WORKSPACE/keys/public-keys.yaml \
--validator-host YOUR_IP:6180 \
--full-node-host YOUR_IP:6182 \
--stake-amount 100000000000000
在 ~/$WORKSPACE/$USERNAME目录下 会产生2个YAML files
aptos genesis generate-layout-template --output-file ~/$WORKSPACE/layout.yaml
修改 layout template
root_key: "D04470F43AB6AEAA4EB616B72128881EEF77346F2075FFE68E14BA7DEBD8095E"
users: ["username you specified from previous step"]
chain_id: 43
allow_new_validators: false
epoch_duration_secs: 7200
is_test: true
min_stake: 100000000000000
min_voting_threshold: 100000000000000
max_stake: 100000000000000000
recurring_lockup_duration_secs: 86400
required_proposer_stake: 100000000000000
rewards_apy_percentage: 10
voting_duration_secs: 43200
voting_power_increase_limit: 20
wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-framework-v0.3.0/framework.mrb -P ~/$WORKSPACE
aptos genesis generate-genesis --local-repository-dir ~/$WORKSPACE --output-dir ~/$WORKSPACE
sudo docker-compose up -d
查看进程
sudo docker ps -a
sudo docker logs $container_id -f
官网填表信息从这个里面找 ~/$WORKSPACE/keys/public-keys.yaml