Skip to content

Commit

Permalink
add Celestia config
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferret-san committed Aug 27, 2024
1 parent 98187ea commit 2b2d1f0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
8 changes: 8 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ services:
- "config:/config"
- "tokenbridge-data:/tokenbridge-data"
command: --conf.file /config/sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain *
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- geth

Expand Down Expand Up @@ -239,6 +241,8 @@ services:
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- geth
- redis
Expand Down Expand Up @@ -287,6 +291,8 @@ services:
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/validator_config.json --http.port 8547 --http.api net,web3,arb,debug,net,eth --ws.port 8548
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- sequencer
- validation_node
Expand Down Expand Up @@ -316,6 +322,8 @@ services:
- "127.0.0.1:8949:8549"
volumes:
- "config:/config"
extra_hosts:
- 'host.docker.internal:host-gateway'
command: --conf.file /config/validation_node_config.json

scripts:
Expand Down
45 changes: 25 additions & 20 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ function writeConfigs(argv: any) {
"dangerous": {
"without-block-validator": false
},
"parent-chain-wallet" : {
"parent-chain-wallet": {
"account": namedAddress("validator"),
"password": consts.l1passphrase,
"pathname": consts.l1keystore,
"pathname": consts.l1keystore,
},
"disable-challenge": false,
"enable": false,
Expand Down Expand Up @@ -202,10 +202,10 @@ function writeConfigs(argv: any) {
"redis-url": argv.redisUrl,
"max-delay": "30s",
"l1-block-bound": "ignore",
"parent-chain-wallet" : {
"parent-chain-wallet": {
"account": namedAddress("sequencer"),
"password": consts.l1passphrase,
"pathname": consts.l1keystore,
"pathname": consts.l1keystore,
},
"data-poster": {
"redis-signer": {
Expand All @@ -215,12 +215,17 @@ function writeConfigs(argv: any) {
},
},
"block-validator": {
"validation-server" : {
"url": argv.validationNodeUrl,
"jwtsecret": valJwtSecret,
},
"dangerous": {"reset-block-validation": false},
"validation-server": {
"url": argv.validationNodeUrl,
"jwtsecret": valJwtSecret,
},
"dangerous": { "reset-block-validation": false },
},
"celestia-cfg": {
"enable": true,
"url": "http://host.docker.internal:9876"
},
"da-preference": ["celestia"],
"feed": {
"input": {
"url": [], // websocket urls
Expand Down Expand Up @@ -310,13 +315,13 @@ function writeConfigs(argv: any) {
fs.writeFileSync(path.join(consts.configpath, "sequencer_config.json"), JSON.stringify(sequencerConfig))

let posterConfig = JSON.parse(baseConfJSON)
if (argv.espresso) {
posterConfig.node.feed.input.url.push("ws://sequencer:9642")
posterConfig.node["batch-poster"]["hotshot-url"] = argv.espressoUrl
posterConfig.node["batch-poster"]["light-client-address"] = argv.lightClientAddress
} else {
posterConfig.node["seq-coordinator"].enable = true
}
if (argv.espresso) {
posterConfig.node.feed.input.url.push("ws://sequencer:9642")
posterConfig.node["batch-poster"]["hotshot-url"] = argv.espressoUrl
posterConfig.node["batch-poster"]["light-client-address"] = argv.lightClientAddress
} else {
posterConfig.node["seq-coordinator"].enable = true
}
posterConfig.node["batch-poster"].enable = true
fs.writeFileSync(path.join(consts.configpath, "poster_config.json"), JSON.stringify(posterConfig))
}
Expand Down Expand Up @@ -449,11 +454,11 @@ export const writeConfigCommand = {
describe: "writes config files",
builder: {
simple: {
boolean: true,
describe: "simple config (sequencer is also poster, validator)",
default: false,
boolean: true,
describe: "simple config (sequencer is also poster, validator)",
default: false,
},
},
},
handler: (argv: any) => {
writeConfigs(argv)
}
Expand Down
10 changes: 5 additions & 5 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ while [[ $# -gt 0 ]]; do
done

if $espresso; then
NITRO_CONTRACTS_REPO=https://github.com/EspressoSystems/nitro-contracts.git
NITRO_CONTRACTS_BRANCH=develop
NITRO_CONTRACTS_REPO=https://github.com/celestiaorg/nitro-contracts.git
NITRO_CONTRACTS_BRANCH=celestia-espresso-test
export NITRO_CONTRACTS_REPO
export NITRO_CONTRACTS_BRANCH
echo "Running espresso mode"
echo "Running espresso and celestia mode"
echo "Using NITRO_CONTRACTS_REPO: $NITRO_CONTRACTS_REPO"
echo "Using NITRO_CONTRACTS_BRANCH: $NITRO_CONTRACTS_BRANCH"
fi
Expand Down Expand Up @@ -345,9 +345,9 @@ if $dev_build_nitro; then
docker tag nitro-node-dev:latest nitro-node-dev-testnode
else
if $latest_espresso_image; then
docker pull $ESPRESSO_VERSION
docker pull $ESPRESSO_VERSION
docker tag $ESPRESSO_VERSION nitro-node-dev-testnode
else
else
docker pull $NITRO_NODE_VERSION
docker tag $NITRO_NODE_VERSION nitro-node-dev-testnode
fi
Expand Down

0 comments on commit 2b2d1f0

Please sign in to comment.