etch

作成者: convex-dev

Etchストアを検査および保守する — Convexのコンテンツアドレス型データベース。ピアストレージの調査、破損の診断、ガベージコレクションなどを行う際に使用します…

npx skills add https://github.com/convex-dev/convex --skill etch

Etch Store Operations

Etch is Convex's content-addressed store: values are keyed by hash, and a single root hash reaches everything retained. Peers keep their state here.

Every subcommand takes the store file with -e / --etch:

java -jar convex.jar etch info -e /path/to/store.etch

Inspecting

CommandPurpose
etch infoSummary of the database — start here
etch validateCheck store integrity; -m/--max-failures N to bound reporting
etch dumpExport contents, CSV by default (value ID, type, memory size, encoding)
etch read <hash>...Read specific values by hash; --limit N to cap output

info, dump and read take -o / --output-file to write to a file rather than the terminal — use it for dump on any real store, which is large.

Start a diagnosis with info, then validate. If validation reports failures, capture the output before doing anything that mutates the store.

Maintenance

These modify or destroy data. Confirm with the user, and make sure the peer using the store is stopped first — operating on a live store risks corruption.

CommandEffect
etch gcGarbage collect: retains the root and everything reachable, discards the rest. In-place by default; -o/--output <file> collects into a fresh file instead
etch clearClears the root data. Does not collect garbage
etch migrate --into <dest>Copy everything into another store; --set-root to set the destination root
etch repair --into <dest>Reconstruct a fresh store from independently validated cells; source unchanged
etch recoverAdopt a completed GC cutover and roll forward — for a store interrupted mid-GC
etch write -c/--cvx <source>Write a CVM value into the store

To compact safely, prefer gc -o <new-file>: it collects into a fresh file and leaves the source unmodified (note: status levels above PERSISTED, e.g. ANNOUNCED, survive an in-place GC but not --output). Use migrate to copy into another (possibly non-empty) store, or to change the store's format version or encryption — see below.

repair is the offline salvage path for a dirty or damaged source. It holds an exclusive source lock, scans through physical EOF, and writes only canonical CAD3 values whose stored content hashes verify. A complete result requires both a fully persisted selected root and an exhaustive scan. If either condition fails, the command reports failure but may leave a valid partial destination; never replace the source with that output automatically.

Recovering an interrupted GC is what recover is for — reach for it before concluding a store is lost.

Encrypted Stores (Etch v3)

Etch format v3 supports encrypted stores — format spec in convex-core/docs/ETCHv3.md.

Opening an encrypted store: any etch subcommand takes --etch-key <alias> (keystore key alias or public-key prefix, password via --etch-keypass) or --etch-key-file <file> (raw or hex 32-byte master key; - reads stdin). With neither, the v3 header's public-key hint selects a keystore key automatically, or an interactive session prompts for a hex key.

Converting a store: etch migrate (and gc -o) accept destination options — --into-version (1, 2 or 3), --into-cipher (none, aes-256-ctr or chacha20), --into-key / --into-key-file / --into-keypass for the destination key, --into-encrypt-index (negatable) and --into-public-key-hint. Encryption options require version 3; without a destination key the resolved source key is reused.

convex-devのその他のスキル

account
convex-dev
Convexアカウントを作成または確認します。ユーザーが新しいアカウントを設定したい場合、アカウントの詳細を確認したい場合、またはキーを管理したい場合に使用します。
account
convex-dev
Convexアカウントを作成または確認します。ユーザーが新しいアカウントを設定したい場合、アカウントの詳細を確認したい場合、またはキーを管理したい場合に使用します。
token
convex-dev
Convex上で代替可能トークンを作成・管理します。ユーザーが新しいトークンの作成、トークン残高の確認、またはトークン供給量の管理を希望する場合に使用します。
build-convex
convex-dev
Convexプロジェクトをソースからビルドします。コントリビューターがConvexをコンパイル、テスト、またはパッケージ化したい場合に使用します。
convex-db
convex-dev
Convex DB(ラティスベースのSQLデータベース)を使用します。ユーザーがクエリの作成、JDBCまたはPostgreSQLクライアント経由の接続、テーブルの作成、データの挿入・クエリを行う際に役立ちます、…
convex-lisp
convex-dev
Convex Lisp言語リファレンス — CVMの規約、ライブラリコードの呼び出し、アクター定義、ジュースとエラーコード。CVMソースの作成やデバッグ時に使用。
deploy
convex-dev
アクター(スマートコントラクト)をConvexネットワークにデプロイします。エクスポートされた関数を持つ新しいオンチェーンアクターを作成したい場合に使用します。
ecosystem
convex-dev
Convexエコシステムにおけるオリエンテーション — どのリポジトリに何が含まれているか、仕様書とドキュメントがどこにあるか、どのクライアントライブラリが存在するか。コンテキストが必要なときに使用します…