From e34416a2893ce768c82bf9130a273f3357769c72 Mon Sep 17 00:00:00 2001 From: sds <677877+sds@users.noreply.github.com> Date: Thu, 3 Sep 2026 04:41:46 +0000 Subject: [PATCH] chore: release `tidx@1.0.0` --- .changelog/archive-first-tiered-sync.md | 5 -- .changelog/clickhouse-access-paths.md | 5 -- .changelog/clickhouse-replicated-database.md | 5 -- .../clickhouse-timeout-classification.md | 5 -- .changelog/dex-ohlc.md | 5 -- .changelog/fix-clickhouse-duplicate-writes.md | 5 -- .changelog/fix-clickhouse-union-order-by.md | 5 -- .../increase-query-concurrency-limit.md | 5 -- .changelog/postgres-config-section.md | 22 ------- .changelog/postgres-head-page-sort-indexes.md | 5 -- .changelog/postgres-log-query-indexes.md | 5 -- .changelog/postgres-query-error-detail.md | 5 -- .changelog/t6-receive-policies.md | 5 -- .changelog/tiered-hot-arm-fallback.md | 5 -- .changelog/tiered-storage.md | 19 ------ .changelog/unsigned-holder-balance-deltas.md | 5 -- CHANGELOG.md | 58 +++++++++++++++++++ Cargo.toml | 2 +- 18 files changed, 59 insertions(+), 112 deletions(-) delete mode 100644 .changelog/archive-first-tiered-sync.md delete mode 100644 .changelog/clickhouse-access-paths.md delete mode 100644 .changelog/clickhouse-replicated-database.md delete mode 100644 .changelog/clickhouse-timeout-classification.md delete mode 100644 .changelog/dex-ohlc.md delete mode 100644 .changelog/fix-clickhouse-duplicate-writes.md delete mode 100644 .changelog/fix-clickhouse-union-order-by.md delete mode 100644 .changelog/increase-query-concurrency-limit.md delete mode 100644 .changelog/postgres-config-section.md delete mode 100644 .changelog/postgres-head-page-sort-indexes.md delete mode 100644 .changelog/postgres-log-query-indexes.md delete mode 100644 .changelog/postgres-query-error-detail.md delete mode 100644 .changelog/t6-receive-policies.md delete mode 100644 .changelog/tiered-hot-arm-fallback.md delete mode 100644 .changelog/tiered-storage.md delete mode 100644 .changelog/unsigned-holder-balance-deltas.md diff --git a/.changelog/archive-first-tiered-sync.md b/.changelog/archive-first-tiered-sync.md deleted file mode 100644 index e34b681..0000000 --- a/.changelog/archive-first-tiered-sync.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: minor ---- - -Changed tiered-storage backfill to write full history directly from RPC to ClickHouse, then hydrate PostgreSQL's configured hot window from checkpointed ClickHouse archive ranges. PostgreSQL storage is now bounded during initial sync, historical RPC work is not duplicated, and increasing `pg_keep` restores the additional hot range before moving the query boundary. diff --git a/.changelog/clickhouse-access-paths.md b/.changelog/clickhouse-access-paths.md deleted file mode 100644 index 04b7bfe..0000000 --- a/.changelog/clickhouse-access-paths.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Added ClickHouse projections and bloom filters for common block, log, receipt, and transaction access paths, requiring ClickHouse 25.11 or newer. diff --git a/.changelog/clickhouse-replicated-database.md b/.changelog/clickhouse-replicated-database.md deleted file mode 100644 index 4d7679e..0000000 --- a/.changelog/clickhouse-replicated-database.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Added `replicated_database` option under `[chains.clickhouse]`. When enabled, the sink creates the database with `ENGINE = Replicated` and rewrites MergeTree-family table engines to their `Replicated*` counterparts, so schema and data replicate across self-hosted multi-replica clusters coordinated by Keeper. Defaults to off; ClickHouse Cloud and single-node deployments are unaffected. diff --git a/.changelog/clickhouse-timeout-classification.md b/.changelog/clickhouse-timeout-classification.md deleted file mode 100644 index 3583637..0000000 --- a/.changelog/clickhouse-timeout-classification.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Fixed ClickHouse failover classification so client timeouts stop immediately while non-timeout transport and protocol failures try a healthy secondary. diff --git a/.changelog/dex-ohlc.md b/.changelog/dex-ohlc.md deleted file mode 100644 index 2676e6c..0000000 --- a/.changelog/dex-ohlc.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: minor ---- - -Added `dex_ohlc_1m`, a refreshable ClickHouse materialized view that rolls `dex_fills` into per-minute OHLC candles keyed by `(token, bucket)`, removing the 1000-fill in-memory bucketing cap on the OHLC endpoint and enabling multi-month windows with the work moved off the request path. diff --git a/.changelog/fix-clickhouse-duplicate-writes.md b/.changelog/fix-clickhouse-duplicate-writes.md deleted file mode 100644 index b910d49..0000000 --- a/.changelog/fix-clickhouse-duplicate-writes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Fixed duplicate, stale, or missing ClickHouse rows across retries, reorgs, partial writes, and startup backfills using bounded canonical-row repair, fresh deduplication generations, and durable handoffs. diff --git a/.changelog/fix-clickhouse-union-order-by.md b/.changelog/fix-clickhouse-union-order-by.md deleted file mode 100644 index e1caac3..0000000 --- a/.changelog/fix-clickhouse-union-order-by.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Fixed ClickHouse set operations with trailing ordering or limits, including case-insensitive aliases and unresolved compound outputs, by hoisting clauses into a derived-table wrapper. diff --git a/.changelog/increase-query-concurrency-limit.md b/.changelog/increase-query-concurrency-limit.md deleted file mode 100644 index 2b2413c..0000000 --- a/.changelog/increase-query-concurrency-limit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Raised the public `/query` concurrency limit from eight to 32 requests. diff --git a/.changelog/postgres-config-section.md b/.changelog/postgres-config-section.md deleted file mode 100644 index bb1db58..0000000 --- a/.changelog/postgres-config-section.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -tidx: major ---- - -**Breaking:** Moved PostgreSQL chain settings into a nested `[chains.postgres]` section (`url`, `password_env`, `api_url`, `api_password_env`), removing the root-level `pg_url`, `pg_password_env`, `api_pg_url`, and `api_pg_password_env` fields. - -```diff - [[chains]] - name = "mainnet" - chain_id = 4217 - rpc_url = "https://rpc.tempo.xyz" --pg_url = "postgres://user@host:5432/tidx_mainnet" --pg_password_env = "TIDX_PG_PASSWORD" --api_pg_url = "postgres://user@host:5432/tidx_mainnet_r" --api_pg_password_env = "TIDX_API_PG_PASSWORD" -+ -+[chains.postgres] -+url = "postgres://user@host:5432/tidx_mainnet" -+password_env = "TIDX_PG_PASSWORD" -+api_url = "postgres://user@host:5432/tidx_mainnet_r" -+api_password_env = "TIDX_API_PG_PASSWORD" -``` diff --git a/.changelog/postgres-head-page-sort-indexes.md b/.changelog/postgres-head-page-sort-indexes.md deleted file mode 100644 index 6f81b14..0000000 --- a/.changelog/postgres-head-page-sort-indexes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Added PostgreSQL head-page indexes for sender, fee payer, and indexed-address lookups, built concurrently per partition with interrupted-build recovery. diff --git a/.changelog/postgres-log-query-indexes.md b/.changelog/postgres-log-query-indexes.md deleted file mode 100644 index 2805c1d..0000000 --- a/.changelog/postgres-log-query-indexes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Added PostgreSQL log indexes for contract event history and indexed-address lookups, built concurrently per partition with interrupted-build recovery. diff --git a/.changelog/postgres-query-error-detail.md b/.changelog/postgres-query-error-detail.md deleted file mode 100644 index 1009afa..0000000 --- a/.changelog/postgres-query-error-detail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Fixed `/query` errors flattening PostgreSQL failures to `db error`; the server message and SQLSTATE code (e.g. `division by zero (22012)`) now surface, and statement timeouts classify as timeouts. diff --git a/.changelog/t6-receive-policies.md b/.changelog/t6-receive-policies.md deleted file mode 100644 index 792807a..0000000 --- a/.changelog/t6-receive-policies.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: minor ---- - -Added support for the Tempo T6 network upgrade (TIP-1028 receive policies, TIP-1049 admin keys). Excluded the `ReceivePolicyGuard` precompile (`0xb10c...`) from holder/balance derivation so blocked transfers no longer credit the guard as a fake holder, while leaving raw `token_transfers`/`token_supply` movement intact. Added a one-time post-derived migration that deletes any pre-existing guard rows from `token_holder_deltas`/`address_holder_deltas` (a no-op on fresh deployments) so historical balances and refreshable holder aggregates stop counting the guard. Pinned the Tempo crates to the T6 release commit. diff --git a/.changelog/tiered-hot-arm-fallback.md b/.changelog/tiered-hot-arm-fallback.md deleted file mode 100644 index 06a133d..0000000 --- a/.changelog/tiered-hot-arm-fallback.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Fixed tiered split queries erroring on PostgreSQL availability failures; they now degrade to the full-history ClickHouse archive while preserving PostgreSQL semantic errors. diff --git a/.changelog/tiered-storage.md b/.changelog/tiered-storage.md deleted file mode 100644 index 9daeb16..0000000 --- a/.changelog/tiered-storage.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -tidx: minor ---- - -Added tiered storage: with `[chains.retention]`, PostgreSQL keeps a hot window of recent blocks and prunes the rest once durable in the ClickHouse archive. - -```diff - [[chains]] - name = "mainnet" - chain_id = 4217 - rpc_url = "https://rpc.tempo.xyz" - - [chains.clickhouse] - enabled = true - url = "http://clickhouse:8123" -+ -+[chains.retention] -+pg_keep = "30d" -``` diff --git a/.changelog/unsigned-holder-balance-deltas.md b/.changelog/unsigned-holder-balance-deltas.md deleted file mode 100644 index 4f6536e..0000000 --- a/.changelog/unsigned-holder-balance-deltas.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tidx: patch ---- - -Stored holder balance deltas as unsigned `UInt256` magnitude with the sign carried in `leg`. diff --git a/CHANGELOG.md b/CHANGELOG.md index a21f716..6013f85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Changelog +## `tidx@1.0.0` + +### Major Changes + +**Breaking:** Moved PostgreSQL chain settings into a nested `[chains.postgres]` section (`url`, `password_env`, `api_url`, `api_password_env`), removing the root-level `pg_url`, `pg_password_env`, `api_pg_url`, and `api_pg_password_env` fields. + ```diff + [[chains]] + name = "mainnet" + chain_id = 4217 + rpc_url = "https://rpc.tempo.xyz" + -pg_url = "postgres://user@host:5432/tidx_mainnet" + -pg_password_env = "TIDX_PG_PASSWORD" + -api_pg_url = "postgres://user@host:5432/tidx_mainnet_r" + -api_pg_password_env = "TIDX_API_PG_PASSWORD" + + + +[chains.postgres] + +url = "postgres://user@host:5432/tidx_mainnet" + +password_env = "TIDX_PG_PASSWORD" + +api_url = "postgres://user@host:5432/tidx_mainnet_r" + +api_password_env = "TIDX_API_PG_PASSWORD" + ``` + (by @jxom, [#254](https://github.com/tempoxyz/tidx/pull/254)) + +### Minor Changes + +- Changed tiered-storage backfill to write full history directly from RPC to ClickHouse, then hydrate PostgreSQL's configured hot window from checkpointed ClickHouse archive ranges. PostgreSQL storage is now bounded during initial sync, historical RPC work is not duplicated, and increasing `pg_keep` restores the additional hot range before moving the query boundary. (by @KamilSzczygieł, [#261](https://github.com/tempoxyz/tidx/pull/261)) +- Added `dex_ohlc_1m`, a refreshable ClickHouse materialized view that rolls `dex_fills` into per-minute OHLC candles keyed by `(token, bucket)`, removing the 1000-fill in-memory bucketing cap on the OHLC endpoint and enabling multi-month windows with the work moved off the request path. (by @jxom, [#228](https://github.com/tempoxyz/tidx/pull/228)) +- Added support for the Tempo T6 network upgrade (TIP-1028 receive policies, TIP-1049 admin keys). Excluded the `ReceivePolicyGuard` precompile (`0xb10c...`) from holder/balance derivation so blocked transfers no longer credit the guard as a fake holder, while leaving raw `token_transfers`/`token_supply` movement intact. Added a one-time post-derived migration that deletes any pre-existing guard rows from `token_holder_deltas`/`address_holder_deltas` (a no-op on fresh deployments) so historical balances and refreshable holder aggregates stop counting the guard. Pinned the Tempo crates to the T6 release commit. (by @stevencartavia, [#244](https://github.com/tempoxyz/tidx/pull/244)) +- Added tiered storage: with `[chains.retention]`, PostgreSQL keeps a hot window of recent blocks and prunes the rest once durable in the ClickHouse archive. + ```diff + [[chains]] + name = "mainnet" + chain_id = 4217 + rpc_url = "https://rpc.tempo.xyz" + + [chains.clickhouse] + enabled = true + url = "http://clickhouse:8123" + + + +[chains.retention] + +pg_keep = "30d" + ``` + (by @jxom, [#254](https://github.com/tempoxyz/tidx/pull/254)) + +### Patch Changes + +- Added ClickHouse projections and bloom filters for common block, log, receipt, and transaction access paths, requiring ClickHouse 25.11 or newer. (by @jxom, [#297](https://github.com/tempoxyz/tidx/pull/297)) +- Added `replicated_database` option under `[chains.clickhouse]`. When enabled, the sink creates the database with `ENGINE = Replicated` and rewrites MergeTree-family table engines to their `Replicated*` counterparts, so schema and data replicate across self-hosted multi-replica clusters coordinated by Keeper. Defaults to off; ClickHouse Cloud and single-node deployments are unaffected. (by @KamilSzczygieł, [#252](https://github.com/tempoxyz/tidx/pull/252)) +- Fixed ClickHouse failover classification so client timeouts stop immediately while non-timeout transport and protocol failures try a healthy secondary. (by @jxom, [#287](https://github.com/tempoxyz/tidx/pull/287)) +- Fixed duplicate, stale, or missing ClickHouse rows across retries, reorgs, partial writes, and startup backfills using bounded canonical-row repair, fresh deduplication generations, and durable handoffs. (by @jxom, [#280](https://github.com/tempoxyz/tidx/pull/280)) +- Fixed ClickHouse set operations with trailing ordering or limits, including case-insensitive aliases and unresolved compound outputs, by hoisting clauses into a derived-table wrapper. (by @jxom, [#285](https://github.com/tempoxyz/tidx/pull/285)) +- Raised the public `/query` concurrency limit from eight to 32 requests. (by @jxom, [#299](https://github.com/tempoxyz/tidx/pull/299)) +- Added PostgreSQL head-page indexes for sender, fee payer, and indexed-address lookups, built concurrently per partition with interrupted-build recovery. (by @jxom, [#288](https://github.com/tempoxyz/tidx/pull/288)) +- Added PostgreSQL log indexes for contract event history and indexed-address lookups, built concurrently per partition with interrupted-build recovery. (by @jxom, [#282](https://github.com/tempoxyz/tidx/pull/282)) +- Fixed `/query` errors flattening PostgreSQL failures to `db error`; the server message and SQLSTATE code (e.g. `division by zero (22012)`) now surface, and statement timeouts classify as timeouts. (by @jxom, [#284](https://github.com/tempoxyz/tidx/pull/284)) +- Fixed tiered split queries erroring on PostgreSQL availability failures; they now degrade to the full-history ClickHouse archive while preserving PostgreSQL semantic errors. (by @jxom, [#286](https://github.com/tempoxyz/tidx/pull/286)) +- Stored holder balance deltas as unsigned `UInt256` magnitude with the sign carried in `leg`. (by @jxom, [#247](https://github.com/tempoxyz/tidx/pull/247)) + ## `tidx@0.7.0` ### Minor Changes diff --git a/Cargo.toml b/Cargo.toml index 97d0844..cc5329f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tidx" -version = "0.7.0" +version = "1.0.0" edition = "2024" license = "MIT" repository = "https://github.com/tempoxyz/tidx"