diff --git a/Dockerfile b/Dockerfile index d07a6d1..bfbfd86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ghcr.io/celestiaorg/celestia-app:v1.4.0 AS celestia-app -FROM ghcr.io/celestiaorg/celestia-node:v0.12.0 +FROM ghcr.io/rollkit/celestia-da:v0.12.1-rc0 USER root @@ -8,6 +8,7 @@ USER root RUN apk --no-cache add \ curl \ jq \ + openssl \ && mkdir /bridge \ && chown celestia:celestia /bridge @@ -17,6 +18,6 @@ COPY --from=celestia-app /bin/celestia-appd /bin/ COPY entrypoint.sh /opt/entrypoint.sh -EXPOSE 26657 26658 26659 9090 +EXPOSE 26650 26657 26658 26659 9090 ENTRYPOINT [ "/bin/bash", "/opt/entrypoint.sh" ] diff --git a/README.md b/README.md index 241d79f..3db888c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ For information about the different node types, see ```bash docker run -t -i \ - -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ + -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ ghcr.io/rollkit/local-celestia-devnet:latest ``` @@ -41,7 +41,7 @@ To run the Docker container: ```bash docker run -t -i \ - -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ + -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ celestia-local-devnet ``` @@ -58,7 +58,7 @@ If you would like the run the container in the background, you can use the ```bash docker run -d -t -i \ - -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ + -p 26650:26650 -p 26657:26657 -p 26658:26658 -p 26659:26659 -p 9090:9090 \ celestia-local-devnet ``` @@ -90,11 +90,18 @@ docker rm | Port | Protocol | Address | Description | Node Type | |-------|----------|-----------|-------------|-----------------------------------------| +| 26650 | gRPC | 127.0.0.1 | gRPC | Data Availability Service | | 26657 | HTTP | 127.0.0.1 | RPC | Consensus (e.g `celestia-app`) | | 26658 | HTTP | 127.0.0.1 | RPC | Data Availability (e.g `celestia-node`) | | 26659 | HTTP | 127.0.0.1 | REST | Data Availability (e.g `celestia-node`) | | 9090 | HTTP | 0.0.0.0 | gRPC | Consensus (e.g `celestia-app`) | +## Environment Variables + +| Variable | Description | Default | +|------------------------|---------------------------------|--------------------| +| CELESTIA_NAMESPACE | Namespace to use for DA Service | Randomly generated | + You may also find these docs helpful: - [celestia-app ports](https://docs.celestia.org/nodes/celestia-app/#ports) diff --git a/entrypoint.sh b/entrypoint.sh index 45b141d..26706d0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,12 +71,17 @@ while [ "${#GENESIS}" -le 4 -a $CNT -ne $MAX ]; do done export CELESTIA_CUSTOM=test:$GENESIS -echo $CELESTIA_CUSTOM +echo "$CELESTIA_CUSTOM" -celestia bridge init --node.store /home/celestia/bridge -export CELESTIA_NODE_AUTH_TOKEN=$(celestia bridge auth admin --node.store ${NODE_PATH}) -echo "WARNING: Keep this auth token secret **DO NOT** log this auth token outside of development. CELESTIA_NODE_AUTH_TOKEN=$CELESTIA_NODE_AUTH_TOKEN" -celestia bridge start \ +if [ -z "$CELESTIA_NAMESPACE" ]; then + CELESTIA_NAMESPACE=0000$(openssl rand -hex 8) +fi +echo CELESTIA_NAMESPACE="$CELESTIA_NAMESPACE" + +celestia-da bridge init --node.store /home/celestia/bridge +celestia-da bridge start \ --node.store $NODE_PATH --gateway \ --core.ip 127.0.0.1 \ - --keyring.accname validator \ No newline at end of file + --keyring.accname validator \ + --da.grpc.namespace "$CELESTIA_NAMESPACE" \ + --da.grpc.listen "0.0.0.0:26650"