From 64b22d5ded0f63c5b8f9d049baed94042fb96a84 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Thu, 5 Oct 2023 14:16:56 +0530 Subject: [PATCH 1/3] docs: update docs based on new change in dive cli --- dive/pages/list-of-cli-command.mdx | 27 ++- dive/pages/quickstart/_meta.json | 17 +- dive/pages/quickstart/bridges.mdx | 37 ++++ dive/pages/quickstart/bridges/_meta.json | 0 .../setting-up-cross-chain-connection.mdx | 71 ++++++-- .../setting-up-cross-chain-connection1.mdx | 172 ++++++++++++++++++ dive/pages/quickstart/chains.mdx | 26 +++ dive/pages/quickstart/chains/_meta.json | 21 +++ .../chains/setting-up-a-neutron-node.mdx | 75 ++++++++ .../chains/setting-up-an-archway-node.mdx | 93 ++++++++++ .../chains/setting-up-an-eth-node.mdx | 66 +++++++ .../chains/setting-up-an-hardhat-node.mdx | 64 +++++++ .../{ => chains}/setting-up-an-icon-node.mdx | 58 +++--- .../quickstart/setting-up-a-neutron-node.mdx | 49 ----- .../quickstart/setting-up-an-archway-node.mdx | 55 ------ .../quickstart/setting-up-an-eth-node.mdx | 65 ------- .../setting-up-cross-chain-connection1.mdx | 104 ----------- 17 files changed, 668 insertions(+), 332 deletions(-) create mode 100644 dive/pages/quickstart/bridges.mdx create mode 100644 dive/pages/quickstart/bridges/_meta.json rename dive/pages/quickstart/{ => bridges}/setting-up-cross-chain-connection.mdx (56%) create mode 100644 dive/pages/quickstart/bridges/setting-up-cross-chain-connection1.mdx create mode 100644 dive/pages/quickstart/chains.mdx create mode 100644 dive/pages/quickstart/chains/_meta.json create mode 100644 dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx create mode 100644 dive/pages/quickstart/chains/setting-up-an-archway-node.mdx create mode 100644 dive/pages/quickstart/chains/setting-up-an-eth-node.mdx create mode 100644 dive/pages/quickstart/chains/setting-up-an-hardhat-node.mdx rename dive/pages/quickstart/{ => chains}/setting-up-an-icon-node.mdx (73%) delete mode 100644 dive/pages/quickstart/setting-up-a-neutron-node.mdx delete mode 100644 dive/pages/quickstart/setting-up-an-archway-node.mdx delete mode 100644 dive/pages/quickstart/setting-up-an-eth-node.mdx delete mode 100644 dive/pages/quickstart/setting-up-cross-chain-connection1.mdx diff --git a/dive/pages/list-of-cli-command.mdx b/dive/pages/list-of-cli-command.mdx index c64132f..57abfc3 100644 --- a/dive/pages/list-of-cli-command.mdx +++ b/dive/pages/list-of-cli-command.mdx @@ -41,6 +41,9 @@ dive bridge [command] | Command | Description | | --------------------- | -------------------------------------------------| | `btp` | Starts BTP Bridge between ChainA and ChainB +| `ibc` | Starts IBC Bridge between ChainA and ChainB + + ### dive bridge btp @@ -59,7 +62,27 @@ dive bridge btp [flags] | -------------- | ---------- | -------------------------------------------------| | `--chainA string` | true | Mention Name of Supported Chain | `--chainB string`| true | Mention Name of Supported Chain -| `--bridge` | false | Add this flag if icon bridge is required +| `--bmvbridge` | false | Add this flag if icon bridge is required + + +### dive bridge ibc + +#### Description +Starts IBC Bridge between ChainA and ChainB + +#### Usage + +```filename="" copy +dive bridge ibc [flags] +``` + +#### Flags +| Flags | Required | Description | +| -------------- | ---------- | -------------------------------------------------| +| `--chainA string` | true | Mention Name of Supported Chain +| `--chainB string`| true | Mention Name of Supported Chain +| `--chainAServiceName string`| true | Mention service name if node is already running +| `--chainBServiceName string`| true | Mention service name if node is already running ### dive chain @@ -80,6 +103,8 @@ dive chain [command] | `eth` | Build, initialize and start a eth node | `hardhat` | Build, initialize and start a hardhat node |`icon` | Build, initialize and start a icon node +|`archway` | Build, initialize and start a archway node +|`neutron` | Build, initialize and start a neutron node ### dive chain icon diff --git a/dive/pages/quickstart/_meta.json b/dive/pages/quickstart/_meta.json index 858a43e..a720027 100644 --- a/dive/pages/quickstart/_meta.json +++ b/dive/pages/quickstart/_meta.json @@ -1,18 +1,9 @@ { - "setting-up-an-eth-node": { - "title": "Setting up an eth node" + "chains": { + "title": "Setting up an local nodes" }, - "setting-up-an-icon-node": { - "title": "Setting up an icon node" - }, - "setting-up-an-archway-node": { - "title": "Setting up an archway node" - }, - "setting-up-a-neutron-node": { - "title": "Setting up a neutron node" - }, - "setting-up-cross-chain-connection": { - "title" : "Setting up cross chain connection" + "bridges": { + "title": "Setting up an bridge between nodes" } } \ No newline at end of file diff --git a/dive/pages/quickstart/bridges.mdx b/dive/pages/quickstart/bridges.mdx new file mode 100644 index 0000000..9bfb361 --- /dev/null +++ b/dive/pages/quickstart/bridges.mdx @@ -0,0 +1,37 @@ +--- +title: Setting up the Bridge +--- + +# Setting up the Bridge + +The "bridge" command in DIVE CLI enables you to establish connections between two different blockchain chains using various supported cross-chain communication protocols. This powerful feature allows you to create a relay that connects two distinct chains and facilitates the seamless exchange of messages and data between them. + +## Usage + +### Dive Bridge Command + +The `dive bridge` command provides a unified interface to set up cross-chain bridges. You can use it to initiate communication between different blockchain networks by choosing from the available subcommands: + +```bash +dive bridge [flags] +dive bridge [command] +``` + +#### Available Bridge Commands + +1. **BTP (Blockchain Transfer Protocol) Bridge** + - Subcommand: `btp` + - Description: Starts a BTP Bridge between ChainA and ChainB, enabling cross-chain communication via the BTP protocol. + +2. **IBC (Inter-Blockchain Communication) Bridge** + - Subcommand: `ibc` + - Description: Establishes connections between Cosmos-based ChainA and ChainB, initiating cross-chain communication using the IBC protocol. + +### Global Flags + +- `-h, --help`: Displays help for the `dive bridge` command. +- `--verbose`: Prints logs to Stdout for detailed information during the bridge setup process. + +For more detailed information about a specific bridge command, you can use the `--help` flag with the desired subcommand, e.g., `dive bridge btp --help` or `dive bridge ibc --help`. + +DIVE CLI simplifies the process of creating bridges between blockchain networks, allowing you to harness the power of cross-chain communication in your decentralized applications and experiments. This feature opens up new possibilities for interoperability and data exchange between diverse blockchain ecosystems, making your development journey more versatile and exciting. diff --git a/dive/pages/quickstart/bridges/_meta.json b/dive/pages/quickstart/bridges/_meta.json new file mode 100644 index 0000000..e69de29 diff --git a/dive/pages/quickstart/setting-up-cross-chain-connection.mdx b/dive/pages/quickstart/bridges/setting-up-cross-chain-connection.mdx similarity index 56% rename from dive/pages/quickstart/setting-up-cross-chain-connection.mdx rename to dive/pages/quickstart/bridges/setting-up-cross-chain-connection.mdx index 08f9fbe..4677cae 100644 --- a/dive/pages/quickstart/setting-up-cross-chain-connection.mdx +++ b/dive/pages/quickstart/bridges/setting-up-cross-chain-connection.mdx @@ -1,38 +1,44 @@ --- -title: Setting up Cross Chain Connection (ICON-ETH) using BTP Bridge +title: Setting up Cross Chain Connection using BTP Bridge --- -import { Callout } from '../../node_modules/nextra/dist/components/callout.js' +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' +# Setting up Cross Chain Connection using BTP Bridge -# Setting up Cross Chain Connection (ICON-ETH) using BTP Bridge - -Follow these steps to establish a cross-chain connection between ICON and Ethereum using the BTP Bridge: +Follow these steps to establish a cross-chain connection between chains using the BTP Bridge: ## Step 1: Ensure Kurtosis Engine is Running Before proceeding, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: -```filename="" copy +```bash filename="" copy kurtosis engine start ``` -## Step 2: Start Two Chains (ICON and Ethereum/Hardhat) with BTP Bridge +## Step 2: Start Two Chains with BTP Bridge To start both the ICON and Ethereum chains and establish a BTP bridge between them, run the following command: -```filename="" copy +```bash filename="" copy dive bridge btp --chainA icon --chainB eth ``` -Executing above command will generate 'dive.json' in working directory which contains service details for the 'icon' and 'eth' chains. +Similarly, To start both the ICON and Hardhat chains and establish a BTP bridge between them, run the following command: + +```bash filename="" copy +dive bridge btp --chainA icon --chainB hardhat +``` + +Executing the above command will generate a 'dive.json' file in the working directory, The file contains service details of the running nodes and deployed contract addresses. Here's what you can find in `dive.json`: +
Example of dive.json -```filename="" copy +```json filename="" copy { "bridge": "false", "chains": { @@ -83,15 +89,16 @@ Example of dive.json } } ``` +
- *Tip:* By default, the bridge flag is set to false. If you need an ICON bridge, add the --bridge flag to the command. + *Tip:* By default, the bridge flag is set to false. If you need an ICON bridge, add the `--bmvbridge` or `-b` flag to the command. -The above command automates several essential tasks to configure and initialise the local environment: +The above command automates several essential tasks to configure and initialize the local environment: -- **Spinning up ICON and Ethereum Nodes:** DIVE automatically starts and configures the required ICON and Ethereum nodes for your local environment. +- **Spinning up Nodes:** DIVE automatically starts and configures the required ICON and Ethereum nodes for your local environment. - **Installing Required npm Dependencies:** DIVE takes care of installing all the necessary npm dependencies for seamless operation. @@ -102,7 +109,39 @@ The above command automates several essential tasks to configure and initialise - **Starting the Relay:** The relay image is built and launched, actively monitoring both ICON and Ethereum chains to enable smooth message transfer between them. -## Step 3: Setup is completed -Once the process completes, your local environment with the ICON and Ethereum chains connected via the BTP bridge will be ready for testing and development. +### Running BTP Bridge for Already Running Nodes + +To set up the BTP Bridge between already running ICON nodes and Ethereum, use the following command: + +```bash filename="" copy +dive bridge btp --chainA icon --chainB eth --chainAServiceName --chainBServiceName +``` + +To set up the BTP Bridge between already running ICON nodes and Hardhat, use the following command: + +```bash filename="" copy +dive bridge btp --chainA icon --chainB hardhat --chainAServiceName --chainBServiceName +``` + + + *Note:* When setting up a BTP relay between already running ICON nodes and Ethereum/Hardhat, you need to decentralize the ICON node first. + + + + + *Note:* Service names for "chainA" and "chainB" can be found in the `services.json` file. + + + +## Step 3: Setup is Completed + +Once the process completes, your local environment with the chains connected via the BTP bridge will be ready for testing and development. + +DIVE CLI simplifies the entire setup, allowing you to focus on developing and testing your decentralized applications with ease. + + + + *Note:* Currently, DIVE supports BTP bridge connections between ICON and Ethereum/Hardhat chains. + -DIVE CLI simplifies the entire setup, allowing you to focus on developing and testing your decentralized applications with ease. Happy developing \ No newline at end of file +Happy developing! diff --git a/dive/pages/quickstart/bridges/setting-up-cross-chain-connection1.mdx b/dive/pages/quickstart/bridges/setting-up-cross-chain-connection1.mdx new file mode 100644 index 0000000..382a7a4 --- /dev/null +++ b/dive/pages/quickstart/bridges/setting-up-cross-chain-connection1.mdx @@ -0,0 +1,172 @@ +--- +title: Setting up Cross Chain Connection using IBC Bridge +--- + +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' + +# Setting up Cross Chain Connection using IBC Bridge + +Follow these steps to establish a cross-chain connection between using the IBC Bridge: + +## Step 1: Ensure Kurtosis Engine is Running + +Before proceeding, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: + +```bash filename="" copy +kurtosis engine start +``` + +## Step 2: Start Two Chains with IBC Bridge + +### For ICON to Archway + +To start an IBC relay connection between ICON and Archway nodes, execute the following command: + +```bash filename="" copy +dive bridge ibc --chainA icon --chainB archway +``` + +### For ICON to Neutron + +Similarly, you can establish an IBC relay connection between ICON and Neutron nodes using this command: + +```bash filename="" copy +dive bridge ibc --chainA icon --chainB neutron +``` + +### For Neutron to Archway + +To create an IBC relay connection between Neutron and Archway nodes, run the following command: + +```bash filename="" copy +dive bridge ibc --chainA neutron --chainB archway +``` + +### For Archway to Neutron + +Conversely, you can initiate an IBC relay connection between Archway and Neutron nodes with this command: + +```bash filename="" copy +dive bridge ibc --chainA archway --chainB neutron +``` + +Executing the above commands will generate a 'dive.json' file in your working directory, which contains service details for the 'ICON' and 'Archway' chains. + +
+ +dive.json + + +```json filename="" copy +{ + "bridge": "false", + "chains": { + "eth": { + "block_number": "30", + "endpoint": "http://172.16.0.6:8545", + "endpoint_public": "http://172.16.0.3:8544", + "keypassword": "password", + "keystores/eth_keystore.json", + "network": "0x301824.eth", + "network_name": "eth", + "nid": "0x301824", + "service_name": "el-1-geth-lighthouse" + }, + "icon": { + "block_number": "242", + "endpoint": "http://172.16.0.2:9080/api/v3/icon_dex", + "endpoint_public": "http://127.0.0.1:8090/api/v3/icon_dex", + "keypassword": "gochain", + "keystore_path": "keystores/keystore.json", + "network": "0x3.icon", + "networkId": "0x1", + "networkTypeId": "0x1", + "network_name": "icon-0", + "nid": "0x3", + "service_name": "icon-node-0" + } + }, + "contracts": { + "eth": { + "bmc": "0xB9D7a3554F221B34f49d7d3C61375E603aFb699e", + "bmcm": "0xAb2A01BC351770D09611Ac80f1DE076D56E0487d", + "bmcs": "0xBFF5cD0aA560e1d1C6B1E2C347860aDAe1bd8235", + "bmv": "0x765E6b67C589A4b40184AEd9D9ae7ba40E32F8d4", + "dapp": "0x9bE03fF3E1888A216f9e48c68B587A89c5b94CD6", + "xcall": "0x5911A6541729C227fAda7D5187ee7518B47fB237" + }, + "icon": { + "bmc": "cx14303a14cbfd58b9bcd61b62b786b387f39be25a", + "bmv": "cx71337318cf13aa3fd805c75a38f4d5f800cd627c", + "dapp": "cx90bc909409ff8ba200b5a866e1bb952c39fa1f4a", + "xcall": "cx5dce8a39a49faadee03a02e6b33173aef91d4e67" + } + }, + "links": { + "dst": "eth", + "src": "icon" + } +} +``` +
+ +The above commands automate several essential tasks to configure and initialize the local environment: + +- **Spinning up Nodes:** DIVE automatically starts and configures the required nodes for your local environment. + +- **Installing Required npm Dependencies:** DIVE takes care of installing all the necessary npm dependencies for seamless operation. + +- **Enabling IBC Block on ICON Local Network:** DIVE facilitates IBC block functionality on the ICON local network by registering the node as a P-Rep and decentralizing the network. + +- **Deploying Contracts for IBC:** DIVE automatically builds and deploys essential smart contracts (ibc_core, light_client, xCall_ibc_connection, xCall & sample dApp) for IBC functionality on both the chains. + +- **Starting the Relay:** The relay image is built and launched, actively monitoring both chains to enable smooth message transfer between them. + + + *Note:* Currently, DIVE supports IBC relay setup between ICON, Archway, and Neutron nodes. + + + +## Starting IBC Between Already Running Nodes + +Starting IBC between already running nodes gives you more control, as you can start the individual nodes with custom configurations and then initiate the relay between them. + +### For ICON to Archway + +To set up IBC relay connections between already running ICON and Archway nodes, use the following command: + +```bash filename="" copy +dive bridge ibc --chainA icon --chainB archway --chainAServiceName --chainBServiceName +``` + +### For ICON to Neutron + +Similarly, you can start IBC relay connections between already running ICON and Neutron nodes using the following command: + +```bash filename="" copy +dive bridge ibc --chainA icon --chainB neutron --chainAServiceName --chainBServiceName +``` + +### For Neutron to Archway + +To establish an IBC relay connection between already running Neutron and Archway nodes, use the following command: + +```bash filename="" copy +dive bridge ibc --chainA neutron --chainB archway --chainAServiceName --chainBServiceName +``` + +### For Archway to Neutron + +Conversely, you can initiate an IBC relay connection between already running Archway and Neutron nodes with this command: + +```bash filename="" copy +dive bridge ibc --chainA archway --chainB neutron --chainAServiceName --chainBServiceName +``` + + + *Note:* Service names can be found in the `services.json` file, which is generated while setting up nodes individually. + + +## Step 3: Setup is completed +Once the process is completed, your local environment with the chains connected via the IBC bridge will be ready for testing and development. +DIVE CLI simplifies the entire setup, allowing you to focus on developing and testing your decentralized applications with ease. Happy developing! diff --git a/dive/pages/quickstart/chains.mdx b/dive/pages/quickstart/chains.mdx new file mode 100644 index 0000000..661be25 --- /dev/null +++ b/dive/pages/quickstart/chains.mdx @@ -0,0 +1,26 @@ +--- +title: "Setting up Local Node" +--- + +import { Callout } from '../../node_modules/nextra/dist/components/callout.js' + +# Setting up Local Node + +Using DIVE, you can set up a local blockchain node effortlessly, simplifying the process of building, initializing, and starting a specified blockchain node. DIVE takes care of tasks such as compiling, configuring dependencies, and launching the node, ensuring it's ready for network participation, transaction processing, and ledger maintenance within the specified blockchain ecosystem. + +## Command Structure + +The "chain" command has a flexible structure that allows you to specify the type of blockchain node you want to set up. The available subcommands include: + +- **archway:** Build, initialize, and start an Archway node. +- **eth:** Build, initialize, and start an Ethereum (ETH) node. +- **hardhat:** Build, initialize, and start a Hardhat node. +- **icon:** Build, initialize, and start an ICON node. +- **neutron:** Build, initialize, and start a Neutron node. + +## Usage + +To use the "chain" command, follow this general format: + +```bash +dive chain [subcommand] [flags] diff --git a/dive/pages/quickstart/chains/_meta.json b/dive/pages/quickstart/chains/_meta.json new file mode 100644 index 0000000..acd187e --- /dev/null +++ b/dive/pages/quickstart/chains/_meta.json @@ -0,0 +1,21 @@ +{ + "setting-up-an-icon-node": { + "title": "Setting up an ICON node" + }, + "setting-up-an-eth-node": { + "title": "Setting up an Ethereum node" + } + , + "setting-up-an-hardhat-node": { + "title": "Setting up an Hardhat node" + } + , + "setting-up-an-archway-node": { + "title": "Setting up an Archway-node" + } + , + "setting-up-a-neutron-node": { + "title": "Setting up a Neutron node" + } + } + \ No newline at end of file diff --git a/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx b/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx new file mode 100644 index 0000000..e74d376 --- /dev/null +++ b/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx @@ -0,0 +1,75 @@ +--- +title: "Setting Up a NEUTRON Node" +--- + +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' + +# Setting up a NEUTRON Node + +In this guide, you'll learn how to set up a Neutron node using DIVE CLI. This process enables you to interact with the cosmos blockchain in your local environment. Follow these steps to get started: + +## Step 1: Ensure Kurtosis Engine is Running + +Starting a Neutron chain with DIVE CLI is a straightforward process. Before you proceed, make sure the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: + +```bash filename="" copy +kurtosis engine start +``` + +## Step 2: Start Neutron Chain + +To start a Neutron node, you can use the following command: + +```bash filename="" copy +dive chain neutron +``` + +Executing this command will generate 'services.json' in the working directory, which contains service details for the 'neutron' chain. + +
+ +services.json + + +```json filename="" copy +{ + "service_name": "neutron-node", + "endpoint_public": "http://127.0.0.1:26657", + "endpoint": "http://172.16.0.3:26657" +} +``` + +- **service_name:** The name of the service. +- **endpoint_public:** The public endpoint URL for interacting with the service. +- **endpoint:** The endpoint for interacting with the service. +
+ + +## Step 3: Start Neutron with Custom Configuration + +You can start the Neutron node with custom public ports and a custom chain ID using the following command: + +```bash filename="" copy +dive chain neutron -c /path/to/custom-config.json +``` + +Replace `/path/to/custom-config.json` with the actual file path to your custom configuration file. Here's an example of a custom configuration file: + +
+ +custom_config.json + + +```json filename="" copy +{ + "chainId": "test-chain2", + "key": "test-key", + "password": "clock post desk civil pottery foster expand merit dash seminar song memory figure uniform spice circle try happy obvious trash crime hybrid hood cushion", + "public_grpc": 8033, + "public_tcp": 26634, + "public_http": 1315, + "public_rpc": 26696 +} +``` +In this example, we've set a custom chain ID, key, password, and custom public ports. Modify the values in the JSON file according to your requirements. +
diff --git a/dive/pages/quickstart/chains/setting-up-an-archway-node.mdx b/dive/pages/quickstart/chains/setting-up-an-archway-node.mdx new file mode 100644 index 0000000..c6e7364 --- /dev/null +++ b/dive/pages/quickstart/chains/setting-up-an-archway-node.mdx @@ -0,0 +1,93 @@ +--- +title: "Setting Up an ARCHWAY Node" +--- + +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' + +# Setting up an ARCHWAY Node + +In this guide, you'll learn how to set up an Archway node using DIVE CLI. This process enables you to interact with the Cosmos blockchain in your local environment. Follow these steps to get started: + +## Step 1: Ensure Kurtosis Engine is Running + +Starting a Cosmos chain with DIVE CLI is a straightforward process. Before you proceed, make sure the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: + +```bash filename="" copy +kurtosis engine start +``` + +## Step 2: Start Archway Chain + +To start an Archway node, run the following command: + +```bash filename="" copy +dive chain archway +``` + +Executing this command will generate 'services.json' in the working directory, which contains service details for the 'archway' chain. + +
+ +services.json + + +```json filename="" copy +{ + "service_name": "node-service-constantine-3", + "endpoint_public": "http://127.0.0.1:4564", + "endpoint": "http://172.16.0.3:26657", + "keypassword": "password", + "chain_id": "constantine-3", + "chain_key": "constantine-3-key" +} +``` + +- **service_name:** The name of the service. +- **endpoint_public:** The public endpoint URL for interacting with the service. +- **endpoint:** The endpoint for interacting with the service. +- **keypassword:** The password used for accessing the service. +- **chain_id:** The chain name. +- **chain_key:** The chain's key name. +
+ + +## Step 3: Start Archway with Custom Configuration + +If you want to start the Archway node with a custom configuration, you can create a custom configuration JSON file with the desired settings. Use the following command to start Archway with your custom configuration: + +```bash filename="" copy +dive chain archway -c /path/to/custom-config.json +``` + +Replace `/path/to/custom-config.json` with the actual file path to your custom configuration file, which should be in JSON format. Here's an example of a custom configuration file for Archway: + +
+ +custom_archway.json + + +```json filename="" copy +{ + "cid": "archway-node-0", + "key": "archway-node-0-key", + "private_grpc": 9090, + "private_http": 9091, + "private_tcp": 26656, + "private_rpc": 26657, + "public_grpc": 9090, + "public_http": 9091, + "public_tcp": 26656, + "public_rpc": 4564, + "password": "password" +} +``` +In this example, we've set custom values for the CID (Chain ID), key, ports, and password. Modify the values in the JSON file according to your requirements. +
+ + + +## Step 4: Setup is Completed + +After running the command, DIVE CLI will automatically start the ARCHWAY node, whether with the default or custom configuration and handle the necessary initialization processes. Please wait for the ARCHWAY node to fully initialize, which may take a few moments. + +Once the initialization is complete, you can interact with the local Archway node with your chosen configuration as needed. DIVE CLI sets up the ARCHWAY node on your local environment, enabling you to deploy and test smart contracts, explore transactions, and experiment with various ICON blockchain features. diff --git a/dive/pages/quickstart/chains/setting-up-an-eth-node.mdx b/dive/pages/quickstart/chains/setting-up-an-eth-node.mdx new file mode 100644 index 0000000..2b3d16c --- /dev/null +++ b/dive/pages/quickstart/chains/setting-up-an-eth-node.mdx @@ -0,0 +1,66 @@ +--- +title: "Setting Up an ETH Node" +--- + +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' + +# Setting up an ETH Node + +In this guide, you will learn how to set up an Ethereum node using DIVE CLI. This process allows you to interact with the Ethereum blockchain on your local environment. Follow these steps to get started: + +## Step 1: Ensure Kurtosis Engine is Running + +Starting an Ethereum chain with DIVE CLI is a straightforward process. Before you proceed, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: + +```bash filename="" copy +kurtosis engine start +``` + +## Step 2: Start Ethereum Chain + +To start a single Ethereum node, execute the following command: + +```bash filename="" copy +dive chain eth +``` + +Executing this command will generate a 'services.json' file in the working directory, which contains service details for the 'eth' chain. + +
+ +services.json + + +```json +{ + "service_name": "el-1-geth-lighthouse", + "endpoint_public": "http://172.16.0.3:8544", + "endpoint": "http://172.16.0.5:8545", + "keypassword": "password", + "keystore_path": "keystores/eth_keystore.json", + "network": "0x301824.eth", + "network_name": "eth", + "nid": "0x301824" +} +``` + +- **service_name:** The name of the service. +- **endpoint_public:** The public endpoint URL for interacting with the service. +- **endpoint:** The private endpoint. +- **keypassword:** The password used for accessing the service's keystore. +- **keystore_path:** The file path for the service's keystore. +- **network:** The network ID. +- **network_name:** The name of the network. +- **nid:** The unique identifier for the network. + +
+ +## Step 3: Setup is Completed + +After running the command, DIVE CLI will automatically start the Ethereum (ETH) node and handle the necessary initialization processes. Please wait for the ETH node to fully initialize, which may take a few moments. + +Once the initialization is complete, you can interact with the local Ethereum chain as needed. DIVE CLI sets up the ETH node on your local environment, enabling you to deploy and test smart contracts, explore transactions, and experiment with various Ethereum blockchain features. + + + *Tip:* DIVE CLI also supports the Hardhat chain. You can start a Hardhat chain by running the command `dive chain hardhat`. + diff --git a/dive/pages/quickstart/chains/setting-up-an-hardhat-node.mdx b/dive/pages/quickstart/chains/setting-up-an-hardhat-node.mdx new file mode 100644 index 0000000..007783b --- /dev/null +++ b/dive/pages/quickstart/chains/setting-up-an-hardhat-node.mdx @@ -0,0 +1,64 @@ +--- +title: "Setting Up a Hardhat Node" +--- + +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' + +# Setting up a Hardhat Node + +In this guide, you will learn how to set up a Hardhat node using DIVE CLI. This process allows you to interact with the Ethereum blockchain on your local environment using the Hardhat development environment. Follow these steps to get started: + +## Step 1: Ensure Kurtosis Engine is Running + +Starting a Hardhat chain with DIVE CLI is a straightforward process. Before you proceed, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: + +```bash filename="" copy +kurtosis engine start +``` + +## Step 2: Start Hardhat Chain + +To start a single Hardhat node, execute the following command: + +```bash filename="" copy +dive chain hardhat +``` + +Executing this command will generate a 'services.json' file in the working directory, which contains service details for the 'hardhat' chain. + +
+ +services.json + + +```json filename="" copy +{ + "hardhat-node":{ + "service_name":"hardhat-node", + "endpoint_public":"http://127.0.0.1:8545", + "endpoint":"http://172.16.0.4:8545", + "keypassword":"hardhat", + "keystore_path":"keystores/hardhat_keystore.json", + "network":"0x539.hardhat", + "network_name":"hardhat", + "nid":"0x539" + } +} +``` + +- **service_name:** The name of the service. +- **endpoint_public:** The public endpoint URL for interacting with the service. +- **endpoint:** The private endpoint. +- **keypassword:** The password used for accessing the service's keystore. +- **keystore_path:** The file path for the service's keystore. +- **network:** The network ID. +- **network_name:** The name of the network. +- **nid:** The unique identifier for the network. + +
+ +## Step 3: Setup is Completed + +After running the command, DIVE CLI will automatically start the Hardhat node and handle the necessary initialization processes. Please wait for the Hardhat node to fully initialize, which may take a few moments. + +Once the initialization is complete, you can interact with the local Hardhat chain as needed. DIVE CLI sets up the Hardhat node on your local environment, enabling you to deploy and test smart contracts, explore transactions, and experiment with various Ethereum blockchain features using the Hardhat development environment. diff --git a/dive/pages/quickstart/setting-up-an-icon-node.mdx b/dive/pages/quickstart/chains/setting-up-an-icon-node.mdx similarity index 73% rename from dive/pages/quickstart/setting-up-an-icon-node.mdx rename to dive/pages/quickstart/chains/setting-up-an-icon-node.mdx index 1fb809a..6a505c9 100644 --- a/dive/pages/quickstart/setting-up-an-icon-node.mdx +++ b/dive/pages/quickstart/chains/setting-up-an-icon-node.mdx @@ -2,8 +2,7 @@ title: "Setting Up an ICON Node" --- -import { Callout } from '../../node_modules/nextra/dist/components/callout.js' - +import { Callout } from '../../../node_modules/nextra/dist/components/callout.js' # Setting up an ICON Node @@ -11,28 +10,28 @@ In this guide, you'll learn how to set up an ICON node using DIVE CLI. This proc ## Step 1: Ensure Kurtosis Engine is Running -Before you proceed, make sure the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: +Before you proceed, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: -```filename="" copy +```bash kurtosis engine start ``` -## Step 2: Start Icon Chain +## Step 2: Start ICON Chain To start a single ICON node, execute the following command: -```filename="" copy +```bash dive chain icon ``` -Executing above command will generate 'services.json,' in working directory which contains service details for the 'icon' chain. +Executing the above command will generate a 'services.json' file in the working directory, which contains service details for the 'icon' chain.
services.json -```filename="" copy +```json { "service_name": "icon-node-0", "endpoint_public": "http://127.0.0.1:8090/api/v3/icon_dex", @@ -44,13 +43,14 @@ services.json "nid": "0x3" } ``` -* service_name: The name of the service. -* endpoint_public: The public endpoint URL for interacting with the service. -* keypassword: The password used for accessing the service's keystore." -* keystore_path: The file path for the service's keystore. -* network: The network ID. -* network_name: The name of the network. -* nid: The unique identifier id for the network. + +- **service_name:** The name of the service. +- **endpoint_public:** The public endpoint URL for interacting with the service. +- **keypassword:** The password used for accessing the service's keystore. +- **keystore_path:** The file path for the service's keystore. +- **network:** The network ID. +- **network_name:** The name of the network. +- **nid:** The unique identifier for the network.
@@ -68,8 +68,8 @@ DIVE CLI allows you to start a single ICON chain with custom configurations, inc To start the ICON chain with custom configurations, use the following command: -```filename="" copy -dive chain icon --config 'path to config.json' --genesis 'path to genesis file' --id 'custom chain id' +```bash +dive chain icon --config 'path to config.json' --genesis 'path to genesis file' ``` **Parameters Explanation:** @@ -81,32 +81,32 @@ dive chain icon --config 'path to config.json' --genesis 'path to genesis file' Example of config -```filename="" copy +```json { -"id": "0", -"private_port": 9080, -"public_port": 8090, -"p2p_listen_address": "7080", -"p2p_address": "8080", -"cid": "0xacbc4e" + "id": "0", + "private_port": 9080, + "public_port": 8090, + "p2p_listen_address": "7080", + "p2p_address": "8080", + "cid": "0xacbc4e" } ``` + - `--genesis`: Provide the path to your custom genesis file using the `--genesis` flag. The genesis file contains the initial state and configurations for the ICON blockchain. -- `--id`: Assign a custom chain ID for your ICON chain using the `--id` flag. This ID is used to uniquely identify your custom chain. - *Tip:* If you want to start your icon chain for BTP support, you can also decentralize by adding the `--decentralisation` flag. + *Tip:* If you want to start your ICON chain for BTP support, you can also decentralize it by adding the `--decentralisation` flag. -### Decentralize Already Running ICON Chain for BTP Support +### Decentralize an Already Running ICON Chain for BTP Support DIVE CLI provides the capability to decentralize an already running ICON chain, preparing it for BTP (Blockchain Transfer Protocol) support. Follow these steps to decentralize your existing ICON chain using DIVE CLI: To decentralize your existing ICON chain for BTP support, use the following command: -```filename="" copy +```bash dive chain icon decentralize --keyPassword 'keypassword' --keystorePath 'path to keystore file' --nid 'network ID' --nodeEndpoint 'Endpoint address' --serviceName 'container name' ``` @@ -122,4 +122,4 @@ dive chain icon decentralize --keyPassword 'keypassword' --keystorePath 'path to After executing the command, DIVE CLI will initiate the decentralization process for your existing ICON chain. Please be patient as this process may take some time, depending on the size of your blockchain and network. -Ready to dive into ICON blockchain exploration and innovation? Let's get started! +Ready to dive into ICON blockchain exploration and innovation? Let's get started! \ No newline at end of file diff --git a/dive/pages/quickstart/setting-up-a-neutron-node.mdx b/dive/pages/quickstart/setting-up-a-neutron-node.mdx deleted file mode 100644 index 4d9cba0..0000000 --- a/dive/pages/quickstart/setting-up-a-neutron-node.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "Setting Up a NEUTRON Node" ---- - - -import { Callout } from '../../node_modules/nextra/dist/components/callout.js' - -# Setting up a NEUTRON Node - -In this guide, you'll learn how to set up a Neutron node using DIVE CLI. This process enables you to interact with the cosmos blockchain on your local environment. Follow these steps to get started: - -## Step 1: Ensure Kurtosis Engine is Running - -Starting a Neutron chain with DIVE CLI is a straightforward process. Before you proceed, make sure the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: - -```filename="" copy -kurtosis engine start -``` -## Step 2: Start Neutron Chain - -To start a neutron node, run the following command: - -```filename="" copy -dive chain neutron -``` -Executing this command will generate 'services.json,' in working directory which contains service details for the 'neutron' chain. - -
- -services.json - - -```filename="" copy -{ - "service_name": "neutron-node"", - "endpoint_public": "http://127.0.0.1:26657", - "endpoint": "http://172.16.0.3:26657" -} -``` -* service_name: The name of the service. -* endpoint_public: The public endpoint URL for interacting with the service. -* endpoint: The endpoint for interactiong with the service. -
- - -## Step 3: Setup is completed - -After running the command, DIVE CLI will automatically start the NEUTRON node and handle the necessary initialization processes. Please wait for the NEUTRON node to fully initialize, which may take a few moments. -Once the initialization is complete, you can interact with the local NEUTRON chain as needed. DIVE CLI sets up the NEUTRON node on your local environment, enabling you to deploy and test smart contracts, explore transactions, and experiment with various ICON blockchain features. diff --git a/dive/pages/quickstart/setting-up-an-archway-node.mdx b/dive/pages/quickstart/setting-up-an-archway-node.mdx deleted file mode 100644 index d3a603a..0000000 --- a/dive/pages/quickstart/setting-up-an-archway-node.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "Setting Up an ARCHWAY Node" ---- - - -import { Callout } from '../../node_modules/nextra/dist/components/callout.js' - -# Setting up an ARCHWAY Node - -In this guide, you'll learn how to set up an Archway node using DIVE CLI. This process enables you to interact with the Cosmos blockchain on your local environment. Follow these steps to get started: - -## Step 1: Ensure Kurtosis Engine is Running - -Starting a cosmos chain with DIVE CLI is a straightforward process. Before you proceed, make sure the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: - -```filename="" copy -kurtosis engine start -``` -## Step 2: Start Archway Chain - -To start an archway node, run the following command: - -```filename="" copy -dive chain archway -``` -Executing this command will generate 'services.json,' in working directory which contains service details for the 'archway' chain. - -
- -services.json - - -```filename="" copy -{ - "service_name": "node-service-constantine-3", - "endpoint_public": "http://127.0.0.1:4564", - "endpoint": "http://172.16.0.3:26657", - "keypassword": "password", - "chain_id": "constantine-3", - "chain_key": "constantine-3-key" -} -``` -* service_name: The name of the service. -* endpoint_public: The public endpoint URL for interacting with the service. -* endpoint: The endpoint for interactiong with the service. -* keypassword: The password used for accessing the service. -* chain_id: The chain name. -* chain_key: The chain's key name. -
- - -## Step 3: Setup is completed - -After running the command, DIVE CLI will automatically start the ARCHWAY node and handle the necessary initialization processes. Please wait for the ARCHWAY node to fully initialize, which may take a few moments. -Once the initialization is complete, you can interact with the local Archway node as needed. DIVE CLI sets up the ARCHWAY node on your local environment, enabling you to deploy and test smart contracts, explore transactions, and experiment with various ICON blockchain features. diff --git a/dive/pages/quickstart/setting-up-an-eth-node.mdx b/dive/pages/quickstart/setting-up-an-eth-node.mdx deleted file mode 100644 index 6ce732e..0000000 --- a/dive/pages/quickstart/setting-up-an-eth-node.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "Setting Up an ETH Node" ---- - - -import { Callout } from '../../node_modules/nextra/dist/components/callout.js' - -# Setting up an ETH Node - -In this guide, you'll learn how to set up an Ethereum node using DIVE CLI. This process enables you to interact with the Ethereum blockchain on your local environment. Follow these steps to get started: - -## Step 1: Ensure Kurtosis Engine is Running - -Starting an Ethereum chain with DIVE CLI is a straightforward process. Before you proceed, make sure the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: - -```filename="" copy -kurtosis engine start -``` -## Step 2: Start Eth Chain - -To start an single eth node, run the following command: - -```filename="" copy -dive chain eth -``` -Executing this command will generate 'services.json,' in working directory which contains service details for the 'eth' chain. - -
- -services.json - - -```filename="" copy -{ - "service_name": "el-1-geth-lighthouse", - "endpoint_public": "http://172.16.0.3:8544", - "endpoint": "http://172.16.0.5:8545", - "keypassword": "password", - "keystore_path": "keystores/eth_keystore.json", - "network": "0x301824.eth", - "network_name": "eth", - "nid": "0x301824" -} -``` -* service_name: The name of the service. -* endpoint_public: The public endpoint URL for interacting with the service. -* endpoint: The private endpoint. -* keypassword: The password used for accessing the service's keystore. -* keystore_path: The file path for the service's keystore. -* network: The network ID. -* network_name: The name of the network. -* nid: The unique identifier id for the network. - -
- - -## Step 3: Setup is completed - -After running the command, DIVE CLI will automatically start the ETH node and handle the necessary initialization processes. Please wait for the ETH node to fully initialize, which may take a few moments. -Once the initialization is complete, you can interact with the local ETH chain as needed. DIVE CLI sets up the ETH node on your local environment, enabling you to deploy and test smart contracts, explore transactions, and experiment with various ICON blockchain features. - - - - *Tip:* DIVE cli also supports hardhat chain. You can start an hardhat chain by running the command - dive chain hardhat - \ No newline at end of file diff --git a/dive/pages/quickstart/setting-up-cross-chain-connection1.mdx b/dive/pages/quickstart/setting-up-cross-chain-connection1.mdx deleted file mode 100644 index feb494a..0000000 --- a/dive/pages/quickstart/setting-up-cross-chain-connection1.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Setting up Cross Chain Connection (ICON-ARCHWAY) using IBC Bridge ---- - -import { Callout } from '../../node_modules/nextra/dist/components/callout.js' - - -# Setting up Cross Chain Connection (ICON-ARCHWAY) using IBC Bridge - -Follow these steps to establish a cross-chain connection between ICON and Archway using the IBC Bridge: - -## Step 1: Ensure Kurtosis Engine is Running - -Before proceeding, ensure that the Kurtosis Engine is running in the background. If it's not already running, start it with the following command: - -```filename="" copy -kurtosis engine start -``` - -## Step 2: Start Two Chains (ICON and Archway) with IBC Bridge - -To start both the ICON and Archway chains and establish a IBC bridge between them, run the following command: - -```filename="" copy -dive bridge ibc --chainA icon --chainB archway -``` - -Executing above command will generate 'services.json' in working directory which contains service details for the 'icon' and 'archway' chains. - -
- -services.json - -{/* -```filename="" copy -{ - "bridge": "false", - "chains": { - "eth": { - "block_number": "30", - "endpoint": "http://172.16.0.6:8545", - "endpoint_public": "http://172.16.0.3:8544", - "keypassword": "password", - "keystore_path": "keystores/eth_keystore.json", - "network": "0x301824.eth", - "network_name": "eth", - "nid": "0x301824", - "service_name": "el-1-geth-lighthouse" - }, - "icon": { - "block_number": "242", - "endpoint": "http://172.16.0.2:9080/api/v3/icon_dex", - "endpoint_public": "http://127.0.0.1:8090/api/v3/icon_dex", - "keypassword": "gochain", - "keystore_path": "keystores/keystore.json", - "network": "0x3.icon", - "networkId": "0x1", - "networkTypeId": "0x1", - "network_name": "icon-0", - "nid": "0x3", - "service_name": "icon-node-0" - } - }, - "contracts": { - "eth": { - "bmc": "0xB9D7a3554F221B34f49d7d3C61375E603aFb699e", - "bmcm": "0xAb2A01BC351770D09611Ac80f1DE076D56E0487d", - "bmcs": "0xBFF5cD0aA560e1d1C6B1E2C347860aDAe1bd8235", - "bmv": "0x765E6b67C589A4b40184AEd9D9ae7ba40E32F8d4", - "dapp": "0x9bE03fF3E1888A216f9e48c68B587A89c5b94CD6", - "xcall": "0x5911A6541729C227fAda7D5187ee7518B47fB237" - }, - "icon": { - "bmc": "cx14303a14cbfd58b9bcd61b62b786b387f39be25a", - "bmv": "cx71337318cf13aa3fd805c75a38f4d5f800cd627c", - "dapp": "cx90bc909409ff8ba200b5a866e1bb952c39fa1f4a", - "xcall": "cx5dce8a39a49faadee03a02e6b33173aef91d4e67" - } - }, - "links": { - "dst": "eth", - "src": "icon" - } -} -``` */} -
- -The above command automates several essential tasks to configure and initialise the local environment: - -- **Spinning up ICON and Archway Nodes:** DIVE automatically starts and configures the required ICON and Archway nodes for your local environment. - -- **Installing Required npm Dependencies:** DIVE takes care of installing all the necessary npm dependencies for seamless operation. - -- **Enabling IBC Block on ICON Local Network:** DIVE facilitates IBC block functionality on the ICON local network by registering the node as a P-Rep and decentralizing the network. - -- **Deploying Contracts for IBC:** DIVE automatically builds and deploys essential smart contracts (ibc_core,light_client,xCall_ibc_connection,xCall & sample dApp) for IBC functionality on both ICON and Archway chains. - -- **Starting the Relay:** The relay image is built and launched, actively monitoring both ICON and Archway chains to enable smooth message transfer between them. - - -## Step 3: Setup is completed -Once the process completes, your local environment with the ICON and Archway chains connected via the IBC bridge will be ready for testing and development. - -DIVE CLI simplifies the entire setup, allowing you to focus on developing and testing your decentralized applications with ease. Happy developing \ No newline at end of file From beec7d9ccd70dacf8ece974ed6d04ef54c3413dd Mon Sep 17 00:00:00 2001 From: abhiyana Date: Thu, 5 Oct 2023 16:29:17 +0530 Subject: [PATCH 2/3] docs: change in service.config in setup neutron node page --- dive/pages/list-of-cli-command.mdx | 2 +- .../quickstart/chains/setting-up-a-neutron-node.mdx | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dive/pages/list-of-cli-command.mdx b/dive/pages/list-of-cli-command.mdx index 57abfc3..d181c87 100644 --- a/dive/pages/list-of-cli-command.mdx +++ b/dive/pages/list-of-cli-command.mdx @@ -137,7 +137,7 @@ dive chain icon [command] ### dive chain icon decentralize #### Description -Decentralise Icon Node is necessary if you want to connect your local icon node to BTP network +A Decentralise Icon Node is necessary if you want to connect your local icon node to BTP network #### Usage diff --git a/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx b/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx index e74d376..e300d7e 100644 --- a/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx +++ b/dive/pages/quickstart/chains/setting-up-a-neutron-node.mdx @@ -33,9 +33,13 @@ services.json ```json filename="" copy { - "service_name": "neutron-node", - "endpoint_public": "http://127.0.0.1:26657", - "endpoint": "http://172.16.0.3:26657" + "neutron-node-test-chain1":{ + "service_name":"neutron-node-test-chain1", + "endpoint_public":"http://127.0.0.1:26669", + "endpoint":"http://172.16.0.4:26657", + "chain_id":"test-chain1", + "chain_key":"test-key" + } } ``` From 5a2528bbc2dde6e0236331dc0599b41c706f0373 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Fri, 6 Oct 2023 11:05:14 +0530 Subject: [PATCH 3/3] docs: add dive installation steps in quickstart page --- dive/pages/quickstart.mdx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dive/pages/quickstart.mdx b/dive/pages/quickstart.mdx index 9f73dd0..a0003bb 100644 --- a/dive/pages/quickstart.mdx +++ b/dive/pages/quickstart.mdx @@ -15,4 +15,30 @@ Before you begin with DIVE CLI, make sure you have the following prerequisites i These prerequisites are essential to ensure a smooth setup and usage of DIVE CLI. +## Installing Dive CLI + +### Install on MacOS + +```bash filename="" copy +brew install hugobyte/tap/dive-cli +``` + +### Install on Linux + +```bash filename="" copy +curl -L https://github.com/HugoByte/DIVE/releases/download/{latest-version}/dive-cli_{latest-version}_linux_{arch}.tar.gz +tar -xvzf dive-cli_{latest-version}_linux_{arch}.tar.gz +mv dive /usr/local/bin +rm dive-cli_{latest-version}_linux_{arch}.tar.gz +``` + +### Install on Windows + +```powershell filename="" copy +Invoke-WebRequest -Uri "https://github.com/HugoByte/DIVE/releases/download/{latest-version}/dive-cli_{latest-version}_windows_{arch}.tar.gz" -OutFile dive.tar.gz +tar -xvzf dive.tar.gz +dive.exe +``` +Replace `{latest-version}` and `{arch}` with the appropriate values for the latest version and the architecture you want to support. + Ready to dive in? Let's get started with the installation and setup process.