-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAPTOS
More file actions
93 lines (76 loc) · 2.67 KB
/
APTOS
File metadata and controls
93 lines (76 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
wget -q -O aptos.sh https://api.nodes.guru/aptos.sh && chmod +x aptos.sh && sudo /bin/bash aptos.sh
Logs
docker logs -f --tail 100 aptos-validator-1
Restart
cd ~/.aptos && docker-compose restart
Stop:
cd ~/.aptos && docker-compose stop
State_sync metrics:
curl 127.0.0.1:9101/metrics 2> /dev/null | grep aptos_state_sync_version
Form data:
source ~/.bash_profile
cat ~/.aptos/$APTOS_NODENAME.yaml
TCP port: 80, 6180, 6181, 6182, 9101
Remove:
cd ~/.aptos && docker-compose down -v
rm -rf ~/.aptos /opt/aptos
AIT3
sudo apt update && sudo apt upgrade -y
sudo apt install make clang pkg-config libssl-dev libclang-dev build-essential git curl ntp jq llvm tmux htop screen unzip cargo cmake -y
sudo apt install docker.io -y
git clone https://github.com/docker/compose
cd compose
git checkout v2.9.0
make
cd
mv compose/bin/docker-compose /usr/bin
docker-compose version
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
= y
= 1
source "$HOME/.cargo/env"
cat <<EOF >> ~/.bash_profile
export WORKSPACE=testnet
export USERNAME=ИМЯ_НОДЫ
#замените ИМЯ_НОДЫ на свое
EOF
source ~/.bash_profile
mkdir ~/$WORKSPACE
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
mv aptos /usr/bin
chmod +x /usr/bin/aptos
rm -rf aptos-cli-0.3.1-Ubuntu-x86_64.zip
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
aptos genesis set-validator-configuration \
--local-repository-dir ~/$WORKSPACE \
--username $USERNAME \
--owner-public-identity-file ~/$WORKSPACE/keys/public-keys.yaml \
--validator-host ВАШ_IP:6180 \
--stake-amount 100000000000000
sudo tee layout.yaml > /dev/null <<EOF
#Коприруйте все вместе.
root_key: "D04470F43AB6AEAA4EB616B72128881EEF77346F2075FFE68E14BA7DEBD8095E"
users:
- $USERNAME
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
EOF
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
docker-compose up -d
Logs
docker-compose logs -f