2024-07-19 05:27:46 +00:00
|
|
|
# bridge
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
- Clone the stack repo:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so fetch-stack git.vdb.to/cerc-io/nitro-stack
|
|
|
|
```
|
|
|
|
|
|
|
|
- Build container images:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge build-containers
|
|
|
|
```
|
2024-07-23 06:40:19 +00:00
|
|
|
|
|
|
|
## Create a deployment
|
|
|
|
|
|
|
|
- Create a spec file
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge deploy init --output bridge-spec.yml
|
|
|
|
```
|
|
|
|
|
|
|
|
- TODO: Edit `network` in the spec file to map container ports to host ports as required:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
network:
|
|
|
|
ports:
|
|
|
|
go-nitro:
|
|
|
|
- 3005:3005
|
|
|
|
- 3006:3006
|
2024-09-17 13:54:17 +00:00
|
|
|
- 4005:4005
|
2024-07-23 06:40:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
- Create deployment
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge deploy create --spec-file bridge-spec.yml --deployment-dir bridge-deployment
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
- Inside the `bridge-deployment` deployment directory, open `config.env` file and set following env variables:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
GETH_CHAIN_ID=1212
|
|
|
|
|
2024-09-30 04:24:38 +00:00
|
|
|
# URL endpoint of the chain (Example: ws://host.docker.internal:8545)
|
|
|
|
NITRO_CHAIN_URL=
|
2024-07-23 06:40:19 +00:00
|
|
|
|
|
|
|
# Private key of the account on chain that is used for funding channels
|
|
|
|
NITRO_CHAIN_PK: ${NITRO_CHAIN_PK}
|
|
|
|
|
|
|
|
NITRO_SC_PK: ${NITRO_SC_PK}
|
|
|
|
|
|
|
|
# Port to be used by P2P message service for L1
|
|
|
|
NITRO_L1_MSG_PORT=3005
|
|
|
|
|
|
|
|
# Port to be used by P2P message service for L2
|
|
|
|
NITRO_L2_MSG_PORT=3006
|
|
|
|
|
|
|
|
# Port to be used by RPC server
|
2024-09-17 13:54:17 +00:00
|
|
|
NITRO_RPC_PORT=4005
|
2024-07-23 06:40:19 +00:00
|
|
|
|
|
|
|
NITRO_PUBLIC_P2P_HOST=127.0.0.1
|
|
|
|
|
|
|
|
NITRO_PUBLIC_RPC_HOST=nitro-bridge
|
|
|
|
```
|
|
|
|
|
|
|
|
## Start the deployment
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so deployment --dir bridge-deployment start
|
|
|
|
```
|