Skip to content

Commit

Permalink
op-node: da-rpc, namespace-id - use environment flags (ethereum-optim…
Browse files Browse the repository at this point in the history
…ism#158)

* op-node: use global string for da flags

* op-node: use flag name

* testnet: better healthcheck

* testnet: restore rpc flags
  • Loading branch information
tuxcanfly authored Jul 10, 2023
1 parent 4b7b01f commit 8b75f95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions op-node/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ var requiredFlags = []cli.Flag{
L2EngineAddr,
RPCListenAddr,
RPCListenPort,
DaRPC,
NamespaceId,
}

var optionalFlags = []cli.Flag{
RollupConfig,
DaRPC,
NamespaceId,
Network,
L1TrustRPC,
L1RPCProviderKind,
Expand Down
2 changes: 1 addition & 1 deletion op-node/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewConfig(ctx *cli.Context, log log.Logger) (*node.Config, error) {

l2SyncEndpoint := NewL2SyncEndpointConfig(ctx)

daCfg, err := rollup.NewDAConfig(flags.DaRPC.Value, flags.NamespaceId.Value)
daCfg, err := rollup.NewDAConfig(ctx.GlobalString(flags.DaRPC.Name), ctx.GlobalString(flags.NamespaceId.Name))
if err != nil {
return nil, fmt.Errorf("failed to load da config: %w", err)
}
Expand Down
8 changes: 7 additions & 1 deletion ops-bedrock/docker-compose-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ services:
build:
context: ../
dockerfile: ./op-node/Dockerfile
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://op-node:8545"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
command: >
op-node
--l1=ws://l1:8546
Expand Down Expand Up @@ -141,7 +147,7 @@ services:
- "7301:7300"
- "6545:8545"
healthcheck:
test: ["CMD", "curl", "-f", "http://da:26659/header/1"]
test: ["CMD", "wget", "-q", "-O", "-", "http://da:26659/header/1"]
interval: 5s
timeout: 5s
retries: 5
Expand Down

0 comments on commit 8b75f95

Please sign in to comment.