From cfd2a64a3c4ea0fb10a3ebed711d8014000f1941 Mon Sep 17 00:00:00 2001 From: Matt Auer Date: Wed, 22 May 2024 14:30:15 -0500 Subject: [PATCH 1/8] chore: update docs for testnet --- docs/guides/docs/running-a-node/index.mdx | 2 - .../running-a-node/running-a-local-node.mdx | 6 +- .../running-a-node/running-a-testnet-node.mdx | 59 +++++++++++++++---- 3 files changed, 48 insertions(+), 19 deletions(-) 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..41634863f 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: @@ -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. @@ -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 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..9f9b9cc48 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,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 + +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/v0.26.0/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/v0.26.0/bin/fuel-core/chainspec/testnet/state_transition_bytecode.wasm) + + ## Running a Local Node @@ -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 ``` From a1876f73e0ebc4afad38a58d984bf05adf1da767 Mon Sep 17 00:00:00 2001 From: Matt <54373384+matt-user@users.noreply.github.com> Date: Wed, 22 May 2024 15:34:49 -0500 Subject: [PATCH 2/8] Update docs/guides/docs/running-a-node/running-a-testnet-node.mdx Co-authored-by: Call Delegation <106365423+calldelegation@users.noreply.github.com> --- docs/guides/docs/running-a-node/running-a-testnet-node.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9f9b9cc48..12c195daf 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 @@ -164,7 +164,7 @@ fuel-core run \ --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-devnet.fuel.network/tcp/30333/p2p/16Uiu2HAm6pmJUedRFjennk4A8yWL6zCApHCuykzRRroqMjjxZ8o6 \ +--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 0x01855B78C1f8868DE70e84507ec735983bf262dA \ From a9fafd1101cdf0edcc2d0819ed35a1a8cc380875 Mon Sep 17 00:00:00 2001 From: Matt <54373384+matt-user@users.noreply.github.com> Date: Wed, 22 May 2024 15:39:47 -0500 Subject: [PATCH 3/8] Update docs/guides/docs/running-a-node/running-a-local-node.mdx Co-authored-by: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> --- docs/guides/docs/running-a-node/running-a-local-node.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 41634863f..57e02e165 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 @@ -48,7 +48,7 @@ To start the node with a custom configuration, you can use the command below: 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 file for a specific `fuel-core` version, refer to the [`fuel-core`](https://github.com/FuelLabs/fuel-core/tree/v0.26.0/bin/fuel-core/chainspec/testnet) repo. ### Funding a wallet locally From 6b3a852045a2c2ccba5deab3e20c11d9dce5151a Mon Sep 17 00:00:00 2001 From: Matt Auer Date: Wed, 22 May 2024 15:51:22 -0500 Subject: [PATCH 4/8] docs: implement review suggestions --- .../running-a-node/running-a-local-node.mdx | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) 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 41634863f..602b1cfd7 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 @@ -39,20 +39,45 @@ forc deploy --unsigned --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/v0.26.0/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/v0.26.0/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 --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. - ### 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`). From 6c11fc00b972da7253c6dafd4a3cfd3fe9bb6ce1 Mon Sep 17 00:00:00 2001 From: Matt Auer Date: Wed, 22 May 2024 15:55:25 -0500 Subject: [PATCH 5/8] docs: implement review suggestions --- .../running-a-node/running-a-testnet-node.mdx | 17 ----------------- 1 file changed, 17 deletions(-) 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 12c195daf..922833b2c 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 @@ -10,20 +10,6 @@ parent: ## Installation - - - - - To run a `testnet` node, you will need to install the `testnet` toolchain. You can do this by running the commands below. @@ -48,8 +33,6 @@ fuelup toolchain install testnet fuelup default testnet ``` - - Date: Wed, 22 May 2024 15:59:12 -0500 Subject: [PATCH 6/8] fix: deprecated option --- docs/guides/docs/running-a-node/running-a-local-node.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ce2c3f9ad..24b0db4ec 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 @@ -34,7 +34,7 @@ forc deploy --node-url 127.0.0.1:4000/graphql Or to deploy without using a signing key: ```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 From e34bae5d8a1ff32c0d673cf8bcdcb09a4ff2e026 Mon Sep 17 00:00:00 2001 From: Matt Auer Date: Thu, 23 May 2024 12:34:54 -0500 Subject: [PATCH 7/8] fix: link and default signer instructions --- .../docs/running-a-node/running-a-local-node.mdx | 14 +++++++------- .../docs/running-a-node/running-a-testnet-node.mdx | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) 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 24b0db4ec..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 @@ -19,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: @@ -31,7 +31,7 @@ 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 --default-signer --node-url 127.0.0.1:4000/graphql @@ -43,7 +43,7 @@ To modify the initial state of the chain, you must configure the `state_config.j 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/v0.26.0/bin/fuel-core/chainspec/testnet) + Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet) `chain_config.json` @@ -65,7 +65,7 @@ Here is an example of what that looks like using version {props.fuelCoreVersion} `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) + 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) @@ -75,7 +75,7 @@ To start the node with a custom configuration, you can use the command below: 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.26.0/bin/fuel-core/chainspec/testnet) 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 @@ -83,7 +83,7 @@ You can edit the `coins` array inside `state_config.json` to modify the initial 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) 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 922833b2c..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 @@ -103,7 +103,7 @@ Make sure you save this somewhere safe so you don't need to generate a new key p To run a local node with persistence, you must have a folder with the following chain configuration files: - Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/v0.26.0/bin/fuel-core/chainspec/testnet) + Here is the [specific configuration](https://github.com/FuelLabs/fuel-core/tree/9fddeccb4d112c148f6793bc3d21131a13778a25/bin/fuel-core/chainspec/testnet) `chain_config.json` @@ -125,7 +125,7 @@ To run a local node with persistence, you must have a folder with the following `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) + 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) From 6a238dc5d43104f8fd48c8e35e235c39652fd760 Mon Sep 17 00:00:00 2001 From: Matt Auer Date: Thu, 23 May 2024 14:33:53 -0500 Subject: [PATCH 8/8] fix: spellcheck --- spell-check-custom-words.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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