Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: beacon depends on validator and bridge #28

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rootulp
Copy link
Contributor

@rootulp rootulp commented Dec 11, 2024

Closes #24

@rootulp rootulp self-assigned this Dec 11, 2024
@rootulp rootulp changed the title fix: beacon depends on validator fix: beacon depends on validator and bridge Dec 11, 2024
Comment on lines 13 to +19
depends_on:
- celestia-network-bridge
- reth
celestia-network-validator:
condition: service_healthy
celestia-network-bridge:
condition: service_started
reth:
condition: service_started
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this makes any logical difference as the celestia-network-bridge doesn't start until the validator is "healthy" anyway.

If you wanted to add a health check to the bridge node, you could try using some lightweight method like /network_head.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I tried to add a health check using node.Info or p2p.Info but both required an admin token. Looks like /network_head only needs a read auth token so seems a tad easier.

Ref: https://node-rpc-docs.celestia.org/?version=v0.20.4

Created celestiaorg/celestia-node#4007 so celestia-node exposes an un authenticated status endpoint. In the meantime DevOps shared a workaround that they use:

exec [sh -c AUTH_TOKEN=$(celestia bridge auth read --node.store=/home/celestia 2>/dev/null); curl --max-time 0.5 -s -X POST -H "Content-type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $AUTH_TOKEN" -d '{"id":1,"jsonrpc":"2.0","method":"header.SyncWait","params":[]}' "http://localhost:26658"; if [ "$?" -eq 0 ]; then exit 0; else echo "Catching up"; exit 1; fi ]

so I'll try something like that

@rootulp rootulp marked this pull request as draft December 12, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make docker compose up --detach reliable
2 participants