Add instructions to setup and run testnet L2 and Nitro deployments #26
@ -230,6 +230,8 @@
|
|||||||
export CA_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.ConsensusApp.address' /app/deployment/nitro-addresses.json")
|
export CA_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.ConsensusApp.address' /app/deployment/nitro-addresses.json")
|
||||||
export VPA_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.VirtualPaymentApp.address' /app/deployment/nitro-addresses.json")
|
export VPA_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.VirtualPaymentApp.address' /app/deployment/nitro-addresses.json")
|
||||||
|
|
||||||
|
export L1_ASSET_ADDRESS=$(laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq -r '.\"$GETH_CHAIN_ID\"[0].contracts.Token.address' /app/deployment/nitro-addresses.json")
|
||||||
|
|
||||||
export BRIDGE_CONTRACT_ADDRESS=$(laconic-so deployment --dir bridge-deployment exec nitro-bridge "jq -r '.\"$OPTIMISM_CHAIN_ID\"[0].contracts.Bridge.address' /app/deployment/nitro-addresses.json")
|
export BRIDGE_CONTRACT_ADDRESS=$(laconic-so deployment --dir bridge-deployment exec nitro-bridge "jq -r '.\"$OPTIMISM_CHAIN_ID\"[0].contracts.Bridge.address' /app/deployment/nitro-addresses.json")
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
@ -246,6 +248,7 @@
|
|||||||
na_address: "$NA_ADDRESS"
|
na_address: "$NA_ADDRESS"
|
||||||
ca_address: "$CA_ADDRESS"
|
ca_address: "$CA_ADDRESS"
|
||||||
vpa_address: "$VPA_ADDRESS"
|
vpa_address: "$VPA_ADDRESS"
|
||||||
|
l1_asset_address: "${L1_ASSET_ADDRESS}"
|
||||||
bridge_contract_address: "$BRIDGE_CONTRACT_ADDRESS"
|
bridge_contract_address: "$BRIDGE_CONTRACT_ADDRESS"
|
||||||
bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS"
|
bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS"
|
||||||
nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR"
|
nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR"
|
||||||
|
@ -178,8 +178,8 @@
|
|||||||
# AssetAddress: '<l1-asset-address>',
|
# AssetAddress: '<l1-asset-address>',
|
||||||
# Me: '<your-nitro-address>',
|
# Me: '<your-nitro-address>',
|
||||||
# Them: '<bridge-nitro-address>',
|
# Them: '<bridge-nitro-address>',
|
||||||
# MyBalance: 1000000n,
|
# MyBalance: <ledger-amount>n,
|
||||||
# TheirBalance: 1000000n
|
# TheirBalance: <ledger-amount>n
|
||||||
# },
|
# },
|
||||||
# ChannelMode: 'Open'
|
# ChannelMode: 'Open'
|
||||||
# }
|
# }
|
||||||
@ -191,18 +191,20 @@
|
|||||||
laconic-so deployment --dir l2-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4005 -h nitro-node"
|
laconic-so deployment --dir l2-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4005 -h nitro-node"
|
||||||
|
|
||||||
# Expected output:
|
# Expected output:
|
||||||
# {
|
# [
|
||||||
# ID: '0x6a9f5ccf1fa802525d794f4a899897f947615f6acc7141e61e056a8bfca29179',
|
# {
|
||||||
# Status: 'Open',
|
# "ID": "0x6a9f5ccf1fa802525d794f4a899897f947615f6acc7141e61e056a8bfca29179",
|
||||||
# Balance: {
|
# "Status": "Open",
|
||||||
# AssetAddress: '<l2-asset-address>',
|
# "Balance": {
|
||||||
# Me: '<your-nitro-address>',
|
# "AssetAddress": "<l2-asset-address>",
|
||||||
# Them: '<bridge-nitro-address>',
|
# "Me": "<your-nitro-address>",
|
||||||
# MyBalance: 1000000n,
|
# "Them": "<bridge-nitro-address>",
|
||||||
# TheirBalance: 1000000n
|
# "MyBalance": <ledger-amount>n,
|
||||||
# },
|
# "TheirBalance": <ledger-amount>n
|
||||||
# ChannelMode: 'Open'
|
# },
|
||||||
# }
|
# "ChannelMode": "Open"
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Clean up
|
## Clean up
|
||||||
@ -230,3 +232,33 @@
|
|||||||
sudo rm -r l1-nitro-deployment
|
sudo rm -r l1-nitro-deployment
|
||||||
sudo rm -r l2-nitro-deployment
|
sudo rm -r l2-nitro-deployment
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
* Stop (`Ctrl+C`) the direct-fund command if it is stuck
|
||||||
|
|
||||||
|
* Restart the L1 Nitro node:
|
||||||
|
|
||||||
|
* Stop the deployment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd $DEPLOYMENTS_DIR
|
||||||
|
|
||||||
|
laconic-so deployment --dir l1-nitro-deployment stop
|
||||||
|
```
|
||||||
|
|
||||||
|
* Reset the node's durable store:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo rm -rf l1-nitro-deployment/data/nitro_node_data
|
||||||
|
|
||||||
|
mkdir l1-nitro-deployment/data/nitro_node_data
|
||||||
|
```
|
||||||
|
|
||||||
|
* Restart the deployment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
laconic-so deployment --dir l1-nitro-deployment start
|
||||||
|
```
|
||||||
|
|
||||||
|
* Retry the ledger channel creation command
|
||||||
|
Loading…
Reference in New Issue
Block a user