health checks (#39)

resolves #35

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/39
This commit is contained in:
johba 2025-10-02 14:37:59 +02:00
parent a29ca1a26a
commit 3ab2d9454a
14 changed files with 586 additions and 611 deletions

View file

@ -14,7 +14,7 @@ Ponder-based indexer that records Kraiken protocol activity and exposes the Grap
- `.ponder/` - Local SQLite/state cache (safe to delete when schemas change).
## Development Workflow
- Primary path: `nohup ./scripts/local_env.sh start &` boots Anvil, deploys contracts, and launches Ponder in watch mode.
- Primary path: `nohup ./scripts/dev.sh start &` boots Anvil, deploys contracts, and launches Ponder in watch mode.
- Podman stack: `podman-compose up -d` starts all services including PostgreSQL; bootstrap creates `.env.local` automatically.
- Focused debugging: within `services/ponder/`, run `npm install` then `PONDER_NETWORK=BASE_SEPOLIA_LOCAL_FORK npm run dev` once the stack is already online.
- For production-style runs, use `npm run build` followed by `PONDER_NETWORK=BASE npm run start` and point `DATABASE_URL` to PostgreSQL if persistence is required.

View file

@ -26,7 +26,7 @@ cp .env.example .env
```
Edit `.env` to select your network:
- `PONDER_NETWORK=BASE_SEPOLIA_LOCAL_FORK` - Local Anvil fork managed by `scripts/local_env.sh`
- `PONDER_NETWORK=BASE_SEPOLIA_LOCAL_FORK` - Local Anvil fork managed by `scripts/dev.sh`
- `PONDER_NETWORK=BASE_SEPOLIA` - Base Sepolia testnet
- `PONDER_NETWORK=BASE` - Base mainnet

View file

@ -27,7 +27,7 @@ GRAPHQL_ENDPOINT=<ponder-graphql-url>
```
## Operations
- Launch via `nohup ./scripts/local_env.sh start &`; the script handles env injection and process supervision.
- Launch via `nohup ./scripts/dev.sh start &`; the script handles env injection and process supervision.
- For focused debugging, run `npm install` then `npm start` within `services/txnBot/` after the stack is already up.
- Monitor logs for transaction receipts and ensure gas pricing stays within acceptable bounds.

View file

@ -6,7 +6,7 @@ Automation worker that monitors staking positions and calls `recenter()` / `payT
The bot supports three environments shared across the stack:
- `BASE_SEPOLIA_LOCAL_FORK` Anvil fork started by `scripts/local_env.sh`
- `BASE_SEPOLIA_LOCAL_FORK` Anvil fork started by `scripts/dev.sh`
- `BASE_SEPOLIA` Public Base Sepolia testnet
- `BASE` Base mainnet
@ -26,7 +26,7 @@ GRAPHQL_ENDPOINT=<ponder-graphql-url>
# Optional: PORT=43069
```
`scripts/local_env.sh start` generates these values automatically for the local fork, writes them to a temporary file, and keeps the process running in the background.
`scripts/dev.sh start` generates these values automatically for the local fork, writes them to a temporary file, and keeps the process running in the background.
## Local Run