diff --git a/docs/guides/docs/running-a-node/index.mdx b/docs/guides/docs/running-a-node/index.mdx index 466e93b4a..28fd783c7 100644 --- a/docs/guides/docs/running-a-node/index.mdx +++ b/docs/guides/docs/running-a-node/index.mdx @@ -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? diff --git a/docs/guides/docs/running-a-node/running-a-local-node.mdx b/docs/guides/docs/running-a-node/running-a-local-node.mdx index 8ff3b05e2..b11e805f7 100644 --- a/docs/guides/docs/running-a-node/running-a-local-node.mdx +++ b/docs/guides/docs/running-a-node/running-a-local-node.mdx @@ -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: @@ -21,10 +19,10 @@ There are two types of Fuel networks that can be run: An in-memory node does not persist the blockchain state anywhere, it is only stored in memory as long as the node is active and running. -To spin-up a local in-memory Fuel node, run the following command: +To spin-up a local in-memory Fuel node download or copy the local snapshot from [here](https://github.com/FuelLabs/chain-configuration/tree/master/local), then run the following command: ```sh -fuel-core run --db-type in-memory --debug +fuel-core run --db-type in-memory --debug --snapshot ./your/path/to/chain_config_folder ``` To deploy a contract to the local node, run the following command: @@ -33,32 +31,59 @@ To deploy a contract to the local node, run the following command: forc deploy --node-url 127.0.0.1:4000/graphql ``` -Or to deploy without using a signing key: +Or to deploy with the default signer that is pre-funded by fuel-core: ```sh -forc deploy --unsigned --node-url 127.0.0.1:4000/graphql +forc deploy --default-signer --node-url 127.0.0.1:4000/graphql ``` ## Chain Configuration -To modify the initial state of the chain, you must configure a `chainConfig.json` file. +To modify the initial state of the chain, you must configure the `state_config.json` file in your chain configuration folder. Here is an example of what that looks like using version {props.fuelCoreVersion} of `fuel-core`: + + Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet) + + `chain_config.json` + + + + `metadata.json` + + + + `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/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet/state_transition_bytecode.wasm) + + + 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. +To find an example chain configuration folder for a specific `fuel-core` version, refer to the [`fuel-core`](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet) repo. ### Funding a wallet locally -You can edit the `coins` array inside the `inital_state` object to modify the initial assets owned by a given address. +You can edit the `coins` array inside `state_config.json` to modify the initial assets owned by a given address. The `owner` address must be a `B256` type address (begins with `0x`) instead of a `Bech32` type (begins with `fuel`). -The `amount` is a hex value. In this example, the value translates to `1,125,899.9 ETH`. +The `amount` is a numerical value. In this example, the value translates to `11,152,921,504 ETH`. ## Local node (with state persistence) @@ -68,7 +93,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 diff --git a/docs/guides/docs/running-a-node/running-a-testnet-node.mdx b/docs/guides/docs/running-a-node/running-a-testnet-node.mdx index 67eac221d..3f8a717c4 100644 --- a/docs/guides/docs/running-a-node/running-a-testnet-node.mdx +++ b/docs/guides/docs/running-a-node/running-a-testnet-node.mdx @@ -8,28 +8,8 @@ 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 - - - - +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 +``` + + Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet) + + `chain_config.json` + + + + `metadata.json` + + + + `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/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet/state_transition_bytecode.wasm) + + ## Running a Local Node @@ -125,17 +141,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,/dns4/p2p-devnet.fuel.network/tcp/30334/p2p/16Uiu2HAm8dBwTRzqazCMqQDdR8thMa7BKiW4ep2B4DoQQp6Qhyfd \ --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 ``` diff --git a/spell-check-custom-words.txt b/spell-check-custom-words.txt index 42b8a5ff0..7b2626817 100644 --- a/spell-check-custom-words.txt +++ b/spell-check-custom-words.txt @@ -110,4 +110,5 @@ onboarding Fuelet Metamask Devnet -devnet \ No newline at end of file +devnet +pre \ No newline at end of file