- twitter: @cryptoleek
- youtube硬核教程: https://youtu.be/ISjlmMMP7Gg
- https://aptos.dev/nodes/ait/steps-in-ait3/
- https://aptos.dev/nodes/validator-node/run-validator-node-using-docker
- CPU:
- 8 cores, 16 threads
- 2.8GHz, or faster
- Intel Xeon Skylake or newer
- Memory: 32GB RAM.
- 硬盘: 320 GB
- AWS
- c5.4xlarge
- c6i.4xlarge
ssh xxx.cert ubuntu@xxxxip
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
export WORKSPACE=testnet
export USERNAME=alice
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
- 把端口 80:8080 改成 8080:8080
- expose 这里 也改成8080
aptos genesis generate-keys --output-dir ~/$WORKSPACE/keys
四个 key files under ~/$WORKSPACE/keys 目录
- public-keys.yaml
- private-keys.yaml
- validator-identity.yaml
- validator-full-node-identity.yaml
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
- owner.yaml
- operator.yaml
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
- OWNER KEY: 之前的步骤连上钱包 从钱包里面自己会填写.
- CONSENSUS KEY: consensus_public_key from public-keys.yaml
- CONSENSUS POP: consensus_proof_of_possession from public-keys.yaml
- ACCOUNT KEY: account_public_key from public-keys.yaml
- VALIDATOR NETWORK KEY: validator_network_public_key from public-keys.yaml
感谢大佬的教程