Last active
August 15, 2025 04:53
-
-
Save AlekseiOvchinnikov13/9943e1871afb23dbafee4fd54663c5d6 to your computer and use it in GitHub Desktop.
Edgevana Setup Scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo su - root | |
| lscpu | |
| lsblk | |
| free -h | |
| df -BG | |
| curl -sL yabs.sh | bash -s -- r3 | |
| curl -sL yabs.sh | bash -s -- -i | |
| internet connect | |
| curl -sL yabs.sh | bash -s -- -fd | |
| # Протестировать только диски | |
| bash <(wget -qO- -o /dev/null yabs.sh) -ig | |
| # Протестировать только скорость интернета | |
| bash <(wget -qO- -o /dev/null yabs.sh) -dg | |
| # Протестировать только производительность системы | |
| bash <(wget -qO- -o /dev/null yabs.sh) -di | |
| # raid 0 | |
| lsblk | |
| mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/nvme1n1 /dev/nvme2n1 | |
| sudo mkfs.ext4 -F /dev/md0 | |
| tune2fs -r 0 /dev/md0 | |
| sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf | |
| sudo update-initramfs -u | |
| #umount /mnt; \ | |
| cd /root; cp -aux . /mnt && \ | |
| echo '/dev/md0 /root ext4 defaults,nofail,noatime,discard 0 0' | sudo tee -a /etc/fstab | |
| nano /etc/fstab | |
| mount -a && cd /mnt; cp -aux . /root | |
| # монтируем диск | |
| mount /dev/vdb /home; \ | |
| sudo sed -i 's/\/mnt\/data/\/home/g' /etc/fstab | |
| # sudo nano /etc/fstab - проверить | |
| # создаем юзера | |
| export NEWUSER=solana | |
| adduser $NEWUSER; \ | |
| usermod -aG sudo $NEWUSER; \ | |
| echo "$NEWUSER ALL=(ALL) NOPASSWD: ALL" | sudo EDITOR='tee -a' visudo; \ | |
| sudo service ssh restart; \ | |
| su - $NEWUSER | |
| # добавить swapfile (не надо, если есть 256/512 gb RAM) | |
| sudo swapoff -a; sudo rm -rf /swap.img; rm -rf /swapfile; sudo sed -i '/\/swap\.img/s/^/#/' /etc/fstab | |
| sudo fallocate -l 128G /root/swapfile; \ | |
| sudo chmod 600 /root/swapfile; \ | |
| sudo mkswap /root/swapfile; \ | |
| sudo swapon /root/swapfile; \ | |
| sudo cp /etc/fstab /etc/fstab.bak; \ | |
| echo '/root/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab; \ | |
| sudo sysctl vm.swappiness=5; \ | |
| sudo sysctl vm.vfs_cache_pressure=50; \ | |
| sudo cp /etc/sysctl.conf /etc/sysctl.bak; \ | |
| echo 'vm.swappiness=5' | sudo tee -a /etc/sysctl.conf; \ | |
| echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf | |
| # проверить возможность зайти без пароля под рутом (не всегда, перепроверить) | |
| sudo nano /etc/ssh/sshd_config | |
| #PermitRootLogin prohibit-password - должно быть | |
| #PasswordAuthentication no - должно быть | |
| #PermitRootLogin no - убрать | |
| sudo service ssh restart | |
| # добавляем ssh ключ под рутом | |
| sudo su - root | |
| mkdir -p /root/.ssh; \ | |
| SSH="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFM+jZCYCqPjJkMRMt0J5LM4lJbc9I9FaPuab7DOc4EK celo_new"; \ | |
| SSH_ANSIBLE="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCdPXN+Mbm7CJeZV1mzijM9zS2/TcOq0upCeojH3gYhHcLzreyfZ5CRLhF66qTg3VP1ATJ2srAX2D0kpkAf8imklZvWwCTcg3ZX8snIwtBCn2d09LwGa8K6iV7/PFkz3gItsgfPElk3YbwOqYyN91zHfIk55U4BSgVneeg1IHhZNNyDY/JI3nAkHRTdk8hZ8CHgmTPG3ShD03nUla2UtEoa41UnzZyv89EPct1q3WpQgTokSEvKxP78v3SGiEN5WWSOfJr6cge8A/67/R678aNkJj030xDOS3Yw8nSOIn77KSRhhyFcFmgaD/LvKc5/WkDDS/B0n6x6ABznJ2RndxRzSRAoXosADfhE0a6LWwkImxaIhi+FqzaejPl3116jrDFqk1LGTRY7csgfsgRYpztgdEFODvOY0z9rZupBMlDmw7X5OmmvmTRJBou+Lrrb8ZtfqPBp5L2/oVintDYjsCsREHgjT0wKrAwevmBvI9QZ7y0LIU2DMcNJV68OOos5xe0= root@validator"; \ | |
| rm /root/.ssh/authorized_keys; echo ${SSH} >> /root/.ssh/authorized_keys; \ | |
| echo ${SSH_ANSIBLE} >> /root/.ssh/authorized_keys; \ | |
| chmod -R go= /root/.ssh | |
| # меняем порт и пр. в ssh conf | |
| sudo sed -i 's/#Port 22/Port 2112/' /etc/ssh/sshd_config; \ | |
| sudo sed -i 's/Include/#Include/' /etc/ssh/sshd_config; \ | |
| sudo sed -i -n -e '/^X11Forwarding/!p' -e '$aX11Forwarding no' /etc/ssh/sshd_config; \ | |
| sudo sed -i -n -e '/^UsePAM/!p' -e '$aUsePAM yes' /etc/ssh/sshd_config; \ | |
| sudo sed -i -n -e '/^PermitRootLogin/!p' -e '$aPermitRootLogin prohibit-password' /etc/ssh/sshd_config; \ | |
| sudo sed -i -n -e '/^PermitEmptyPasswords/!p' -e '$aPermitEmptyPasswords no' /etc/ssh/sshd_config; \ | |
| sudo sed -i -n -e '/^PasswordAuthentication/!p' -e '$aPasswordAuthentication no' /etc/ssh/sshd_config; \ | |
| sudo sed -i -n -e '/^ChallengeResponseAuthentication/!p' -e '$aChallengeResponseAuthentication no' /etc/ssh/sshd_config; \ | |
| sudo service ssh restart | |
| # НЕ ЗАКРЫВАЯ текущую сессию. Изменяем юзера на root порт на 2112 и проверяем. | |
| # удаляем юзера ubuntu | |
| USERDEL=ubuntu | |
| sudo deluser --remove-home $USERDEL; userdel -r $USERDEL | |
| kill -9 <id> | |
| # создаем сессию tmux | |
| tmux new -s solana | |
| # установка стандартных пакетов | |
| cd ~; \ | |
| wget https://gist.githubusercontent.com/AGx10k/bebd6297c7d8a8bd856a55ad2f2393a5/raw/hwdata.sh -O ~/hwdata.sh && chmod +x ~/hwdata.sh; \ | |
| wget https://gist.githubusercontent.com/Bambarello/beb32d9bc7ddf18cbc188a118b44efa4/raw/netdata.sh -O ~/netdata.sh && chmod +x ~/netdata.sh; \ | |
| echo "/root/hwdata.sh && /root/netdata.sh" >> ~/.profile; \ | |
| sudo apt-get update; \ | |
| DEBIAN_FRONTEND='noninteractive' apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' upgrade; \ | |
| sudo apt-get -q -y install --no-install-recommends software-properties-common aptitude; \ | |
| export DEBIAN_FRONTEND=noninteractive; \ | |
| sudo apt-get autoremove -y; \ | |
| apt clean; \ | |
| apt autoclean; \ | |
| sudo aptitude install -y -q zip unzip sudo curl git jq wget nano htop smartmontools tmux net-tools \ | |
| mc python3 cmake mc screen htop atop ncdu resolvconf ethtool pciutils fail2ban; \ | |
| sudo cp /etc/security/limits.conf /etc/security/limits.bak; \ | |
| echo '* hard nproc 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo '* soft nproc 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo '* hard nofile 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo '* soft nofile 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo 'root hard nproc 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo 'root soft nproc 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo 'root hard nofile 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo 'root soft nofile 2500000' | sudo tee -a /etc/security/limits.conf; \ | |
| echo 'DefaultLimitNOFILE=2500000' | sudo tee -a /etc/systemd/system.conf; \ | |
| echo 'DefaultLimitNOFILE=2500000' | sudo tee -a /etc/systemd/user.conf; \ | |
| sudo cp /etc/sysctl.conf /etc/sysctl.bak; \ | |
| echo 'fs.file-max = 2000000' | sudo tee -a /etc/sysctl.conf; \ | |
| echo 'vm.max_map_count=2000000' | sudo tee -a /etc/sysctl.conf; \ | |
| echo always > /sys/kernel/mm/transparent_hugepage/enabled; \ | |
| echo 'vm.nr_hugepages=128' | sudo tee -a /etc/sysctl.conf; \ | |
| sudo sysctl -p | |
| sudo bash -c "cat >/etc/sysctl.d/20-solana-udp-buffers.conf <<EOF | |
| vm.max_map_count=2000000 | |
| net.core.rmem_default = 134217728 | |
| net.core.rmem_max = 134217728 | |
| net.core.wmem_default = 134217728 | |
| net.core.wmem_max = 134217728 | |
| # very aggressive disk caching | |
| vm.dirty_ratio=90 | |
| vm.dirty_background_ratio=90 | |
| vm.dirty_expire_centisecs=36000 | |
| vm.dirty_writeback_centisecs=36000 | |
| EOF"; \ | |
| sudo sysctl -p /etc/sysctl.d/20-solana-udp-buffers.conf; \ | |
| sudo bash -c "cat >/etc/sysctl.d/20-solana-mmaps.conf <<EOF | |
| # Increase memory mapped files limit | |
| vm.max_map_count = 2000000 | |
| EOF"; \ | |
| sudo sysctl -p /etc/sysctl.d/20-solana-mmaps.conf; \ | |
| sudo apt-get -q -y install --no-install-recommends fail2ban; \ | |
| sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local; \ | |
| sudo sed -i 's/bantime = 10m/bantime = 60m/' /etc/fail2ban/jail.local; \ | |
| sudo sed -i 's/#mode = normal/enabled = true \nmode = normal \nbanaction = iptables-multiport/' /etc/fail2ban/jail.local; \ | |
| sudo systemctl enable fail2ban; sudo service fail2ban restart; \ | |
| sudo apt -q -y install --no-install-recommends unattended-upgrades; \ | |
| sudo sed -i 's/Unattended-Upgrade "1"/Unattended-Upgrade "0"/' /etc/apt/apt.conf.d/20auto-upgrades; \ | |
| echo 'APT::Periodic::Unattended-Upgrade "0";' | sudo tee -a /etc/apt/apt.conf.d/10periodic; \ | |
| echo 'SystemMaxUse=300M' | sudo tee -a /etc/systemd/journald.conf; \ | |
| echo 'SystemMaxFileSize=100M' | sudo tee -a /etc/systemd/journald.conf; \ | |
| sudo apt-get remove -y docker docker-engine docker.io docker-compose; \ | |
| sudo aptitude install docker.io docker-compose -y; \ | |
| sudo systemctl enable docker; \ | |
| sudo systemctl start docker | |
| apt-get install --install-recommends linux-generic-hwe-22.04 -y; \ | |
| update-grub; \ | |
| sudo du -sh /var/cache/apt; \ | |
| sudo apt-get clean; \ | |
| sudo apt-get install byobu -y; \ | |
| sudo purge-old-kernels -qy; \ | |
| sudo apt update; \ | |
| sudo apt -y upgrade; \ | |
| sudo apt autoremove -y; sudo apt autoclean -y; \ | |
| sudo apt update; \ | |
| sudo apt -y upgrade; \ | |
| apt autoremove -y; apt autoclean -y; \ | |
| apt-get update && \ | |
| apt-get install cpufrequtils moreutils -y && \ | |
| echo -e 'ENABLE="true"\nGOVERNOR="performance"' > /etc/default/cpufrequtils && \ | |
| systemctl restart cpufrequtils.service; \ | |
| sudo apt update; \ | |
| sudo apt install resolvconf -y; \ | |
| echo 'nameserver 8.8.8.8' | sudo tee -a /etc/resolvconf/resolv.conf.d/tail; \ | |
| echo 'nameserver 8.8.4.4' | sudo tee -a /etc/resolvconf/resolv.conf.d/tail; \ | |
| echo 'nameserver 1.1.1.1' | sudo tee -a /etc/resolvconf/resolv.conf.d/tail; \ | |
| echo 'nameserver 1.0.0.1' | sudo tee -a /etc/resolvconf/resolv.conf.d/tail; \ | |
| echo 'nameserver 8.8.8.8' | sudo tee -a /run/systemd/resolve/resolv.conf; \ | |
| echo 'nameserver 8.8.4.4' | sudo tee -a /run/systemd/resolve/resolv.conf; \ | |
| echo 'nameserver 1.1.1.1' | sudo tee -a /run/systemd/resolve/resolv.conf; \ | |
| echo 'nameserver 1.0.0.1' | sudo tee -a /run/systemd/resolve/resolv.conf; \ | |
| sudo resolvconf -u; sleep 10; \ | |
| echo 'nameserver 1.1.1.1' | sudo tee -a /etc/resolv.conf; \ | |
| echo 'nameserver 1.0.0.1' | sudo tee -a /etc/resolv.conf; \ | |
| echo 'nameserver 8.8.8.8' | sudo tee -a /etc/resolv.conf; \ | |
| echo 'nameserver 8.8.4.4' | sudo tee -a /etc/resolv.conf; \ | |
| systemctl restart systemd-resolved; sleep 10; \ | |
| echo 'nameserver 8.8.8.8' | sudo tee -a /etc/resolv.conf; \ | |
| echo 'nameserver 8.8.4.4' | sudo tee -a /etc/resolv.conf; \ | |
| echo 'nameserver 1.1.1.1' | sudo tee -a /etc/resolv.conf; \ | |
| echo 'nameserver 1.0.0.1' | sudo tee -a /etc/resolv.conf; \ | |
| systemctl restart systemd-resolved | |
| reboot | |
| # установка solana | |
| tmux new -s solana | |
| # разделяем сессию tmux - ctrl + b и shift + ' | |
| # выполняем в середине: | |
| su solana | |
| # Скачать solana, сервисник | |
| #curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.16.20/install/solana-install-init.sh | sh -s - v2.3.2; \ | |
| sh -c "$(curl -sSfL https://release.anza.xyz/v2.3.2/install)" | |
| export PATH="/root/.local/share/solana/install/active_release/bin:$PATH"; \ | |
| sudo wget https://gist.githubusercontent.com/AlekseiOvchinnikov13/9943e1871afb23dbafee4fd54663c5d6/raw/tds_service_edge -O /etc/systemd/system/solana.service; \ | |
| sudo systemctl daemon-reload; \ | |
| sudo systemctl enable solana.service; \ | |
| sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime; \ | |
| HOME=/root; \ | |
| mkdir $HOME/solana; \ | |
| mkdir $HOME/solana/validator-ledger; \ | |
| cd $HOME//solana; \ | |
| sudo nano /etc/systemd/system/solana.service; \ | |
| sudo systemctl daemon-reload | |
| echo 'if $programname == "solana-validator" then stop' > /etc/rsyslog.d/01-solana-remove.conf && sudo systemctl restart rsyslog; \ | |
| ### 256 Gb Service File | |
| sudo wget https://gist.githubusercontent.com/AlekseiOvchinnikov13/9943e1871afb23dbafee4fd54663c5d6/raw/tds_service_edge_256 -O /etc/systemd/system/solana.service; \ | |
| sudo systemctl daemon-reload; \ | |
| sudo systemctl enable solana.service | |
| ### EXISTS VALIDATOR SETUP | |
| solana config set --url http://api.testnet.solana.com --keypair /root/solana/validator-keypair.json; \ | |
| solana balance | |
| ##### NEW VALIDATOR SETUP | |
| # загрузить руками файл testnet-validator-keypair.json | |
| sudo mv $HOME/solana/testnet-validator-keypair.json $HOME/solana/validator-keypair.json; \ | |
| solana config set --url http://api.testnet.solana.com --keypair $HOME/solana/validator-keypair.json; \ | |
| solana balance #должно вывести число, а не ошибку, если 0, то см. AIRDROP ниже | |
| # проверить ключ | |
| solana-keygen pubkey $HOME/solana/validator-keypair.json | |
| ################# AIRDROP | |
| 1 вариант - запросить 2 токена с официального крана | |
| RPC_TDS="https://fabled-evocative-fog.solana-testnet.quiknode.pro/9bd4dd99903036cccfea4e4834451dc9d5c20589/"; \ | |
| solana airdrop 1 "$(solana-keygen pubkey $HOME/solana/solana/validator-keypair.json)" --url ${RPC_TDS} | |
| #solana airdrop 1 7XYJkB2hXG9jVEjQx3kEW6HdVswWW3rC8Z79oxQHg81X --url https://api.testnet.solana.com | |
| 2 вариант - запросить токены с нефоициального крана - ПРЕДПОЧТИТЕЛЬНЫЙ | |
| https://solanatools.xyz/faucet/testnet.html | |
| solana -ut withdraw-from-vote-account vote-account-keypair.json HdgXzrgbt8VqqiFBnrAtAgajhQK9pYYjeGZgPtyX7ubg 1000 | |
| 3 вариант - (НЕ рекомендуется) отправить с другого кота | |
| RPC_TDS="https://fabled-evocative-fog.solana-testnet.quiknode.pro/9bd4dd99903036cccfea4e4834451dc9d5c20589/"; \ | |
| solana transfer B83vQiTjBKHYMBmxARQhiBVUujSdYDAGMATBzV9uxDnW 10 --allow-unfunded-recipient --url ${RPC_TDS} | |
| ################## AIRDROP | |
| solana-keygen new --no-bip39-passphrase -o $HOME/solana/vote-account-keypair.json | grep pubkey; \ | |
| solana-keygen new --no-bip39-passphrase -o $HOME/solana/authorized-withdrawer-keypair.json | grep pubkey; \ | |
| solana-keygen new --no-bip39-passphrase -o $HOME/solana/validator-stake-keypair.json | grep pubkey | |
| # забекапить ключи выше в файлик и в папку | |
| solana create-vote-account $HOME/solana/vote-account-keypair.json $HOME/solana/validator-keypair.json $HOME/solana/authorized-withdrawer-keypair.json --url https://api.testnet.solana.com --commission 100 && \ | |
| solana vote-account $HOME/solana/vote-account-keypair.json | |
| solana create-stake-account $HOME/solana/validator-stake-keypair.json 1 --url https://api.testnet.solana.com && sleep 5 && \ | |
| solana delegate-stake $HOME/solana/validator-stake-keypair.json $HOME/solana/vote-account-keypair.json --url https://api.testnet.solana.com && sleep 5; \ | |
| solana stake-account $HOME/solana/validator-stake-keypair.json | |
| # скачать node exporter, изменить его конфиг, скрипт для отправки метрик | |
| cd ~; \ | |
| curl -s https://gist.githubusercontent.com/Bambarello/371cd2396d5436de11de6fc8cc26a2a0/raw/ --output node_exporter.sh && bash node_exporter.sh && sleep 10 && \ | |
| sudo sed -i 's/ExecStart=\/usr\/local\/bin\/node_exporter/ExecStart=\/usr\/local\/bin\/node_exporter --collector.textfile.directory=\/var\/lib\/node_exporter\/textfile_collector/' /etc/systemd/system/node_exporter.service; \ | |
| sudo systemctl daemon-reload; \ | |
| sudo systemctl restart node_exporter; \ | |
| sudo mkdir /var/lib/node_exporter; \ | |
| sudo mkdir /var/lib/node_exporter/textfile_collector; \ | |
| FILE_NAME=/root/solana/solana-validator-stat.sh; \ | |
| URL=https://gist.githubusercontent.com/AlekseiOvchinnikov13/5063bfba0776623eefc88583bff4997a/raw/tds_solana-validator-stat.sh; \ | |
| sudo curl -o ${FILE_NAME} -fSL ${URL} | |
| ### sudo shred -uvz -n 3 * | |
| 1. | |
| su solana | |
| cd /root/solana | |
| sudo systemctl daemon-reload; sudo systemctl restart solana; sudo journalctl -u solana -f | |
| #sudo systemctl daemon-reload; sudo systemctl restart solana; sudo journalctl -u solana -f --no-hostname | grep solana | grep -v solana_metrics | |
| 2. | |
| #while true; do timeout 60 solana catchup /home/solana/solana/validator-keypair.json http://127.0.0.1:8899/ || echo timeout; sleep 60; done | |
| solana catchup /root/solana/validator-keypair.json http://127.0.0.1:8899 | |
| solana validators -r -n | grep "$(solana-keygen pubkey /root/solana/validator-keypair.json)" | |
| 3. | |
| sudo su - root | |
| cd /home/solana/solana | |
| (crontab -l ; echo "*/10 * * * * bash /root/solana/solana-validator-stat.sh")| crontab - | |
| (crontab -l ; echo "*/10 * * * * bash /root/solana/solana-active-stake.sh")| crontab - | |
| (crontab -l ; echo "*/10 * * * * bash /root/solana/solana_node_exporter_v2_main.sh")| crontab - | |
| #while true; do bash solana-validator-stat.sh; sleep 600; done | |
| # ссылка | |
| https://gist.github.com/Bambarello/298d55e491d3fd0c3169468406a7afa0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt update | |
| sudo apt install clang -y | |
| clang -v | |
| sudo apt install make -y | |
| make -version | |
| sudo apt install build-essential -y | |
| sudo apt-get install manpages-dev | |
| gcc --version | |
| curl https://sh.rustup.rs -sSf | sh | |
| source "$HOME/.cargo/env" | |
| export VERSION=v0.703.20300 | |
| #UPDATE | |
| cd | |
| rm -rf firedancer | |
| git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git | |
| cd firedancer | |
| git fetch | |
| git pull | |
| git checkout $VERSION | |
| ./deps.sh fetch check install | |
| make -j fdctl solana | |
| systemctl stop fd | |
| sudo /root/firedancer/build/native/gcc/bin/fdctl configure fini all --config /root/config.toml | |
| reboot | |
| tmux new -s firedancer | |
| sudo /root/firedancer/build/native/gcc/bin/fdctl configure init all --config /root/config.toml | |
| systemctl restart fd; journalctl -f -u fd | |
| solana catchup /root/solana/validator-keypair.json http://127.0.0.1:8899 | |
| solana validators -r -n | grep "$(solana-keygen pubkey /root/solana/validator-keypair.json)" | |
| # | |
| git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git | |
| cd firedancer | |
| git checkout $VERSION | |
| git submodule update | |
| wget https://gist.githubusercontent.com/AlekseiOvchinnikov13/9943e1871afb23dbafee4fd54663c5d6/raw/tds_service_edge_firedancer -O /root/config.toml | |
| ./deps.sh fetch check install | |
| sudo sed -i 's/kernel.yama.ptrace_scope = 1/kernel.yama.ptrace_scope = 0/' /etc/sysctl.d/10-ptrace.conf | |
| make -j fdctl solana | |
| NEWUSER=firedancer; \ | |
| adduser --disabled-password --gecos "" --shell /bin/bash $NEWUSER; \ | |
| usermod -g sudo $NEWUSER; \ | |
| passwd -l $NEWUSER; \ | |
| echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers; \ | |
| echo "$NEWUSER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \ | |
| echo "DenyUsers $NEWUSER" | sudo tee -a /etc/ssh/sshd_config; \ | |
| sudo service ssh restart; \ | |
| sudo chown -hR $NEWUSER:$NEWUSER /home/$NEWUSER/ | |
| cp /root/solana/validator-keypair.json /home/firedancer/validator-keypair.json; \ | |
| cp /root/solana/vote-account-keypair.json /home/firedancer/vote-account-keypair.json; \ | |
| sudo chown -hR $NEWUSER:$NEWUSER /home/$NEWUSER/ | |
| ##сбросить конфиг | |
| sudo /root/firedancer/build/native/gcc/bin/fdctl configure fini all --config /root/config.toml | |
| wget https://gist.githubusercontent.com/AlekseiOvchinnikov13/9943e1871afb23dbafee4fd54663c5d6/raw/tds_firedancer_service_file -O /etc/systemd/system/fd.service | |
| chmod 0644 /etc/systemd/system/fd.service | |
| systemctl daemon-reload | |
| sudo systemctl enable fd | |
| nano /etc/systemd/system/fd.service | |
| reboot | |
| systemctl stop solana && systemctl disable solana | |
| tmux new -s firedancer | |
| tmux a -t firedancer | |
| sudo /root/firedancer/build/native/gcc/bin/fdctl configure init all --config /root/config.toml | |
| #sudo /root/firedancer/build/native/gcc/bin/fdctl run --config /root/config.toml | |
| systemctl start fd; journalctl -f -u fd | |
| solana catchup /root/solana/validator-keypair.json http://127.0.0.1:8899 | |
| solana validators -r -n | grep "$(solana-keygen pubkey /root/solana/validator-keypair.json)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo sleep $(shuf -i 100-3600 -n 1) | |
| #sudo -u solana $(which solana-install) init $1 | |
| sudo rm -rf /root/solana/validator-ledger/* | |
| sudo wget https://gist.githubusercontent.com/AlekseiOvchinnikov13/9943e1871afb23dbafee4fd54663c5d6/raw/tds_service_edge_256 -O /etc/systemd/system/solana.service | |
| sudo systemctl daemon-reload | |
| sudo systemctl restart solana-restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Frankendancer Validator | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| Restart=on-failure | |
| User=root | |
| RestartSec=1 | |
| LimitNOFILE=2048000 | |
| MemoryMax=100G | |
| ExecStart=/bin/bash -c '\ | |
| /root/firedancer/build/native/gcc/bin/fdctl configure init all --config /root/config.toml && \ | |
| /root/firedancer/build/native/gcc/bin/fdctl run --config /root/config.toml' | |
| [Install] | |
| WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Solana TdS node | |
| After=network.target | |
| StartLimitIntervalSec=1 | |
| [Service] | |
| Type=simple | |
| Restart=always | |
| User=root | |
| RestartSec=1 | |
| WorkingDirectory=/root | |
| LimitNOFILE=2048000 | |
| MemoryMax=200G | |
| Environment="EXPECTED_GENESIS_HASH=4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY" | |
| Environment="EXPECTED_BANK_HASH=4oMrSXsLTiCc1X7S27kxSfGVraTCZoZ7YTy2skEB9bPk" | |
| Environment="EXPECTED_SHRED_VERSION=9065" | |
| Environment="SUPERMAJORITY=343175553" | |
| Environment="SOLANA_METRICS_CONFIG="host=https://metrics.solana.com:8086,db=tds,u=testnet_write,p=c4fa841aa918bf8274e3e2a44d77568d9861b3ea"" | |
| ExecStart=/root/.local/share/solana/install/active_release/bin/agave-validator \ | |
| --known-validator eoKpUABi59aT4rR9HGS3LcMecfut9x7zJyodWWP43YQ \ | |
| --known-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \ | |
| --known-validator td2GGWDsCJ6LvjN89oLJvmrDwE14neNrbqQ9s3tVkPy \ | |
| --known-validator td3n5NGhP7JKWrL638gzau3NY7mF4K3ztZww3GkpywJ \ | |
| --known-validator FnpP7TK6F2hZFVnqSUJagZefwRJ4fmnb1StS1NokpLZM \ | |
| --known-validator BFquPCAYdjN9QyLVfuGrQdJTF9Ct7Z85FDxhFeLcpFqR \ | |
| --entrypoint entrypoint.testnet.solana.com:8001 \ | |
| --entrypoint entrypoint2.testnet.solana.com:8001 \ | |
| --entrypoint entrypoint3.testnet.solana.com:8001 \ | |
| --entrypoint entrypoint.testnet.solana.sergo.dev:8001 \ | |
| --expected-genesis-hash $EXPECTED_GENESIS_HASH \ | |
| --expected-shred-version $EXPECTED_SHRED_VERSION \ | |
| --expected-bank-hash $EXPECTED_BANK_HASH \ | |
| --dynamic-port-range 8000-8200 \ | |
| --identity /root/solana/validator-keypair.json \ | |
| --vote-account /root/solana/vote-account-keypair.json \ | |
| --ledger /root/solana/validator-ledger \ | |
| --accounts /dev/shm/validator-ledger/accounts \ | |
| --accounts-index-path /dev/shm/validator-ledger/accounts_index \ | |
| --accounts-hash-cache-path /dev/shm/validator-ledger/accounts_hash_cache \ | |
| --gossip-port 8001 \ | |
| --rpc-port 8899 \ | |
| --limit-ledger-size 50000000 \ | |
| --log - \ | |
| --private-rpc \ | |
| --full-rpc-api \ | |
| --no-port-check \ | |
| --no-poh-speed-test \ | |
| --skip-poh-verify \ | |
| --no-check-vote-account \ | |
| --wal-recovery-mode skip_any_corrupted_record \ | |
| --disable-accounts-disk-index \ | |
| --minimal-snapshot-download-speed 30485760 \ | |
| --full-snapshot-interval-slots 25000 \ | |
| --incremental-snapshot-interval-slots 1000 \ | |
| --maximum-full-snapshots-to-retain 1 \ | |
| --maximum-incremental-snapshots-to-retain 1 \ | |
| --maximum-local-snapshot-age 1500 \ | |
| --incremental-snapshot-archive-path /dev/shm/validator-ledger \ | |
| --use-snapshot-archives-at-startup when-newest \ | |
| --tower /dev/shm/tower \ | |
| --tpu-max-connections-per-ipaddr-per-minute 50 \ | |
| --block-verification-method unified-scheduler \ | |
| --experimental-poh-pinned-cpu-core 2 \ | |
| --wait-for-supermajority $SUPERMAJORITY | |
| #--no-genesis-fetch \ | |
| #--no-snapshot-fetch \ | |
| #--wait-for-supermajority $SUPERMAJORITY \ | |
| [Install] | |
| WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user = "firedancer" | |
| dynamic_port_range = "8900-9000" | |
| [log] | |
| path="-" | |
| colorize = "auto" | |
| level_logfile = "INFO" | |
| level_stderr = "NOTICE" | |
| level_flush = "WARNING" | |
| [reporting] | |
| solana_metrics_config = "host=https://metrics.solana.com:8086,db=tds,u=testnet_write,p=c4fa841aa918bf8274e3e2a44d77568d9861b3ea" | |
| [ledger] | |
| limit_size = 50_000_000 | |
| snapshot_archive_format = "zstd" | |
| require_tower = false | |
| [gossip] | |
| entrypoints = [ | |
| "entrypoint.testnet.solana.com:8001", | |
| "entrypoint2.testnet.solana.com:8001", | |
| "entrypoint3.testnet.solana.com:8001", | |
| ] | |
| port_check = true | |
| port = 8001 | |
| [rpc] | |
| port = 8899 | |
| full_api = true | |
| private = true | |
| transaction_history = false | |
| extended_tx_metadata_storage = false | |
| [snapshots] | |
| incremental_snapshots = true | |
| full_snapshot_interval_slots = 25000 | |
| incremental_snapshot_interval_slots = 1000 | |
| maximum_full_snapshots_to_retain = 1 | |
| maximum_incremental_snapshots_to_retain = 1 | |
| minimum_snapshot_download_speed = 50485760 | |
| [consensus] | |
| identity_path = "/home/firedancer/validator-keypair.json" | |
| vote_account_path = "/home/firedancer/vote-account-keypair.json" | |
| expected_genesis_hash = "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY" | |
| expected_bank_hash = "4oMrSXsLTiCc1X7S27kxSfGVraTCZoZ7YTy2skEB9bPk" | |
| expected_shred_version = 9065 | |
| known_validators = [ | |
| "5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on", | |
| "dDzy5SR3AXdYWVqbDEkVFdvSPCtS9ihF5kJkHCtXoFs", | |
| "Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN", | |
| "eoKpUABi59aT4rR9HGS3LcMecfut9x7zJyodWWP43YQ", | |
| "9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv", | |
| "HvqQDoVtjmDQD13F3FrDypBfpjrBiiGTJYF4MvYE5qQC", | |
| "FnpP7TK6F2hZFVnqSUJagZefwRJ4fmnb1StS1NokpLZM", | |
| "BFquPCAYdjN9QyLVfuGrQdJTF9Ct7Z85FDxhFeLcpFqR", | |
| ] | |
| snapshot_fetch = true | |
| genesis_fetch = true | |
| poh_speed_test = false | |
| os_network_limits_test = false | |
| [layout] | |
| affinity = "auto" | |
| agave_affinity = "auto" | |
| net_tile_count = 1 | |
| quic_tile_count = 1 | |
| resolv_tile_count = 1 | |
| verify_tile_count = 2 | |
| bank_tile_count = 2 | |
| shred_tile_count = 2 | |
| [hugetlbfs] | |
| mount_path = "/home/firedancer/.fd" | |
| [tiles.gui] | |
| enabled = false | |
| [tiles.bundle] | |
| enabled = true | |
| url = "https://testnet.block-engine.jito.wtf" | |
| tip_distribution_program_addr = "F2Zu7QZiTYUhPd7u9ukRVwxh7B71oA3NMJcHuCHc29P2" | |
| tip_payment_program_addr = "GJHtFqM9agxPmkeKjHny6qiRKrXZALvvFGiKf11QE7hy" | |
| tip_distribution_authority = "GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib" | |
| commission_bps = 10000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment