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

Ledger Increase Check #717

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

l-monninger
Copy link
Collaborator

@l-monninger l-monninger commented Oct 20, 2024

Summary

  • RFCs: $\emptyset$.
  • Categories:util

Adds an overlay that will crash the docker-compose application if the ledger has not increased in a given amount of time. This is useful for detecting node asynchrony and similar conditions without a more advanced monitoring setup.

Most of the changes here are permissions changes on compose files.

Testing

To validate

# to ensure that it will run normally
LEDGER_INCREASE_PERIOD_SECONDS=300 just suzuka-full-node docker-compose local.ledger-should-progresst will run normally

# to ensure the crash occurs
LEDGER_INCREASE_PERIOD_SECONDS=1 just suzuka-full-node docker-compose local.ledger-should-progress

Added

No automated tests have yet been added.

Outstanding issues

  1. We may want to build a monitoring util container. This is a quick solution. More advanced solutions would fall under.
  2. Main still has issues with containers--owing to a bad setup script. Please use an older container when testing.

@0xmovses
Copy link
Contributor

Inside the nix shell I run
LEDGER_INCREASE_PERIOD_SECONDS=1 just suzuka-full-node docker-compose local.ledger-should-progress

Running docker-compose for suzuka-full-node with override files: -f docker/compose/suzuka-full-node/docker-compose.local.yml -f docker/compose/suzuka-full-node/docker-compose.ledger-should-progress.yml...
Couldn't find env file: /Users/movses/movement-dev/.env
error: Recipe `suzuka-full-node` failed on line 6 with exit code 1

Assume this is because of the aforementioned bad script. For using an old container, should I just go back one commit on main and run docker compose? And then go back to this branch and re run the command? I need some clearer instructions to test.

@l-monninger
Copy link
Collaborator Author

Inside the nix shell I run
LEDGER_INCREASE_PERIOD_SECONDS=1 just suzuka-full-node docker-compose local.ledger-should-progress

Running docker-compose for suzuka-full-node with override files: -f docker/compose/suzuka-full-node/docker-compose.local.yml -f docker/compose/suzuka-full-node/docker-compose.ledger-should-progress.yml...
Couldn't find env file: /Users/movses/movement-dev/.env
error: Recipe suzuka-full-node failed on line 6 with exit code 1
Assume this is because of the aforementioned bad script. For using an old container, should I just go back one commit on main and run docker compose? And then go back to this branch and re run the command? I need some clearer instructions to test.

To this point we have assumed a .env file. If we want to remove this, it's a line here, but this will change some assumptions in other places the docker-compose target is used. I would recommend you put in an empty .env or populate accordingly.

@l-monninger
Copy link
Collaborator Author

@0xmovses

This was referenced Oct 21, 2024
@@ -0,0 +1,32 @@
# install jq if in busybox
if [ -f /etc/alpine-release ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a purpose for this standalone script file, when the ledger-should-progress inlines a copy of it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The execution flag change by chmod looks spurious, let's revert that.

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.

3 participants