Skip to content

Commit

Permalink
chore: update docs for testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-user committed May 22, 2024
1 parent 34738d8 commit cfd2a64
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 19 deletions.
2 changes: 0 additions & 2 deletions docs/guides/docs/running-a-node/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ parent:

# Running a Node

> **Note:** This guide has not yet been updated for the new `testnet` network.
This guide is designed to swiftly introduce you to the process of running a local node for the Fuel blockchain.

## What is a Node?
Expand Down
6 changes: 2 additions & 4 deletions docs/guides/docs/running-a-node/running-a-local-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ parent:

# Running a local Fuel node

> **Note:** This guide has not yet been updated for the new `testnet` network.
In addition to deploying and testing on the Fuel Testnet, you can also run a local Fuel Node.

There are two types of Fuel networks that can be run:
Expand Down Expand Up @@ -47,7 +45,7 @@ Here is an example of what that looks like using version {props.fuelCoreVersion}
To start the node with a custom configuration, you can use the command below:

```sh
fuel-core run --chain ./chainConfig.json --db-type in-memory --debug
fuel-core run --snapshot ./your/path/to/chain_config_folder --db-type in-memory --debug
```

To find an example chain configuration file for a specific `fuel-core` version, refer to the [`fuel-core`](https://github.com/FuelLabs/fuel-core/tree/v0.22.0/deployment/scripts/chainspec) repo.
Expand All @@ -68,7 +66,7 @@ To run a local node with persistence a chain configuration file is required.
To start the node, run the following command:

```sh
fuel-core run --ip 127.0.0.1 --port 4000 --chain ./chainConfig.json --db-path ./.fueldb --debug
fuel-core run --ip 127.0.0.1 --port 4000 --snapshot ./your/path/to/chain_config_folder --db-path ./.fueldb --debug
```

## Connecting to the local node from a browser wallet
Expand Down
59 changes: 46 additions & 13 deletions docs/guides/docs/running-a-node/running-a-testnet-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ parent:

# Running a local Fuel node connected to Testnet using P2P

> **Note:** This guide has not yet been updated for the new `testnet` network.
{/*install_help:example:start*/}
> P2P syncing is currently disabled for the Beta-5 network. Please check this page or the [Forum](https://forum.fuel.network) for updates.
{/*install_help:example:end*/}

## Installation

<TextImport
Expand Down Expand Up @@ -44,6 +38,18 @@ parent:
trim="true"
/>

<ConditionalContent versionSet={props.versionSet} showForVersions={["default"]}>
To run a `testnet` node, you will need to install the `testnet` toolchain.

You can do this by running the commands below.

```sh
fuelup toolchain install testnet
fuelup default testnet
```

</ConditionalContent>

<TextImport
file="../counter-dapp/building-a-smart-contract.mdx"
comment="install_help"
Expand Down Expand Up @@ -111,7 +117,34 @@ Make sure you save this somewhere safe so you don't need to generate a new key p

## Chain Configuration

To run a local node with persistence, you must configure a `chainConfig.json` file.
To run a local node with persistence, you must have a folder with the following chain configuration files:

<ConditionalContent versionSet={props.versionSet} showForVersions={["default", "nightly"]}>
Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/v0.26.0/bin/fuel-core/chainspec/testnet)

`chain_config.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/chain_config.json"
/>

`metadata.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/metadata.json"
/>

`state_config.json`

<CodeImport
file="../../../fuel-core/bin/fuel-core/chainspec/testnet/state_config.json"
/>

`state_transition_bytecode.wasm`

Which is too large to display on this page, but you can find it [here](https://github.com/FuelLabs/fuel-core/blob/v0.26.0/bin/fuel-core/chainspec/testnet/state_transition_bytecode.wasm)

</ConditionalContent>

## Running a Local Node

Expand All @@ -125,17 +158,17 @@ Finally to put everything together to start the node, run the following command:
fuel-core run \
--service-name {ANY_SERVICE_NAME} \
--keypair {P2P_SECRET} \
--relayer {ETH_RPC_ENDPOINT}\
--relayer {ETH_RPC_ENDPOINT} \
--ip 0.0.0.0 --port 4000 --peering-port 30333 \
--db-path ~/.fuel_beta5 \
--chain ./chainConfig.json \
--db-path ~/.testnet \
--snapshot ./your/path/to/chain_config_folder \
--utxo-validation --poa-instant false --enable-p2p \
--min-gas-price 1 --max-block-size 18874368 --max-transmit-size 18874368 \
--reserved-nodes /dns4/p2p-beta-5.fuel.network/tcp/30333/p2p/16Uiu2HAmSMqLSibvGCvg8EFLrpnmrXw1GZ2ADX3U2c9ttQSvFtZX,/dns4/p2p-beta-5.fuel.network/tcp/30334/p2p/16Uiu2HAmVUHZ3Yimoh4fBbFqAb3AC4QR1cyo8bUF4qyi8eiUjpVP \
--reserved-nodes /dns4/p2p-devnet.fuel.network/tcp/30333/p2p/16Uiu2HAm6pmJUedRFjennk4A8yWL6zCApHCuykzRRroqMjjxZ8o6 \
--sync-header-batch-size 100 \
--enable-relayer \
--relayer-v2-listening-contracts 0x557c5cE22F877d975C2cB13D0a961a182d740fD5 \
--relayer-da-deploy-height 4867877 \
--relayer-v2-listening-contracts 0x01855B78C1f8868DE70e84507ec735983bf262dA \
--relayer-da-deploy-height 5827607 \
--relayer-log-page-size 2000
```

Expand Down

0 comments on commit cfd2a64

Please sign in to comment.