Skip to content

v0.7.2

Choose a tag to compare

@github-actions github-actions released this 17 Aug 05:00
· 591 commits to main since this release

v0.7.2 adds an exact live-cell inventory API, makes shallow-reorg rollback proportional to affected chain data, corrects the DAO treasury partition, and updates USDI metadata.

This release includes 13 commits across 57 files.

Highlights

Exact live-cell inventory

The new GET /api/v1/cells/live-summary endpoint exposes an exact block-end inventory of CKB's live cells:

  • liveCells, derived as the checked sum of three mutually exclusive classes: dao, typedNonDao, and plain
  • dataBearing, an orthogonal count of cells with non-empty data
  • A canonical tip.block and tip.hash that consumers can verify against their local CKB node

The indexer maintains these counters incrementally across live sync, bulk build, and shallow reorgs. The API performs a fixed number of point reads instead of scanning cells, and returns 503 initializing while the first snapshot is being built or a reorg is being reconciled rather than returning stale or default data.

All new persistent writes target the mutable domain store. The append-only CF_CELLS store is unchanged.

Bounded shallow-reorg rollback

Rollback no longer performs several chain-sized scans for a small fork:

  • Address transaction rows are derived from rolled-back transaction contexts instead of scanning the entire addr_txs column family. On the observed testnet failure, the old path scanned 641 million keys and took roughly 170 seconds to delete one row.
  • Token-transfer cleanup now seeks only the type hashes touched by the rolled-back range.
  • Statistics cleanup now seeks only replay-scoped key families.
  • The parser's unresolved-input retry budget pauses while rollback owns the writer, preventing an expected temporary unresolved state from terminating the pipeline.

Regression tests pin the bounded read counts so these scans cannot silently become chain-sized again.

Exact DAO treasury and compensation partition

Treasury now subtracts all exact unclaimed DAO compensation, including compensation frozen on phase-1 withdraw-request cells. This removes a 77,489,937.99 CKB overlap where the same phase-1 amount appeared in both compensation and treasury.

Daily DAO snapshots now materialize exact phase-1 compensation. /api/v1/charts/secondary-issuance exposes protocolTotalShannons and phase1CompensationShannons, allowing verification to normalize the official Explorer's legacy overlapping partition without rescanning DAO lifecycles or widening tolerances.

Metadata and maintenance

  • Corrected the testnet USDI deployment to use its dedicated six-decimal, xUDT-compatible metadata and added the issuer icon. A regression test pins the deployment type hash and imported values.
  • Hardened CI path filtering and pnpm caching, updated clippy-compatible sort expressions for Rust 1.97, and made CLI path tests portable across runner environments.

Upgrade notes

Important

A full re-sync from genesis is required. v0.7.2 adds the live-cell summary state and extends persisted DAO daily snapshots in the domain store. Do not reuse a v0.7.1 domain database. The append-only cell-payload store format is unchanged.

Stop ckbadger, purge the affected RocksDB data or initialize a fresh work directory, then start v0.7.2 and allow each configured network to sync from genesis.

Contributors

  • @yixyxiu made their first contribution in #12, correcting the bundled USDI metadata.

Full changelog: v0.7.1...v0.7.2