Closed imduchuyyy closed 2 years ago
Full Script Run
wget -qO aptos-cli.zip https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-0.2.0/aptos-cli-0.2.0-Ubuntu-x86_64.zip
unzip -o aptos-cli.zip
chmod +x aptos
mv aptos /usr/local/bin
#create folder,download config
IPADDR=$(curl ifconfig.me)
sleep 2
mkdir -p $HOME/.aptos
cd $HOME/.aptos
wget -O $HOME/.aptos/docker-compose.yaml https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/docker-compose.yaml
wget -O $HOME/.aptos/validator.yaml https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/validator.yaml
#wget -O fullnode.yaml https://raw.githubusercontent.com/aptos-labs/aptos-core/main/docker/compose/aptos-node/fullnode.yaml
aptos genesis generate-keys --assume-yes --output-dir $HOME/.aptos
aptos genesis set-validator-configuration \
--keys-dir $HOME/.aptos --local-repository-dir $HOME/.aptos \
--username $APTOS_NODENAME \
--validator-host $IPADDR:6180
#aptos key generate --assume-yes --output-file root_key.txt
#KEYTXT=$(cat ~/.aptos/root_key.txt.pub)
#KEY="0x"$KEYTXT
echo "---
root_key: \"F22409A93D1CD12D2FC92B5F8EB84CDCD24C348E32B3E7A720F3D2E288E63394\"
users:
- \"$APTOS_NODENAME\"
chain_id: 40
min_stake: 0
max_stake: 100000
min_lockup_duration_secs: 0
max_lockup_duration_secs: 2592000
epoch_duration_secs: 86400
initial_lockup_timestamp: 1656615600
min_price_per_gas_unit: 1
allow_new_validators: true" >layout.yaml
wget -O $HOME/.aptos/framework.zip https://github.com/aptos-labs/aptos-core/releases/download/aptos-framework-v0.2.0/framework.zip
unzip -o framework.zip
aptos genesis generate-genesis --assume-yes --local-repository-dir $HOME/.aptos --output-dir $HOME/.aptos
sleep 2
docker-compose down -v
sleep 2
docker compose up -d
Error when execute aptos genesis generate-genesis --assume-yes --local-repository-dir $HOME/.aptos --output-dir $HOME/.aptos
I ran into this earlier today; in my case the root cause was stale git tags.
This installed 0.1.2
instead of 0.2.0
cargo install --git https://github.com/aptos-labs/aptos-core.git aptos --tag aptos-cli-latest
To get 0.2.0
I had to run
cargo install --git https://github.com/aptos-labs/aptos-core.git aptos --tag aptos-cli-v0.2.0
After completing, the updated binary still reported 0.1.2
, but was functionally 0.2.0
and was able to run this command successfully. Also note that the step before this needed to be re-run because there were some fields added and/or renamed in the yaml files it depends on.
@gregnazario
I fix it by clean cache in my server, many thanks
I ran into this earlier today; in my case the root cause was stale git tags.
This installed
0.1.2
instead of0.2.0
cargo install --git https://github.com/aptos-labs/aptos-core.git aptos --tag aptos-cli-latest
To get
0.2.0
I had to runcargo install --git https://github.com/aptos-labs/aptos-core.git aptos --tag aptos-cli-v0.2.0
After completing, the updated binary still reported
0.1.2
, but was functionally0.2.0
and was able to run this command successfully. Also note that the step before this needed to be re-run because there were some fields added and/or renamed in the yaml files it depends on.
Sorry about that, I've been really busy working on other components, and forgot all about the tags!
There should now be up to date tags where:
aptos-cli-latest
= aptos-cli-0.2.0
= aptos-cli-v0.2.0
and all of them should say 0.2.0 in the binary.
Many thanks for support!!!
🐛 Bug
Expected Behavior
Error when run
Receive Message