From cdf26a0014e3846f61b89fbaab529b492552ffde Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 5 Sep 2024 17:47:39 +0530 Subject: [PATCH] Add troubleshooting steps --- ops/deployments-from-scratch.md | 3 ++ testnet-nitro-node.md | 60 +++++++++++++++++++++++++-------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 96453b5..a232876 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -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 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") # TODO @@ -246,6 +248,7 @@ na_address: "$NA_ADDRESS" ca_address: "$CA_ADDRESS" vpa_address: "$VPA_ADDRESS" + l1_asset_address: "${L1_ASSET_ADDRESS}" bridge_contract_address: "$BRIDGE_CONTRACT_ADDRESS" bridge_nitro_address: "$BRIDGE_NITRO_ADDRESS" nitro_l1_bridge_multiaddr: "$L1_BRIDGE_MULTIADDR" diff --git a/testnet-nitro-node.md b/testnet-nitro-node.md index d201370..4079c73 100644 --- a/testnet-nitro-node.md +++ b/testnet-nitro-node.md @@ -178,8 +178,8 @@ # AssetAddress: '', # Me: '', # Them: '', - # MyBalance: 1000000n, - # TheirBalance: 1000000n + # MyBalance: n, + # TheirBalance: n # }, # 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" # Expected output: - # { - # ID: '0x6a9f5ccf1fa802525d794f4a899897f947615f6acc7141e61e056a8bfca29179', - # Status: 'Open', - # Balance: { - # AssetAddress: '', - # Me: '', - # Them: '', - # MyBalance: 1000000n, - # TheirBalance: 1000000n - # }, - # ChannelMode: 'Open' - # } + # [ + # { + # "ID": "0x6a9f5ccf1fa802525d794f4a899897f947615f6acc7141e61e056a8bfca29179", + # "Status": "Open", + # "Balance": { + # "AssetAddress": "", + # "Me": "", + # "Them": "", + # "MyBalance": n, + # "TheirBalance": n + # }, + # "ChannelMode": "Open" + # } + # ] ``` ## Clean up @@ -230,3 +232,33 @@ sudo rm -r l1-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