Skip to content

Commit 5c77f4f

Browse files
committed
updated keys
1 parent 9ad87ce commit 5c77f4f

File tree

4 files changed

+64
-50
lines changed

4 files changed

+64
-50
lines changed

β€ŽminervaRaw.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"id": "argochain",
44
"chainType": "Live",
55
"bootNodes": [
6-
],
6+
"/ip4/52.8.152.227/tcp/30333/p2p/12D3KooWErWiPk2XDWU6oai4fhjsQxBduyNeMxbbeApVk8ew6FpZ",
7+
"/ip4/50.18.213.115/tcp/30334/p2p/12D3KooWPKWmKxEq2diEo5pMK1RoeN3FPTDVJbNEZNmpm5EqfMAS",
8+
"/ip4/52.53.68.125/tcp/30335/p2p/12D3KooWBzS3ubHkRKDz2SLcst6XP8hrbCe9e9C2N6B7jRPT19uL",
9+
"/ip4/18.144.114.190/tcp/30336/p2p/12D3KooWNA89CAx2j6HWtx4n1jgr82sbg8xV95ALPEB2mruLjnhD"],
710
"telemetryEndpoints": [
811
[
912
"/dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F",

β€Žnohup.out

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2024-11-18 13:43:40 Argo Chain Node
2+
2024-11-18 13:43:40 ✌️ version 1.0.0-9ad87ceb0f3
3+
2024-11-18 13:43:40 ❀️ by argochain, 2023-2024
4+
2024-11-18 13:43:40 πŸ“‹ Chain specification: ArgoChain
5+
2024-11-18 13:43:40 🏷 Node name: REPLACEME
6+
2024-11-18 13:43:40 πŸ‘€ Role: AUTHORITY
7+
2024-11-18 13:43:40 πŸ’Ύ Database: RocksDb at /var/opt/argochain/chains/argochain/db/full
8+
2024-11-18 13:43:40 Failed to run the sequential write disk benchmark: failed to create a test file: No such file or directory (os error 2)
9+
Error: Service(Client(Backend("Failed to create RocksDB directory: `Os { code: 13, kind: PermissionDenied, message: \"Permission denied\" }`.")))
10+
2024-11-18 13:43:40 Failed to run the random write disk benchmark: failed to create a test file: No such file or directory (os error 2)
11+
2024-11-18 14:11:59 Argo Chain Node
12+
2024-11-18 14:11:59 ✌️ version 1.0.0-9ad87ceb0f3
13+
2024-11-18 14:11:59 ❀️ by argochain, 2023-2024
14+
2024-11-18 14:11:59 πŸ“‹ Chain specification: ArgoChain
15+
2024-11-18 14:11:59 🏷 Node name: REPLACEME
16+
2024-11-18 14:11:59 πŸ‘€ Role: AUTHORITY
17+
2024-11-18 14:11:59 πŸ’Ύ Database: RocksDb at /var/opt/argochain/chains/argochain/db/full
18+
Error: Service(Client(Backend("Failed to create RocksDB directory: `Os { code: 13, kind: PermissionDenied, message: \"Permission denied\" }`.")))
19+
2024-11-18 14:11:59 Failed to run the sequential write disk benchmark: failed to create a test file: No such file or directory (os error 2)
20+
2024-11-18 14:11:59 Failed to run the random write disk benchmark: failed to create a test file: No such file or directory (os error 2)

β€Žrotate_keys.sh

100644100755
+40-49
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ chain_spec=$(realpath "$chain_spec")
1818
base_path=$(realpath "$base_path")
1919

2020
# Ensure required tools and binaries exist
21-
if ! command -v jq &> /dev/null; then
22-
echo "jq is not installed. Please install it and try again."
23-
exit 1
24-
fi
25-
2621
if [ ! -f "./target/release/argochain" ]; then
2722
echo "argochain binary not found. Please build it and try again."
2823
exit 1
@@ -44,53 +39,49 @@ purge_database() {
4439
if [ $? -eq 0 ]; then
4540
echo "Database purged successfully."
4641
else
47-
echo "Error purging database. Exiting."
48-
exit 1
49-
fi
50-
}
51-
52-
# Function to generate and insert a key
53-
generate_and_insert_key() {
54-
local key_type="$1"
55-
local scheme="$2"
56-
57-
echo "Generating $key_type key..."
58-
key_output=$(./target/release/argochain key generate --scheme "$scheme" --output-type json)
59-
60-
# Extract secret phrase and public key
61-
secret_phrase=$(echo "$key_output" | jq -r '.secretPhrase')
62-
public_key=$(echo "$key_output" | jq -r '.publicKey')
63-
64-
echo "Inserting $key_type key..."
65-
./target/release/argochain key insert --base-path "$base_path" --chain "$chain_spec" --scheme "$scheme" --suri "$secret_phrase" --key-type "$key_type"
66-
67-
if [ $? -eq 0 ]; then
68-
echo "$key_type key inserted successfully. Public key: $public_key"
69-
else
70-
echo "Error inserting $key_type key. Exiting."
71-
exit 1
42+
echo "Error purging database. Attempting manual cleanup..."
43+
if [ -d "$base_path/chains/argochain/db" ]; then
44+
sudo rm -rf "$base_path/chains/argochain/db"
45+
echo "Manual database cleanup completed."
46+
else
47+
echo "Database directory not found. Skipping manual cleanup."
48+
fi
7249
fi
7350
}
7451

75-
# Function to rotate keys for a specific type
76-
rotate_key() {
77-
local key_type="$1"
78-
local scheme="$2"
79-
80-
echo "Rotating $key_type key..."
81-
generate_and_insert_key "$key_type" "$scheme"
82-
echo "$key_type key rotated successfully."
83-
}
84-
8552
# Purge the database first
8653
purge_database
8754

88-
# Rotate keys for all consensus mechanisms
89-
rotate_key "babe" "Sr25519"
90-
rotate_key "gran" "Ed25519"
91-
rotate_key "audi" "Sr25519"
92-
rotate_key "imon" "Sr25519"
93-
94-
# Start the node with injected keys
95-
echo "Starting the node with the new validator keys..."
96-
./target/release/argochain --chain "$chain_spec" --name "$name" --validator --base-path "$base_path"
55+
# Start the node in the background and save logs
56+
log_file="$base_path/node.log"
57+
echo "Starting the node..."
58+
nohup ./target/release/argochain \
59+
--chain minervaRaw.json \
60+
--base-path "$base_path" \
61+
--port 30333 \
62+
--rpc-port 9944 \
63+
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
64+
--name "$name" \
65+
--validator \
66+
--rpc-methods Unsafe \
67+
--unsafe-rpc-external \
68+
--rpc-max-connections 100 \
69+
--rpc-cors all > "$log_file" 2>&1 &
70+
71+
# Enhanced SUCCESSFUL message
72+
if [ $? -eq 0 ]; then
73+
echo -e "\033[1;32m" # Green color
74+
echo "=============================================================="
75+
echo " πŸŽ‰πŸŽ‰πŸŽ‰ OPERATION SUCCESSFUL! πŸŽ‰πŸŽ‰πŸŽ‰"
76+
echo "=============================================================="
77+
echo -e "\033[0m" # Reset color
78+
79+
echo -e "\033[1;33mβœ… Your Argochain node is now running successfully! βœ…\033[0m"
80+
echo -e "\033[1;34m🌟 Logs are being written to:\033[0m \033[1;37m$log_file\033[0m"
81+
echo -e "\033[1;34mπŸ“ To monitor logs in real-time, use:\033[0m"
82+
echo -e "\033[1;36m tail -f $log_file\033[0m"
83+
echo -e "\033[1;34mπŸš€ Ready to validate blocks and explore Argochain! πŸš€\033[0m"
84+
else
85+
echo -e "\033[1;31mFailed to start the node. Check the logs at:\033[0m $log_file"
86+
exit 1
87+
fi

β€Župdate_bootnodes.sh

100644100755
File mode changed.

0 commit comments

Comments
Β (0)