-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summary
Add a server-side automation system for creating chain data snapshots, uploading to S3, and updating the README snapshot table via GitHub PR.
Components
snapshot_make.py— main entry point, runs via PM2 cron on the 1st and 15th of each monthupdate_metadata.py— fetches indexer metadata and creates a GitHub PR to update the README table via GitHub REST API (no git/gh CLI required)update_readme.py— in-memory README table insertion logicmetrics_server.py— Prometheus metrics HTTP server for alerting integrationsnapshot.env.example— per-environment configuration templateecosystem.config.js.example— PM2 process config template
Workflow
- Resolve snapshot name (check GitHub for branch conflicts)
- Stop
morph-gethandmorph-node - Copy chain data → compress → upload to S3
- Restart services, collect
base_heightvia geth RPC - Query explorer-indexer API for
l1_msg_start_heightandderivation_start_height - Push README update to a new branch and open a PR
Key Design Decisions
- All GitHub operations use REST API directly — no git or gh CLI dependency
- Snapshot name, S3 key, and branch name are resolved together before any destructive operation to prevent conflicts
- All temp files are scoped under
SNAPSHOT_WORK_DIR(cleared after upload) - Python 3.7 compatible
- Supports multiple environments (mainnet / hoodi / holesky) and snapshot types (snapshot / mpt-snapshot) via env config
Reactions are currently unavailable