-
Notifications
You must be signed in to change notification settings - Fork 17
Plan for ENSdb CLI #1881
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
base: main
Are you sure you want to change the base?
Plan for ENSdb CLI #1881
Changes from 2 commits
e4c1bfc
532b8cf
d72ad26
04bedf1
b08bfc1
303562b
5eb5caf
ff68be6
a9d28c1
c89ef3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,303 @@ | ||||||
| --- | ||||||
| name: ENSDb CLI Tool | ||||||
| overview: Create a new `apps/ensdb-cli` application that provides database inspection, schema management, and snapshot import/export/push/pull operations for ENSDb, targeting 50-100GB PostgreSQL databases with S3-compatible storage and safe restore flows for fresh or isolated databases. | ||||||
| todos: | ||||||
| - id: scaffold | ||||||
| content: "Scaffold apps/ensdb-cli: package.json, tsconfig, vitest config, yargs entry point, workspace integration" | ||||||
| status: pending | ||||||
| - id: inspect | ||||||
| content: "Implement inspect command: list schemas with classification, per-schema details (tables, sizes, row counts)" | ||||||
| status: pending | ||||||
| - id: schema-drop | ||||||
| content: Implement schema drop command with safety confirmation | ||||||
| status: pending | ||||||
| - id: pgdump-wrapper | ||||||
| content: Implement pg_dump/pg_restore wrapper with parallel jobs and progress reporting | ||||||
| status: pending | ||||||
| - id: snapshot-create | ||||||
| content: "Implement snapshot create: dump all indexer schemas + ponder_sync + full ensnode.metadata, then generate manifest + checksums" | ||||||
| status: pending | ||||||
| - id: snapshot-restore | ||||||
| content: "Implement snapshot restore: unpack selected archives, validate manifest, pg_restore with parallel jobs, and restore filtered metadata rows into a fresh or isolated database" | ||||||
| status: pending | ||||||
| - id: s3-client | ||||||
| content: Implement S3 client layer with multipart upload/download support | ||||||
| status: pending | ||||||
| - id: snapshot-push | ||||||
| content: "Implement snapshot push: upload snapshot artifacts and manifest to S3-compatible storage" | ||||||
| status: pending | ||||||
| - id: snapshot-pull | ||||||
| content: "Implement snapshot pull: download from S3, verify checksums" | ||||||
| status: pending | ||||||
| - id: snapshot-list-info | ||||||
| content: Implement snapshot list and snapshot info commands for browsing remote snapshots | ||||||
| status: pending | ||||||
| - id: dockerfile | ||||||
| content: Create Dockerfile with postgresql-client for pg_dump/pg_restore | ||||||
| status: pending | ||||||
| - id: docs | ||||||
| content: Add documentation and README | ||||||
| status: pending | ||||||
| isProject: false | ||||||
| --- | ||||||
|
|
||||||
| # ENSDb CLI Tool | ||||||
|
|
||||||
| ## Context | ||||||
|
|
||||||
| ENSNode production databases are 50-100GB PostgreSQL instances. Each chain deployment gets its own indexer schema following the naming convention `{deployment}Schema{version}`. Three schema types coexist in one database: | ||||||
|
||||||
| ENSNode production databases are 50-100GB PostgreSQL instances. Each chain deployment gets its own indexer schema following the naming convention `{deployment}Schema{version}`. Three schema types coexist in one database: | |
| ENSNode production databases are 50-100GB PostgreSQL instances. Each chain deployment gets its own indexer schema following the naming convention `{deployment}Schema{tag}`, where `tag` is the Docker image tag used by the blue-green deploy workflow. Three schema types coexist in one database: |
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This markdown link is likely broken because the plan file lives under .cursor/plans/, so ( .github/workflows/... ) will resolve relative to that directory on GitHub. Use a repo-root absolute link (e.g. /.github/workflows/deploy_ensnode_blue_green.yml) or a correct relative path (e.g. ../../.github/workflows/...).
| Schema names are set via `ENSINDEXER_SCHEMA_NAME` env var in the blue-green deploy workflow (`[.github/workflows/deploy_ensnode_blue_green.yml](.github/workflows/deploy_ensnode_blue_green.yml)`). Old schemas are orphaned on redeploy and must be dropped manually to reclaim space. | |
| Schema names are set via `ENSINDEXER_SCHEMA_NAME` env var in the blue-green deploy workflow (`[.github/workflows/deploy_ensnode_blue_green.yml](/.github/workflows/deploy_ensnode_blue_green.yml)`). Old schemas are orphaned on redeploy and must be dropped manually to reclaim space. |
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline code formatting is broken here due to mixing backticks and bold markers (e.g. `**pg_dump ...`**). Prefer either code formatting (backticks) or bold, but not both, so the command renders correctly in markdown.
| Use `**pg_dump --format=directory`** with `**--jobs=N`** for parallel dump/restore. This is the only format that supports parallelism, which is critical for 50-100GB databases. Each directory-format dump is then archived as a `**.dump.tar.zst`** artifact for storage and transfer, and unpacked to a temporary directory before restore. | |
| Use `pg_dump --format=directory` with `--jobs=N` for parallel dump/restore. This is the only format that supports parallelism, which is critical for 50-100GB databases. Each directory-format dump is then archived as a `.dump.tar.zst` artifact for storage and transfer, and unpacked to a temporary directory before restore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this object could just focus on presenting the config that influences indexing behaviour? For example, it could include just the following fields: namespace, plugins, indexedChainIds, isSubgraphCompatible, labelSet.
The goal here is to keep the indexingConfig data model immune to changes of the underlying EnsIndexerPublicConfig data model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could list which chain IDs have been present in RPC cache. What do you think?
Uh oh!
There was an error while loading. Please reload this page.