Fix ports in nitro-rpc-client commands
This commit is contained in:
parent
a2390146a5
commit
9545f1c95d
@ -669,7 +669,7 @@ Clone the stack repo:
|
||||
cat <<EOF >> l1charlie-nitro-deployment/config.env
|
||||
CERC_NITRO_CHAIN_URL=ws://host.docker.internal:8546
|
||||
CERC_NITRO_SC_PK=$C_PRIVATE_KEY
|
||||
CERC_NITRO_CHAIN_PK=570b909da9669b2f35a0b1ac70b8358516d55ae1b5b3710e95e9a94395090597
|
||||
CERC_NITRO_CHAIN_PK=111b7500bdce494d6f4bcfe8c2a0dde2ef92f751d9070fac6475dbd6d8021b3f
|
||||
CERC_NA_ADDRESS=$CERC_NA_ADDRESS
|
||||
CERC_VPA_ADDRESS=$CERC_VPA_ADDRESS
|
||||
CERC_CA_ADDRESS=$CERC_CA_ADDRESS
|
||||
@ -690,7 +690,7 @@ Clone the stack repo:
|
||||
cat <<EOF >> l2alice-nitro-deployment/config.env
|
||||
CERC_NITRO_CHAIN_URL=ws://host.docker.internal:9546
|
||||
CERC_NITRO_SC_PK=$A_PRIVATE_KEY
|
||||
CERC_NITRO_CHAIN_PK=111b7500bdce494d6f4bcfe8c2a0dde2ef92f751d9070fac6475dbd6d8021b3f
|
||||
CERC_NITRO_CHAIN_PK=570b909da9669b2f35a0b1ac70b8358516d55ae1b5b3710e95e9a94395090597
|
||||
CERC_NITRO_MSG_PORT=3008
|
||||
CERC_NITRO_RPC_PORT=4008
|
||||
CERC_NA_ADDRESS=$CERC_NA_ADDRESS
|
||||
@ -734,31 +734,31 @@ Clone the stack repo:
|
||||
|
||||
- Start nitro nodes for Alice and Charlie on L1 and L2:
|
||||
|
||||
- Start the deployments for L1 Alice's node
|
||||
- Start the deployment for Alice's L1 node
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1alice-nitro-deployment start
|
||||
```
|
||||
|
||||
- Start the deployments for L1 Charlie's node
|
||||
- Start the deployment for Charlie's L1 node
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment start
|
||||
```
|
||||
|
||||
- Start the deployments for L2 Alice's node
|
||||
- Start the deployment for Alice's L2 node
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l2alice-nitro-deployment start
|
||||
```
|
||||
|
||||
- Start the deployments for L2 Charlie's node
|
||||
- Start the deployment for Charlie's L2 node
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l2charlie-nitro-deployment start
|
||||
```
|
||||
|
||||
- Create ledger channels on L1 and mirrored channel on L2s
|
||||
- Create ledger channels on L1 and mirrored channels on L2
|
||||
- Open new terminal, check that no channels exist on L2
|
||||
|
||||
```bash
|
||||
@ -767,17 +767,15 @@ Clone the stack repo:
|
||||
|
||||
- Set address of bridge and address of custom token on L1 in the current terminal
|
||||
|
||||
<!-- TODO: Get token address from go-nitro deployments env -->
|
||||
```bash
|
||||
export BRIDGE_ADDRESS=$(laconic-so deployment --dir bridge-deployment exec nitro-bridge "jq -r '.\"42069\"[0].contracts.Bridge.address' /app/deployment/nitro-addresses.json")
|
||||
|
||||
export L1_ASSET_ADDRESS="$(laconic-so deployment --dir bridge-deployment exec nitro-contracts "jq -r '.\"1212\"[0].contracts.Token.address' /app/deployment/nitro-addresses.json")"
|
||||
```
|
||||
|
||||
- Create ledger channel between A and Bridge with custom token
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client direct-fund $BRIDGE_ADDRESS --assetAddress $L1_ASSET_ADDRESS -p 4007 -h nitro-node"
|
||||
laconic-so deployment --dir l1alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client direct-fund $BRIDGE_ADDRESS --assetAddress $L1_ASSET_ADDRESS -p 4005 -h nitro-node"
|
||||
```
|
||||
|
||||
- Once direct-fund objective is complete, bridge will create mirrored channel on L2
|
||||
@ -785,7 +783,7 @@ Clone the stack repo:
|
||||
- Check status of L1 ledger channel between A and Bridge
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-ledger-channel <ledger channel ID> -p 4007 -h nitro-node"
|
||||
laconic-so deployment --dir l1alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-ledger-channel <ledger channel ID> -p 4005 -h nitro-node"
|
||||
|
||||
# Expected output:
|
||||
# {
|
||||
@ -805,7 +803,7 @@ Clone the stack repo:
|
||||
- Create ledger channel between C and Bridge with custom token
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l2alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client direct-fund $BRIDGE_ADDRESS --assetAddress $L1_ASSET_ADDRESS -p 4009 -h nitro-node"
|
||||
laconic-so deployment --dir l2alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client direct-fund $BRIDGE_ADDRESS --assetAddress $L1_ASSET_ADDRESS -p 4005 -h nitro-node"
|
||||
```
|
||||
|
||||
- Once direct fund objective is complete, bridge will create mirrored channel on L2
|
||||
@ -813,7 +811,7 @@ Clone the stack repo:
|
||||
- Check status of L1 ledger channel between C and Bridge
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l2alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-ledger-channel <ledger channel ID> -p 4009 -h nitro-node"
|
||||
laconic-so deployment --dir l2alice-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-ledger-channel <ledger channel ID> -p 4005 -h nitro-node"
|
||||
|
||||
# Expected output:
|
||||
# {
|
||||
@ -833,7 +831,7 @@ Clone the stack repo:
|
||||
- Check status of all L2 mirrored ledger channels
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-all-l2-channels -p 4006 -h nitro-bridge"
|
||||
laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-all-l2-channels -p 4005 -h nitro-bridge"
|
||||
|
||||
# Expected output:
|
||||
# {"ID":"0x15dbe6b996e4e46fdd6ea3e2074cbca58014dbb07368e3e7ba286df5c7b9da0d","Status":"Open","Balance":{"AssetAddress":"<Token_address_on_L2>","Me":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","Them":"0xa8d2d06ace9c7ffc24ee785c2695678aecdfd7a0","MyBalance":1000000,"TheirBalance":1000000},"ChannelMode":"Open"}
|
||||
@ -958,13 +956,13 @@ Clone the stack repo:
|
||||
export C_ADDRESS=<Charlie Nitro address>
|
||||
|
||||
# Starts virtual fund objective on L2 to create virtual channel from A' to C'
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-fund $C_ADDRESS $BRIDGE_ADDRESS --amount 1000 -p 4008 -h nitro-node"
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-fund $C_ADDRESS $BRIDGE_ADDRESS --amount 1000 -p 4005 -h nitro-node"
|
||||
```
|
||||
|
||||
- Check payment channel between A' and C'
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-payment-channel <payment channel ID> -p 4008 -h nitro-node"
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-payment-channel <payment channel ID> -p 4005 -h nitro-node"
|
||||
|
||||
# Expected output:
|
||||
# {
|
||||
@ -983,7 +981,7 @@ Clone the stack repo:
|
||||
- After virtual fund objective is complete, make payments
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client pay <payment channel ID> 200 -p 4008 -h nitro-node"
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client pay <payment channel ID> 200 -p 4005 -h nitro-node"
|
||||
|
||||
# Expected output:
|
||||
# {
|
||||
@ -997,7 +995,7 @@ Clone the stack repo:
|
||||
- Close payment channel after payments
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-defund <payment channel ID> -p 4008 -h nitro-node"
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client virtual-defund <payment channel ID> -p 4005 -h nitro-node"
|
||||
```
|
||||
|
||||
- Check L2 mirrored channels status after virtual-defund is complete:
|
||||
@ -1005,7 +1003,7 @@ Clone the stack repo:
|
||||
- Note balance change in A' node:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l1charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4008 -h nitro-node"
|
||||
laconic-so deployment --dir l1charlie-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":"<Token_address_on_L2>","Me":"0xaaa6628ec44a8a742987ef3a114ddfe2d4f7adce","Them":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","MyBalance":999800,"TheirBalance":1000200},"ChannelMode":"Open"}
|
||||
@ -1014,7 +1012,7 @@ Clone the stack repo:
|
||||
- Note balance change in C' node:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir l2charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4010 -h nitro-node"
|
||||
laconic-so deployment --dir l2charlie-nitro-deployment exec nitro-rpc-client "nitro-rpc-client get-all-ledger-channels -p 4005 -h nitro-node"
|
||||
|
||||
# Expected output:
|
||||
# {"ID":"0x15dbe6b996e4e46fdd6ea3e2074cbca58014dbb07368e3e7ba286df5c7b9da0d","Status":"Open","Balance":{"AssetAddress":"<Token_address_on_L2>","Me":"0xa8d2d06ace9c7ffc24ee785c2695678aecdfd7a0","Them":"0xbbb676f9cff8d242e9eac39d063848807d3d1d94","MyBalance":1000200,"TheirBalance":999800},"ChannelMode":"Open"}
|
||||
@ -1038,10 +1036,10 @@ Clone the stack repo:
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
sudo rm -rf 'l1alice-nitro-deployment'
|
||||
sudo rm -rf 'l1charlie-nitro-deployment'
|
||||
sudo rm -rf 'l2alice-nitro-deployment'
|
||||
sudo rm -rf 'l2charlie-nitro-deployment'
|
||||
sudo rm -rf l1alice-nitro-deployment
|
||||
sudo rm -rf l1charlie-nitro-deployment
|
||||
sudo rm -rf l2alice-nitro-deployment
|
||||
sudo rm -rf l2charlie-nitro-deployment
|
||||
```
|
||||
|
||||
- Reset wallet:
|
||||
@ -1086,7 +1084,9 @@ Clone the stack repo:
|
||||
|
||||
## Cleanup
|
||||
|
||||
- Clean up nitro-node deployments and remove volumes:
|
||||
- Reset nitro-node deployments:
|
||||
|
||||
- Stop nitro-node deployments and remove volumes:
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
@ -1097,15 +1097,15 @@ Clone the stack repo:
|
||||
laconic-so deployment --dir bridge-deployment stop --delete-volumes
|
||||
```
|
||||
|
||||
- Clear nitro-node deployments:
|
||||
- Clear nitro-node and bridge deployments:
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
sudo rm -rf 'l1alice-nitro-deployment'
|
||||
sudo rm -rf 'l1charlie-nitro-deployment'
|
||||
sudo rm -rf 'l2alice-nitro-deployment'
|
||||
sudo rm -rf 'l2charlie-nitro-deployment'
|
||||
sudo rm -rf 'bridge-deployment'
|
||||
sudo rm -rf l1alice-nitro-deployment
|
||||
sudo rm -rf l1charlie-nitro-deployment
|
||||
sudo rm -rf l2alice-nitro-deployment
|
||||
sudo rm -rf l2charlie-nitro-deployment
|
||||
sudo rm -rf bridge-deployment
|
||||
```
|
||||
|
||||
- Reset wallet and stop the app:
|
||||
@ -1129,6 +1129,19 @@ Clone the stack repo:
|
||||
sudo rm -rf stage0-deployment
|
||||
sudo rm -rf stage1-deployment
|
||||
```
|
||||
- Clean up faucet deployment:
|
||||
- Stop deployment and remove volumes:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-faucet-deployment stop --delete-volumes
|
||||
```
|
||||
|
||||
- Clear deployment
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
sudo rm -rf laconic-faucet-deployment
|
||||
```
|
||||
|
||||
- Clean up L1 and L2 deployments:
|
||||
- Stop deployment and remove volumes:
|
||||
@ -1147,20 +1160,6 @@ Clone the stack repo:
|
||||
sudo rm -rf fixturenet-eth-deployment
|
||||
```
|
||||
|
||||
- Clean up faucet deployment:
|
||||
- Stop deployment and remove volumes:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-faucet-deployment stop --delete-volumes
|
||||
```
|
||||
|
||||
- Clear deployment
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
sudo rm -rf laconic-faucet-deployment
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- If the ledger channel creation fails, follow these steps:
|
||||
@ -1181,7 +1180,7 @@ Clone the stack repo:
|
||||
|
||||
- Stop the nitro-rpc-client if it is stuck
|
||||
|
||||
- Restart the failed node (For ex. to restart Alice's node)
|
||||
- Restart the failed node (For example: to restart Alice's node)
|
||||
|
||||
- Stop the failed nitro node
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user