Refactor demo clean up for re-run

This commit is contained in:
Neeraj 2024-08-26 16:43:39 +05:30
parent 0e02a5731a
commit cc663baa31

View File

@ -375,7 +375,6 @@
#Send tokens to Charlie
laconic-so deployment --dir bridge-deployment exec l2-nitro-contracts "cd packages/nitro-protocol && yarn hardhat transfer --contract $L1_ASSET_ADDRESS --to $C_CHAIN_ADDRESS --amount 1000 --network geth"
```
## Demo
- Get the deployed nitro contract addresses (run in the directory where the deployments were created):
@ -524,6 +523,8 @@
laconic-so deployment --dir l2charlie-nitro-deployment logs nitro-node -f
```
## Demo
- Create ledger channels on L1 and mirrored channels on L2
- Open new terminal, check that no channels exist on L2
@ -711,21 +712,33 @@
laconic-so deployment --dir l1charlie-nitro-deployment stop --delete-volumes
laconic-so deployment --dir l2alice-nitro-deployment stop --delete-volumes
laconic-so deployment --dir l2charlie-nitro-deployment stop --delete-volumes
laconic-so deployment --dir bridge-deployment stop --delete-volumes
```
- Clear nitro-node deployments:
- Clear nitro-nodes durable store:
```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/data/nitro_node_data/nitro-store
sudo rm -rf l1charlie-nitro-deployment/data/nitro_node_data/nitro-store
sudo rm -rf l2alice-nitro-deployment/data/nitro_node_data/nitro-store
sudo rm -rf l2charlie-nitro-deployment/data/nitro_node_data/nitro-store
sudo rm -rf bridge-deployment/data/nitro_bridge_data/bridge-store
```
## Re-run
- After running demo cleanup, follow the steps from [Demo](#demo) to re-run the demo
- After running demo cleanup, start the deployments
```bash
laconic-so deployment --dir l1alice-nitro-deployment start
laconic-so deployment --dir l1charlie-nitro-deployment start
laconic-so deployment --dir l2alice-nitro-deployment start
laconic-so deployment --dir l2charlie-nitro-deployment start
laconic-so deployment --dir bridge-deployment start
```
- Follow the steps from [Demo](#demo) to re-run the demo
## Cleanup