Add instructions for bridge stack

This commit is contained in:
IshaVenikar 2024-07-19 11:02:33 +05:30
parent 3bacfb4025
commit 50616bc580

View File

@ -352,6 +352,76 @@
- Replace `<go-nitro-repo-absolute-path>` with absolute path to the cloned go-nitro repo
### Bridge Stack
1. Clone the stack repos:
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/bridge --git-ssh --pull
```
2. Clone required repositories:
```bash
# laconicd
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge setup-repositories --git-ssh --pull
```
3. Build the container images:
```bash
# laconicd
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge build-containers --force-rebuild
```
4. Create a deployment for the bridge:
- Create spec files for the deployment:
```bash
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge deploy init --output bridge-nitro-spec.yml
```
- Edit `network` in the spec file to map container ports to host ports as required:
```bash
# bridge-nitro-spec.yml
...
network:
ports:
go-nitro:
- 4005:3005
- 3006:3006
- 4006:4006
```
- Create a deployment from the spec file:
```bash
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node deploy create --spec-file bridge-nitro-spec.yml --deployment-dir bridge-nitro-deployment
```
- In `bridge-nitro-deployment/config.env` file, set the following env variable:
```bash
# URL endpoint of the L2 and L2 chains
CERC_NITRO_L1_CHAIN_URL=ws://host.docker.internal:8546
CERC_NITRO_L2_CHAIN_URL=ws://host.docker.internal:9546
# Private key of the account on chain that is used for funding channels in Nitro node
CERC_NITRO_CHAIN_PK=888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218
CERC_NITRO_SC_PK=0279651921cd800ac560c21ceea27aab0107b67daf436cdd25ce84cad30159b4
# Port to be used by P2P message service
CERC_NITRO_L1_MSG_PORT=3005
CERC_NITRO_L2_MSG_PORT=3006
# Port to be used by RPC server
CERC_NITRO_RPC_PORT=4006
CERC_NITRO_PUBLIC_P2P_HOST=
```
### Nitro-node Stack
1. Clone the stack repos: