Skip to content

Feat/snapshot#55

Open
curryxbo wants to merge 2 commits intomainfrom
feat/snapshot
Open

Feat/snapshot#55
curryxbo wants to merge 2 commits intomainfrom
feat/snapshot

Conversation

@curryxbo
Copy link
Contributor

@curryxbo curryxbo commented Mar 11, 2026

Summary

  • Add MPT (Merkle Patricia Trie) node support with dedicated env config, entrypoint script, and Makefile targets for hoodi/mainnet
  • Bump docker images: go-ethereum 2.1.1 → 2.1.2, node 0.4.10 → 0.4.11
  • Add ops/snapshot/ automation toolkit that runs on a server cron job (1st and 15th of each month) to create snapshots, upload to S3, and auto-update the README snapshot table via GitHub API

Changes

MPT Node Support (morph-node/)

  • .env_mpt — MPT-specific overrides (entrypoint, fork time, snapshot names)
  • entrypoint-geth-mpt.sh — geth startup script with --morph-mpt flag
  • Makefile — new targets: run-hoodi-mpt-node, run-mainnet-mpt-node, run-hoodi-mpt-validator, run-mainnet-mpt-validator, download-and-decompress-hoodi-mpt-snapshot, download-and-decompress-mainnet-mpt-snapshot

Snapshot Automation (ops/snapshot/)

  • snapshot_make.py — entry point: stop services → create tar snapshot → upload to S3 → restart → update README
  • update_metadata.py — fetches l1_msg_start_height / derivation_start_height from indexer API, then creates a branch + pushes updated README + opens PR via GitHub REST API (no git CLI required)
  • update_readme.py — in-memory README table insertion logic + Prometheus metrics output
  • metrics_server.py — persistent HTTP server exposing snapshot metrics on :6060/metrics
  • snapshot.env.example — configuration reference
  • README.md / README.zh.md — bilingual usage documentation

Test plan

  • run-hoodi-mpt-node / run-mainnet-mpt-node starts containers with MPT entrypoint
  • download-and-decompress-hoodi-mpt-snapshot fetches correct snapshot name from .env_mpt
  • DRY_RUN=1 python3 ops/snapshot/update_metadata.py prints metadata without touching GitHub
  • python3 ops/snapshot/update_readme.py <README> inserts row correctly into target section
  • metrics_server.py serves metrics on :6060/metrics after a snapshot run

🤖 Generated with Claude Code

@curryxbo curryxbo linked an issue Mar 12, 2026 that may be closed by this pull request
@curryxbo curryxbo self-assigned this Mar 12, 2026
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.

Automated Snapshot Creation & README Update

1 participant