Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link
Running a Testnet Node

Icon LinkRunning a local Fuel node connected to Testnet using P2P

Icon LinkInstallation

To install the Fuel toolchain, you can use the fuelup-init script. This will install forc, forc-client, forc-fmt, forc-lsp, forc-wallet as well as fuel-core in ~/.fuelup/bin.

curl https://install.fuel.network | sh
Icon InfoCircle

Having problems? Visit the installation guide or post your question in our forum Icon Link.

Icon LinkGetting a Sepolia (Ethereum Testnet) API Key

An API key from any RPC provider that supports the Sepolia network will work. Relayers will help listen to events from the Ethereum network. We recommend either Infura Icon Link or Alchemy Icon Link

The endpoints should look like the following:

Icon LinkInfura

https://sepolia.infura.io/v3/{YOUR_API_KEY}

Icon LinkAlchemy

https://eth-sepolia.g.alchemy.com/v2/{YOUR_API_KEY}

Note that using other network endpoints will result in the relayer failing to start.

Icon LinkGenerating a P2P Key

Generate a new P2P key pairing by running the following command:

fuel-core-keygen new --key-type peering
{
  "peer_id":"16Uiu2HAmEtVt2nZjzpXcAH7dkPcFDiL3z7haj6x78Tj659Ri8nrs",
  "secret":"b0ab3227974e06d236d265bd1077bb0522d38ead16c4326a5dff2f30edf88496",
  "type":"peering"
}
### Do not share or lose this private key! Press any key to complete. ###

Make sure you save this somewhere safe so you don't need to generate a new key pair in the future.

Icon LinkChain Configuration

To run a local node with persistence, you must have a folder with the following chain configuration files:

For simplicity, clone the repository Icon Link into the directory of your choice.

When using the --snapshot flag later, you can replace ./your/path/to/chain_config_folder with the ignition folder of the repository you just cloned ./chain-configuration/ignition/.

Icon LinkRunning a Local Node

Finally to put everything together to start the node, run the following command:

fuel-core run \
--service-name=fuel-sepolia-testnet-node \
--keypair {P2P_PRIVATE_KEY} \
--relayer {ETHEREUM_RPC_ENDPOINT} \
--ip=0.0.0.0 --port=4000 --peering-port=30333 \
--db-path=~/.fuel-sepolia-testnet \
--snapshot ./your/path/to/chain_config_folder \
--utxo-validation --poa-instant false --enable-p2p \
--reserved-nodes /dns4/p2p-testnet.fuel.network/tcp/30333/p2p/16Uiu2HAmDxoChB7AheKNvCVpD4PHJwuDGn8rifMBEHmEynGHvHrf \
--sync-header-batch-size 100 \
--enable-relayer \
--relayer-v2-listening-contracts=0x01855B78C1f8868DE70e84507ec735983bf262dA \
--relayer-da-deploy-height=5827607 \
--relayer-log-page-size=500 \
--sync-block-stream-buffer-size 30

For the full description details of each flag above, run:

fuel-core run --help

Icon LinkConnecting to the local node from a browser wallet

To connect to the local node using a browser wallet, import the network address as:

http://0.0.0.0:4000/v1/graphql