├── README.md └── FuelNode.sh /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Fuel Core Node Setup Script 4 | 5 | This script automates the setup process for running a Fuel Core node on your system. 6 | 7 | 8 | ### Hardware Requirements 9 | 10 | | Hardware | Minimum | 11 | |------------|-----------| 12 | | Processor | 2 Cores | 13 | | Memory | 4 GB | 14 | | Storage | 30 GB | 15 | 16 | 17 | ## Requirements 18 | 19 | ### Install git: 20 | 21 | ```sh 22 | sudo apt-get install git 23 | ``` 24 | 25 | ## Clone this repository: 26 | 27 | ```sh 28 | git clone https://github.com/0xHawre/FuelNode.sh.git && cd FuelNode.sh 29 | ``` 30 | 31 | ## Allow execution: 32 | 33 | ```sh 34 | chmod +x FuelNode.sh 35 | ``` 36 | 37 | ## Run the script: 38 | 39 | ```sh 40 | ./FuelNode.sh 41 | ``` 42 | 43 | by ``` CTRL + b then d ```exit from tmux 44 | 45 | ### Note: 46 | 47 | You need SEPOLIA RPC for this script to function correctly. 48 | also youre privet key is saved in secret.txt you can see thath with: 49 | ```sh 50 | cat secret.txt 51 | ``` 52 | --- 53 | 54 | Make sure to replace placeholders like "SEPOLIA RPC" with the specific details or instructions relevant to your setup. 55 | 56 | 57 | 58 | youre tmux should be like: ![Screenshot 2024-07-07 at 3 45 48 PM](https://github.com/0xHawre/FuelNode.sh/assets/131952165/a99af718-3921-4d6e-abc2-beedfd5c0127) 59 | 60 | also youre alchemy: Screenshot 2024-07-07 at 3 46 33 PM 61 | 62 | 63 | -------------------------------------------------------------------------------- /FuelNode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | print_ascii() { 4 | echo " ___ _ _ " 5 | echo " / _ \ | | | | " 6 | echo "| | | |_ _| |__| | __ ___ ___ __ ___ " 7 | echo "| | | \ \/ / __ |/ _\` \ \ /\ / / '__/ _ \\" 8 | echo "| |_| |> <| | | | (_| |\ V V /| | | __/" 9 | echo " \___//_/\_\_| |_|\__,_| \_/\_/ |_| \___|" 10 | echo " " 11 | } 12 | 13 | echo "====================================" 14 | print_ascii 15 | echo "Welcome to the Fuel Core Setup Script" 16 | echo "====================================" 17 | 18 | # Update package lists and upgrade all installed packages 19 | sudo apt-get update -y && sudo apt-get upgrade -y 20 | echo "Installing necessary tools..." 21 | 22 | # Install git 23 | check_git() { 24 | if command -v git &> /dev/null; then 25 | git_version=$(git --version | head -n 1) 26 | echo "git is installed: $git_version" 27 | else 28 | echo "git is not installed" 29 | install_git 30 | fi 31 | } 32 | 33 | install_git() { 34 | echo "Installing git..." 35 | sudo apt-get install git -y 36 | } 37 | 38 | check_git 39 | 40 | # Install wget 41 | check_wget() { 42 | if command -v wget &> /dev/null; then 43 | wget_version=$(wget --version | head -n 1) 44 | echo "wget is installed: $wget_version" 45 | else 46 | echo "wget is not installed" 47 | install_wget 48 | fi 49 | } 50 | 51 | install_wget() { 52 | echo "Installing wget..." 53 | sudo apt-get install wget -y 54 | } 55 | 56 | check_wget 57 | 58 | # Install curl 59 | check_curl() { 60 | if command -v curl &> /dev/null; then 61 | curl_version=$(curl --version | head -n 1) 62 | echo "curl is installed: $curl_version" 63 | else 64 | echo "curl is not installed" 65 | install_curl 66 | fi 67 | } 68 | 69 | install_curl() { 70 | echo "Installing curl..." 71 | sudo apt-get install curl -y 72 | } 73 | 74 | check_curl 75 | 76 | # Install rust 77 | check_rustc() { 78 | if command -v rustc &> /dev/null; then 79 | rustc_version=$(rustc --version | head -n 1) 80 | echo "rustc is installed: $rustc_version" 81 | else 82 | echo "rustc is not installed." 83 | install_rustc 84 | fi 85 | } 86 | 87 | install_rustc() { 88 | echo "Installing rustc..." 89 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y 90 | source $HOME/.cargo/env 91 | } 92 | 93 | check_rustc 94 | 95 | # Install tmux 96 | check_tmux() { 97 | if command -v tmux &> /dev/null; then 98 | tmux_version=$(tmux --version | head -n 1) 99 | echo "tmux is installed: $tmux_version" 100 | else 101 | echo "tmux is not installed" 102 | install_tmux 103 | fi 104 | } 105 | 106 | install_tmux() { 107 | echo "Installing tmux..." 108 | sudo apt-get install tmux -y 109 | } 110 | 111 | check_tmux 112 | 113 | # Install fuel 114 | curl https://install.fuel.network | sh 115 | source $HOME/.bashrc 116 | export PATH="$HOME/.fuelup/bin:$PATH" 117 | 118 | fuelup toolchain install latest 119 | fuelup self update 120 | fuelup toolchain install nightly 121 | fuelup default nightly 122 | fuelup show 123 | fuelup default 124 | 125 | git clone https://github.com/FuelLabs/chain-configuration chain-configuration 126 | mkdir -p ~/.fuel-sepolia-testnet 127 | cp -r chain-configuration/ignition/* ~/.fuel-sepolia-testnet/ 128 | 129 | fuelup toolchain install testnet 130 | fuelup default testnet 131 | 132 | echo "Now we're going to generate a new Peering Key. Make sure to save them." 133 | fuel-core-keygen new --key-type peering > secret.txt 134 | cat secret.txt 135 | echo "Your keys have been saved to secret.txt." 136 | echo "Please save them securely and press Enter after you have done so." 137 | read -p "If you saved your secret key, press Enter to continue..." enter_key 138 | secret_value=$(jq -r '.secret' secret.txt) 139 | 140 | read -p "Enter node name: " nodeName 141 | echo 142 | # reo -p "Enter secret key: " secret 143 | echo 144 | read -p "Enter Sepolia RPC: " RPC 145 | echo 146 | 147 | cat < /tmp/fuel_core_command.sh 148 | #!/bin/bash 149 | fuel-core run \\ 150 | --service-name=${nodeName} \\ 151 | --keypair $secret_value \\ 152 | --relayer $RPC \\ 153 | --ip=0.0.0.0 --port=5333 --peering-port=40453 \\ 154 | --db-path ~/.fuel-sepolia-testnet \\ 155 | --snapshot ~/.fuel-sepolia-testnet \\ 156 | --utxo-validation --poa-instant=false --enable-p2p \\ 157 | --reserved-nodes=/dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmDxoChB7AheKNvCVpD4PHJwuDGn8rifMBEHmEynGHvHrf \\ 158 | --sync-header-batch-size=100 \\ 159 | --enable-relayer \\ 160 | --relayer-v2-listening-contracts=0x01855B78C1f8868DE70e84507ec735983bf262dA \\ 161 | --relayer-da-deploy-height=5827607 \\ 162 | --relayer-log-page-size=500 \\ 163 | --sync-block-stream-buffer-size=30 164 | EOT 165 | 166 | # Make the script executable 167 | chmod +x /tmp/fuel_core_command.sh 168 | 169 | # Start a new tmux session and run the script 170 | SESSION_NAME="my_tmux_session" 171 | tmux new-session -d -s $SESSION_NAME "/tmp/fuel_core_command.sh" 172 | 173 | # Attach to the tmux session 174 | tmux attach-session -t $SESSION_NAME 175 | 176 | --------------------------------------------------------------------------------