Context
When ligate-chain went through the v0.2.0 re-genesis on 2026-05-17, we discovered that the existing chain re-genesis runbook (ligate-chain/docs/development/runbooks/chain-id-bump.md) doesn't cover the api / indexer Postgres reset.
The chain wipe → restart → bootstrap-cli sequence worked, but the api kept serving stale state because:
- The api's
attestations table TRUNCATE migration only covers ONE table; the other 6 (slots, transactions, attestor_sets, schemas, address_summaries, indexer_state) keep their pre-wipe rows.
- The api's indexer cursor (
indexer_state.last_indexed_height) cached the pre-wipe height. After the chain re-genesised to height 0, the api still thought it was at height 30018 and stopped ingesting.
- Required intervention: manual
TRUNCATE on all 7 tables + Railway redeploy to clear the in-memory cursor.
What's needed in docs.ligate.io
A new operator runbook section (probably under nodes.mdx or a new operators/re-genesis.mdx) covering:
- When re-genesis happens (wire-format break, chain_hash change, state corruption recovery).
- What the chain side does (link to ligate-chain runbook).
- What the operator must ALSO do on the api side:
psql $DATABASE_URL -c "TRUNCATE TABLE slots, transactions, attestor_sets, schemas, attestations, address_summaries, indexer_state CASCADE;"
railway redeploy --service ligate-api to clear the in-memory cursor
- Verify
/v1/info shows indexer_height: 0 then growing
- Optional: if you want a TRULY clean restart (not re-process historical Celestia blobs), advance
genesis_da_height in devnet-1/celestia.toml past the prior chain's blob range, OR rotate to a new DA namespace.
Related
- chain re-genesis 2026-05-17 (we're tracking this in the ligate-chain repo's
chain-id-bump.md runbook as a sibling section)
- Audit-fix PR for docs:
ligate-io/docs#13
Priority
Important but not launch-blocking. File now so a future operator (or v0.3.0 re-genesis) doesn't relive this debugging session.
Context
When ligate-chain went through the v0.2.0 re-genesis on 2026-05-17, we discovered that the existing chain re-genesis runbook (
ligate-chain/docs/development/runbooks/chain-id-bump.md) doesn't cover the api / indexer Postgres reset.The chain wipe → restart → bootstrap-cli sequence worked, but the api kept serving stale state because:
attestationstable TRUNCATE migration only covers ONE table; the other 6 (slots,transactions,attestor_sets,schemas,address_summaries,indexer_state) keep their pre-wipe rows.indexer_state.last_indexed_height) cached the pre-wipe height. After the chain re-genesised to height 0, the api still thought it was at height 30018 and stopped ingesting.TRUNCATEon all 7 tables + Railwayredeployto clear the in-memory cursor.What's needed in docs.ligate.io
A new operator runbook section (probably under
nodes.mdxor a newoperators/re-genesis.mdx) covering:psql $DATABASE_URL -c "TRUNCATE TABLE slots, transactions, attestor_sets, schemas, attestations, address_summaries, indexer_state CASCADE;"railway redeploy --service ligate-apito clear the in-memory cursor/v1/infoshowsindexer_height: 0then growinggenesis_da_heightindevnet-1/celestia.tomlpast the prior chain's blob range, OR rotate to a new DA namespace.Related
chain-id-bump.mdrunbook as a sibling section)ligate-io/docs#13Priority
Important but not launch-blocking. File now so a future operator (or v0.3.0 re-genesis) doesn't relive this debugging session.