Add instructions for running a testnet Nitro node

This commit is contained in:
prathamesh committed 2024-09-03 14:57:22 +05:30
1 parent aa656e828d
commit 21bafbfd4b
3 files changed
+106 -88

No files matched your search

+5 -3
View File
@@ -37,7 +37,9 @@
### Prerequisites
* Ansible: see [installation](https://git.vdb.to/cerc-io/ops#installation)
* laconic-so: see [installation](https://git.vdb.to/cerc-io/stack-orchestrator#install)
* Ansible: see [installation](https://git.vdb.to/cerc-io/testnet-ops#installation)
### Setup
@@ -89,13 +91,13 @@
* Setup and run L2 by executing the `run-optimism.yml` Ansible playbook:
```bash
LANG=en_IN.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
```
* For skipping container build, run with `"skip_container_build" : true`:
```bash
LANG=en_IN.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{"target_host" : "localhost", "skip_container_build": true}' -kK --user $USER
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{"target_host" : "localhost", "skip_container_build": true}' -kK --user $USER
```
</details>
-85
View File
@@ -1,85 +0,0 @@
# Run nitro-nodes
## Setup
- Follow the [installation guide](https://github.com/deep-stack/ops/blob/ag-run-l2/README.md#installation) to setup ansible on your machine
- Ensure laconic-so is installed
```bash
laconic-so version
```
- Clone the ops repo
```bash
git clone git@github.com:deep-stack/ops.git
cd ops
git checkout ag-run-l2
```
## Run l1, l2 nitro nodes
- Navigate to the `vulcanize/nitro-node-setup` directory
```bash
cd vulcanize/nitro-node-setup
```
- Copy the `nitro-vars-example.yml` vars file
```bash
cp nitro-vars-example.yml nitro-vars.yml
```
<!-- TODO: Provide nitro environment variables to user -->
- Edit [`nitro-vars.yml`](./nitro-vars.yml) and fill in the following values
```bash
# URL endpoint of the L1 chain
l1_nitro_chain_url: ""
# URL endpoint of the L2 chain
l2_nitro_chain_url: ""
# Private key for your nitro address
nitro_sc_pk: ""
# Private key of the account on chain that is used for funding channels in Nitro node
nitro_chain_pk: ""
# Contract address of NitroAdjudicator
na_address: ""
# Contract address of VirtualPaymentApp
vpa_address: ""
# Contract address of ConsensusApp
ca_address: ""
# Contract address of bridge
bridge_address: ""
# IP address of the bridge node
nitro_bridge_ip: ""
# Publically accessible IP address of your nitro node
nitro_node_ip: ""
```
- To run nitro nodes, execute the `run-nitro-node.yml` Ansible playbook by running the following command.
NOTE: By default, deployments are created in the `nitro-node-setup/out` directory. If you need to change this location, you can update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file.
```bash
LANG=en_IN.utf8 ansible-playbook -i localhost, --connection=local run-nitro-node.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
```
- If you want to skip building the containers, set `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash
LANG=en_IN.utf8 ansible-playbook -i localhost, --connection=local run-nitro-node.yml --extra-vars='{ "target_host": "localhost", "skip_container_build": true }' --user $USER
```
- Follow steps from [Demo](https://git.vdb.to/cerc-io/nitro-stack/src/branch/main/nitro-bridge-demo.md#demo) to create mirror channels on L2, create virtual channel and make payments