Remove use of L2 chain & contracts for running nitro nodes with playbook #9
@ -18,10 +18,7 @@ The following commands have to be executed in the [`nitro-bridge-setup`](./) dir
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# L1 WS endpoint
|
# L1 WS endpoint
|
||||||
nitro_l1_chain_url: ""
|
nitro_chain_url: ""
|
||||||
|
|
||||||
# L2 WS endpoint
|
|
||||||
nitro_l2_chain_url: ""
|
|
||||||
|
|
||||||
# Private key for the bridge's nitro address
|
# Private key for the bridge's nitro address
|
||||||
nitro_sc_pk: ""
|
nitro_sc_pk: ""
|
||||||
@ -30,12 +27,6 @@ The following commands have to be executed in the [`nitro-bridge-setup`](./) dir
|
|||||||
# This account should have tokens for funding Nitro channels
|
# This account should have tokens for funding Nitro channels
|
||||||
nitro_chain_pk: ""
|
nitro_chain_pk: ""
|
||||||
|
|
||||||
# L2 chain ID
|
|
||||||
optimism_chain_id: ""
|
|
||||||
|
|
||||||
# L2 RPC endpoint
|
|
||||||
optimism_url: ""
|
|
||||||
|
|
||||||
# Custom L2 token to be deployed
|
# Custom L2 token to be deployed
|
||||||
token_name: "LaconicNetworkToken"
|
token_name: "LaconicNetworkToken"
|
||||||
token_symbol: "LNT"
|
token_symbol: "LNT"
|
||||||
@ -45,9 +36,6 @@ The following commands have to be executed in the [`nitro-bridge-setup`](./) dir
|
|||||||
na_address: ""
|
na_address: ""
|
||||||
vpa_address: ""
|
vpa_address: ""
|
||||||
ca_address: ""
|
ca_address: ""
|
||||||
|
|
||||||
# Address of deployed custom L1 token
|
|
||||||
l1_asset_address: ""
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run Nitro Bridge
|
## Run Nitro Bridge
|
||||||
@ -128,13 +116,3 @@ To run the playbook on a remote host:
|
|||||||
# Check the bridge deployment logs, ensure that the node is running
|
# Check the bridge deployment logs, ensure that the node is running
|
||||||
laconic-so deployment --dir bridge-deployment logs nitro-bridge -f
|
laconic-so deployment --dir bridge-deployment logs nitro-bridge -f
|
||||||
```
|
```
|
||||||
|
|
||||||
## Get Contract Addresses
|
|
||||||
|
|
||||||
- Run the following commands in the directory where the deployments are created:
|
|
||||||
|
|
||||||
- Get addresses of L2 nitro contracts:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
laconic-so deployment --dir bridge-deployment exec nitro-bridge "cat /app/deployment/nitro-addresses.json"
|
|
||||||
```
|
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
nitro_l1_chain_url: ""
|
nitro_chain_url: ""
|
||||||
nitro_l2_chain_url: ""
|
|
||||||
nitro_chain_pk: ""
|
nitro_chain_pk: ""
|
||||||
nitro_sc_pk: ""
|
nitro_sc_pk: ""
|
||||||
optimism_chain_id: ""
|
|
||||||
optimism_url: ""
|
|
||||||
token_name: "LaconicNetworkToken"
|
|
||||||
token_symbol: "LNT"
|
|
||||||
initial_token_supply: "129600"
|
|
||||||
na_address: ""
|
na_address: ""
|
||||||
vpa_address: ""
|
vpa_address: ""
|
||||||
ca_address: ""
|
ca_address: ""
|
||||||
l1_asset_address: ""
|
|
||||||
|
@ -63,17 +63,3 @@
|
|||||||
command: laconic-so deployment --dir bridge-deployment start
|
command: laconic-so deployment --dir bridge-deployment start
|
||||||
args:
|
args:
|
||||||
chdir: "{{ nitro_directory }}"
|
chdir: "{{ nitro_directory }}"
|
||||||
|
|
||||||
- name: Wait for nitro-addresses.json to be created
|
|
||||||
wait_for:
|
|
||||||
path: "{{ nitro_directory }}/bridge-deployment/data/nitro_deployment/nitro-addresses.json"
|
|
||||||
state: present
|
|
||||||
timeout: 180
|
|
||||||
|
|
||||||
- name: Print BRIDGE_ADDRESS
|
|
||||||
shell: laconic-so deployment --dir bridge-deployment exec nitro-bridge "jq -r '.\"{{ optimism_chain_id }}\"[0].contracts.Bridge.address' /app/deployment/nitro-addresses.json"
|
|
||||||
args:
|
|
||||||
chdir: "{{ nitro_directory }}"
|
|
||||||
register: bridge_address
|
|
||||||
- debug:
|
|
||||||
msg: "BRIDGE_ADDRESS: {{ bridge_address.stdout }}"
|
|
||||||
|
@ -1,20 +1,12 @@
|
|||||||
stack: /home/{{ ansible_user }}/cerc/nitro-stack/stack-orchestrator/stacks/bridge
|
stack: /home/{{ ansible_user }}/cerc/nitro-stack/stack-orchestrator/stacks/bridge
|
||||||
deploy-to: compose
|
deploy-to: compose
|
||||||
config:
|
config:
|
||||||
NITRO_L1_CHAIN_URL: {{ nitro_l1_chain_url }}
|
NITRO_CHAIN_URL: {{ nitro_chain_url }}
|
||||||
NITRO_L2_CHAIN_URL: {{ nitro_l2_chain_url }}
|
|
||||||
NITRO_CHAIN_PK: {{ nitro_chain_pk }}
|
NITRO_CHAIN_PK: {{ nitro_chain_pk }}
|
||||||
NITRO_SC_PK: {{ nitro_sc_pk }}
|
NITRO_SC_PK: {{ nitro_sc_pk }}
|
||||||
OPTIMISM_CHAIN_ID: {{ optimism_chain_id }}
|
|
||||||
OPTIMISM_URL: {{ optimism_url }}
|
|
||||||
OPTIMISM_DEPLOYER_PK: {{ nitro_chain_pk }}
|
|
||||||
TOKEN_NAME: {{ token_name }}
|
|
||||||
TOKEN_SYMBOL: {{ token_symbol }}
|
|
||||||
INITIAL_TOKEN_SUPPLY: {{ initial_token_supply }}
|
|
||||||
NA_ADDRESS: "{{ na_address }}"
|
NA_ADDRESS: "{{ na_address }}"
|
||||||
VPA_ADDRESS: "{{ vpa_address }}"
|
VPA_ADDRESS: "{{ vpa_address }}"
|
||||||
CA_ADDRESS: "{{ ca_address }}"
|
CA_ADDRESS: "{{ ca_address }}"
|
||||||
L1_ASSET_ADDRESS: "{{ l1_asset_address }}"
|
|
||||||
network:
|
network:
|
||||||
ports:
|
ports:
|
||||||
nitro-bridge:
|
nitro-bridge:
|
||||||
|
@ -93,10 +93,10 @@
|
|||||||
- debug:
|
- debug:
|
||||||
msg: "VPA_ADDRESS: {{ vpa_address.stdout }}"
|
msg: "VPA_ADDRESS: {{ vpa_address.stdout }}"
|
||||||
|
|
||||||
- name: Export L1_ASSET_ADDRESS
|
- name: Export ASSET_ADDRESS
|
||||||
shell: laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"{{ geth_chain_id }}\"[0].contracts.Token.address' /app/deployment/nitro-addresses.json"
|
shell: laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"{{ geth_chain_id }}\"[0].contracts.Token.address' /app/deployment/nitro-addresses.json"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ nitro_directory }}"
|
chdir: "{{ nitro_directory }}"
|
||||||
register: l1_asset_address
|
register: asset_address
|
||||||
- debug:
|
- debug:
|
||||||
msg: "L1_ASSET_ADDRESS: {{ l1_asset_address.stdout }}"
|
msg: "ASSET_ADDRESS: {{ asset_address.stdout }}"
|
||||||
|
@ -26,10 +26,7 @@ The following commands have to be executed in [`nitro-nodes-setup`](./) director
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# L1 WS endpoint
|
# L1 WS endpoint
|
||||||
nitro_l1_chain_url: ""
|
nitro_chain_url: ""
|
||||||
|
|
||||||
# L2 WS endpoint
|
|
||||||
nitro_l2_chain_url: ""
|
|
||||||
|
|
||||||
# Private key for your nitro address
|
# Private key for your nitro address
|
||||||
nitro_sc_pk: ""
|
nitro_sc_pk: ""
|
||||||
@ -46,9 +43,6 @@ The following commands have to be executed in [`nitro-nodes-setup`](./) director
|
|||||||
# Contract address of ConsensusApp
|
# Contract address of ConsensusApp
|
||||||
ca_address: ""
|
ca_address: ""
|
||||||
|
|
||||||
# Address of the bridge node
|
|
||||||
bridge_contract_address: ""
|
|
||||||
|
|
||||||
# Multiaddr of the L1 bridge node
|
# Multiaddr of the L1 bridge node
|
||||||
nitro_l1_bridge_multiaddr: ""
|
nitro_l1_bridge_multiaddr: ""
|
||||||
|
|
||||||
@ -79,7 +73,7 @@ The following commands have to be executed in [`nitro-nodes-setup`](./) director
|
|||||||
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
|
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-nodes.yml --extra-vars='{ "target_host": "nitro_host", "skip_container_build": true }' --user $USER -kK
|
LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-nodes.yml --extra-vars='{ "target_host": "localhost", "skip_container_build": true }' --user $USER -kK
|
||||||
```
|
```
|
||||||
|
|
||||||
### On Remote Host
|
### On Remote Host
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
nitro_l1_chain_url: ""
|
nitro_chain_url: ""
|
||||||
nitro_l2_chain_url: ""
|
|
||||||
nitro_sc_pk: ""
|
nitro_sc_pk: ""
|
||||||
nitro_chain_pk: ""
|
nitro_chain_pk: ""
|
||||||
na_address: ""
|
na_address: ""
|
||||||
vpa_address: ""
|
vpa_address: ""
|
||||||
ca_address: ""
|
ca_address: ""
|
||||||
bridge_contract_address: ""
|
|
||||||
nitro_l1_bridge_multiaddr: ""
|
nitro_l1_bridge_multiaddr: ""
|
||||||
nitro_l2_bridge_multiaddr: ""
|
nitro_l2_bridge_multiaddr: ""
|
||||||
nitro_l1_ext_multiaddr: ""
|
nitro_l1_ext_multiaddr: ""
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
NITRO_CHAIN_URL={{ nitro_l1_chain_url }}
|
NITRO_CHAIN_URL={{ nitro_chain_url }}
|
||||||
NITRO_SC_PK={{ nitro_sc_pk }}
|
NITRO_SC_PK={{ nitro_sc_pk }}
|
||||||
NITRO_CHAIN_PK={{ nitro_chain_pk }}
|
NITRO_CHAIN_PK={{ nitro_chain_pk }}
|
||||||
NA_ADDRESS="{{ na_address }}"
|
NA_ADDRESS="{{ na_address }}"
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
NITRO_CHAIN_URL={{ nitro_l2_chain_url }}
|
|
||||||
NITRO_SC_PK={{ nitro_sc_pk }}
|
NITRO_SC_PK={{ nitro_sc_pk }}
|
||||||
NITRO_CHAIN_PK={{ nitro_chain_pk }}
|
|
||||||
NA_ADDRESS="{{ na_address }}"
|
|
||||||
VPA_ADDRESS="{{ vpa_address }}"
|
VPA_ADDRESS="{{ vpa_address }}"
|
||||||
CA_ADDRESS="{{ ca_address }}"
|
CA_ADDRESS="{{ ca_address }}"
|
||||||
BRIDGE_ADDRESS="{{ bridge_contract_address }}"
|
|
||||||
NITRO_BOOTPEERS={{ nitro_l2_bridge_multiaddr }}
|
NITRO_BOOTPEERS={{ nitro_l2_bridge_multiaddr }}
|
||||||
NITRO_EXT_MULTIADDR={{ nitro_l2_ext_multiaddr }}
|
NITRO_EXT_MULTIADDR={{ nitro_l2_ext_multiaddr }}
|
||||||
NITRO_L2=true
|
NITRO_L2=true
|
||||||
|
Loading…
Reference in New Issue
Block a user