forked from cubik-so/ice-staking
-
Notifications
You must be signed in to change notification settings - Fork 1
/
start.sh
98 lines (93 loc) · 4.17 KB
/
start.sh
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
94
95
96
97
98
#!/bin/bash
# Check if the cluster type is provided as a command line argument
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <cluster-type>"
echo "cluster-type: mainnet-beta or testnet"
exit 1
fi
cluster="$1"
# Define variables based on cluster type
if [ "$cluster" = "mainnet-beta" ]; then
jito_block_engine_url="https://frankfurt.mainnet.block-engine.jito.wtf"
jito_relayer_url="http://frankfurt.mainnet.relayer.jito.wtf:8100"
jito_shred_receiver_address="145.40.93.84:1002"
ntp="ntp.frankfurt.jito.wtf"
ledger_dir="/mnt/ledger"
accounts_dir="/mnt/accounts"
log_file="/home/sol/solana-validator.log"
entrypoints=(
"entrypoint.mainnet-beta.solana.com:8001"
"entrypoint2.mainnet-beta.solana.com:8001"
"entrypoint3.mainnet-beta.solana.com:8001"
"entrypoint4.mainnet-beta.solana.com:8001"
"entrypoint5.mainnet-beta.solana.com:8001"
)
tip_payment_pubkey="T1pyyaTNZsKv2WcRAB8oVnk93mLJw2XzjtVYqCsaHqt"
tip_distribution_pubkey="4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7"
merkle_root_authority="GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib"
genesis_hash="5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
commission_bps=0
known_validator_1='7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2'
known_validator_2='GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ'
known_validator_3='DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ'
known_validator_4='CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S'
identity_keypair="/home/sol/icex1C6pnZxznQWiHZZANjGU8nZ8kNquFnjyY7XXrXE.json"
vote_pubkey="/home/sol/votem3UdGx5xWFbY9EFbyZ1X2pBuswfR5yd2oB3JAaj.json"
elif [ "$cluster" = "testnet" ]; then
jito_block_engine_url="https://ny.testnet.block-engine.jito.wtf"
jito_relayer_url="http://nyc.testnet.relayer.jito.wtf:8100"
jito_shred_receiver_address="141.98.216.97:1002"
ntp="ntp.dallas.jito.wtf"
ledger_dir="/mnt/ledger"
accounts_dir="/mnt/accounts"
log_file="/home/sol/solana-validator.log"
entrypoints=(
"entrypoint.testnet.solana.com:8001"
"entrypoint2.testnet.solana.com:8001"
"entrypoint3.testnet.solana.com:8001"
)
tip_payment_pubkey="DCN82qDxJAQuSqHhv2BJuAgi41SPeKZB5ioBCTMNDrCC"
tip_distribution_pubkey="F2Zu7QZiTYUhPd7u9ukRVwxh7B71oA3NMJcHuCHc29P2"
merkle_root_authority="GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib"
genesis_hash="4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY"
commission_bps=0
known_validator_1='5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on'
known_validator_2='7XSY3MrYnK8vq693Rju17bbPkCN3Z7KvvfvJx4kdrsSY'
known_validator_3='Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN'
known_validator_4='9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv'
identity_keypair="/home/sol/iceTv97XsSTXLqrJvYMf38uqXCd7KaK4NCEFSXSArWq.json"
vote_pubkey="/home/sol/vottbnQyoMRUMXudohHSdoeQLDESiUh16YEKHm59Vdu.json"
else
echo "Invalid cluster type: $cluster"
echo "Please choose either 'mainnet-beta' or 'testnet'"
exit 1
fi
# Execute the Solana validator command
/home/sol/.local/share/solana/install/active_release/bin/solana-validator \
--identity "$identity_keypair" \
--vote-account "$vote_pubkey" \
--only-known-rpc \
--log "$log_file" \
--ledger "$ledger_dir" \
--accounts "$accounts_dir" \
--snapshots "$accounts_dir" \
--rpc-port 8899 \
${entrypoints[@]/#/--entrypoint } \
--expected-genesis-hash "$genesis_hash" \
--limit-ledger-size \
--private-rpc \
--no-snapshot-fetch \
--tip-payment-program-pubkey "$tip_payment_pubkey" \
--tip-distribution-program-pubkey "$tip_distribution_pubkey" \
--merkle-root-upload-authority "$merkle_root_authority" \
--commission-bps $commission_bps \
--relayer-url "$jito_relayer_url" \
--block-engine-url "$jito_block_engine_url" \
--expected-bank-hash 69p75jzzT1P2vJwVn3wbTVutxHDcWKAgcbjqXvwCVUDE \
--shred-receiver-address "$jito_shred_receiver_address"\
--known-validator "$known_validator_1"\
--known-validator "$known_validator_2"\
--known-validator "$known_validator_3"\
--known-validator "$known_validator_4"\
--maximum-incremental-snapshots-to-retain 3 \
--incremental-snapshot-interval-slots 200