Skip to content

Commit

Permalink
da: wait for grpc port
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxcanfly committed Nov 28, 2023
1 parent a98e7f8 commit f88e4a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ def devnet_deploy(paths):
run_command(['docker', 'compose', 'up', '-d', 'da'], cwd=paths.ops_bedrock_dir, env={
'PWD': paths.ops_bedrock_dir,
})
wait_up(26658)
wait_for_rpc_server('127.0.0.1:26658', method="p2p.Info")
wait_up(26650)

log.info('Bringing up `op-node`, `op-proposer` and `op-batcher`.')
run_command(["docker", "compose", "up", "-d", "op-node", "op-proposer", "op-batcher"], cwd=paths.ops_bedrock_dir,
Expand Down Expand Up @@ -294,11 +293,11 @@ def debug_dumpBlock(url):
return data


def wait_for_rpc_server(url, method="eth_chainId"):
def wait_for_rpc_server(url):
log.info(f'Waiting for RPC server at {url}')

headers = {'Content-type': 'application/json'}
body = f'{{"id":1, "jsonrpc":"2.0", "method": "{method}", "params":[]}}'
body = '{"id":1, "jsonrpc":"2.0", "method": "eth_chainId", "params":[]}'

while True:
try:
Expand Down
2 changes: 0 additions & 2 deletions ops-bedrock/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ services:
image: ghcr.io/rollkit/local-celestia-devnet:v0.12.2
ports:
- "26650:26650"
- "26658:26658"
- "26659:26659"
environment:
CELESTIA_NAMESPACE: 000008e5f679bf7116cb
healthcheck:
Expand Down

0 comments on commit f88e4a2

Please sign in to comment.