Skip to content

Commit

Permalink
Merge pull request #47 from 0glabs/dockerimage
Browse files Browse the repository at this point in the history
Update docker config
  • Loading branch information
csdtowards authored Aug 13, 2024
2 parents 0a442fa + fa094c6 commit 4a2cfc1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ inabox/resources/kzg/SRSTables/*
run/*
!run/start.sh
!run/run.sh
!README.md

**/bin/*
coverage.*
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,24 @@ For detailed public APIs, visit [gRPC API](docs/api/) section.
2. Run combined server

Update the following command by referencing the [Configuration](da-client.md#section1)

Reference:

* [Testnet Configuration](https://docs.0g.ai/0g-doc/run-a-node/testnet-configuration)
* [Contract Addresses](https://docs.0g.ai/0g-doc/docs/contract-addresses)

```bash
./bin/combined \
--chain.rpc https://rpc-testnet.0g.ai \
--chain.private-key 0x00 \
--chain.rpc L1_RPC_ENDPOINT \
--chain.private-key YOUR_PRIVATE_KEY \
--chain.receipt-wait-rounds 180 \
--chain.receipt-wait-interval 1s \
--chain.gas-limit 2000000 \
--combined-server.use-memory-db \
--combined-server.storage.kv-db-path ./../run/ \
--combined-server.storage.time-to-expire 300 \
--disperser-server.grpc-port 51001 \
--batcher.da-entrance-contract 0xDFC8B84e3C98e8b550c7FEF00BCB2d8742d80a69 \
--batcher.da-entrance-contract ENTRANCE_CONTRACT_ADDR \
--batcher.da-signers-contract 0x0000000000000000000000000000000000001000 \
--batcher.finalizer-interval 20s \
--batcher.confirmer-num 3 \
Expand All @@ -129,16 +134,19 @@ For detailed public APIs, visit [gRPC API](docs/api/) section.
--batcher.pull-interval 10s \
--batcher.signing-interval 3s \
--batcher.signed-pull-interval 20s \
--encoder-socket 52.198.175.144:34000 \
--encoder-socket DA_ENCODER_SERVER \
--encoding-timeout 600s \
--signing-timeout 600s \
--chain-read-timeout 12s \
--chain-write-timeout 13s \
--combined-server.log.level-file trace \
--combined-server.log.level-std trace \
--combined-server.log.level-std trace \
--combined-server.log.path ./../run/run.log
```


### Run via Docker
[Guidance](run/README.md)

## Contributing

To make contributions to the project, please follow the guidelines [here](contributing.md).
24 changes: 24 additions & 0 deletions run/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 0GDA

## How to run

1. Build client server

```bash
cd run
make -C .. build
```

2. Build docker image

```bash
docker build -t 0gclient -f ../Dockerfile .
```

3. Update configutaions in **[run.sh](run.sh)**

4. Run docker image
```bash
./start.sh
```

9 changes: 4 additions & 5 deletions run/run.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/bin/combined \
--chain.rpc \
--chain.private-key \
--chain.rpc L1_RPC_ENDPOINT \
--chain.private-key YOUR_PRIVATE_KEY \
--chain.receipt-wait-rounds 180 \
--chain.receipt-wait-interval 1s \
--chain.gas-limit 2000000 \
--combined-server.use-memory-db \
--combined-server.storage.kv-db-path /runtime/ \
--combined-server.storage.time-to-expire 2592000 \
--disperser-server.grpc-port 51001 \
--batcher.da-entrance-contract \
--batcher.da-entrance-contract ENTRANCE_CONTRACT_ADDR \
--batcher.da-signers-contract 0x0000000000000000000000000000000000001000 \
--batcher.finalizer-interval 20s \
--batcher.confirmer-num 3 \
Expand All @@ -21,12 +21,11 @@
--batcher.signing-interval 3s \
--batcher.signed-pull-interval 20s \
--batcher.expiration-poll-interval 3600 \
--encoder-socket \
--encoder-socket DA_ENCODER_SERVER \
--encoding-timeout 600s \
--signing-timeout 600s \
--chain-read-timeout 12s \
--chain-write-timeout 13s \
--combined-server.log.level-file trace \
--combined-server.log.level-std trace \
--disperser-server.retriever-address \
--combined-server.log.path /runtime/run.log

0 comments on commit 4a2cfc1

Please sign in to comment.