Consolidate Unreleased entries for open PRs - #2173
Conversation
Consolidating the four cardano-db-tool PRs - merge planDate: 2026-07-16 The PRs
Merge feasibility (measured with
|
| File | PRs | Why it's clean |
|---|---|---|
| cardano-db-tool/.../Validate/BlockTxs.hs | #2171 + #2168 | #2171 edits validateBlockCount (count by id); #2168 edits the reporting branch of validateBlockTxs (error-based). Disjoint regions; merged file drops the now-unused forM_/when import. SEMANTIC: must compile - validated by the build. |
| cardano-db-tool/.../UtxoSet.hs | #2168 + #2169 | #2168 changes reportSlotDate (displayException); #2169 fixes the paritioning typo. Disjoint lines. |
| cardano-db/.../Statement/DbTool.hs | #2166 + #2171 | #2166 edits queryUtxoAtBlockId decoders; #2171 edits queryEpochBlockNumbers. Disjoint functions. |
| cardano-db/cardano-db.cabal, test/test-db.hs | #2166 + #2171 | Additive test-module registrations (TxOutQuery, EpochBlockTxs). #2168 adds ErrorRender to the separate test suite. |
Recommended strategy
- Base the consolidation branch on origin/master (
a379e68d) - the realistic
integration target; the extra commits over the shared base are doc/config only and do
not touch db-tool. - Merge the four branches sequentially with
--no-ff, in a coherent order:
Fix consume id in tx_out queries that select txout.* #2166 (decoder) -> Count epoch block txs by id and clamp block-range sampling #2171 (check bugs) -> Isolate validate checks and render errors cleanly #2168 (isolation) -> Align report tables, format timestamps, and fix help typos #2169 (cosmetics).
Order is not forced by conflicts (there are none); it just tells a clean story and layers
Count epoch block txs by id and clamp block-range sampling #2171 then Isolate validate checks and render errors cleanly #2168 ontoBlockTxs.hslogically. - Because textual conflicts are nil, the only real risk is compile/semantic - covered
by building everything (cabal build cardano-db cardano-db-tool cardano-db-sync+
the test suites) under-Werror.
What conflicts have to be resolved
None at the text level. The single thing to verify by hand is that the auto-merged
BlockTxs.hs compiles: it must end up with #2168's error-based reporting AND #2171's
validateBlockCount (BlockId, blockNo, expected) + queryEpochBlockNumbers returning the
BlockId, with no leftover forM_/when import. If the build flags anything there, that is
the one place to touch.
Expected end-to-end payoff
A single validate over a real DB that no individual branch can produce: every check runs
(isolation, #2168), decoding is correct (#2166 -> TxAccounting/TotalSupply ok), and
EpochBlockTxs reports ok instead of thousands of false mismatches (#2171). Plus aligned
report tables with clean timestamps (#2169) against a freshly-synced cluster.
Consolidated cardano-db-tool fixes (#2166 + #2171 + #2168 + #2169) - end-to-end test resultsDate: 2026-07-16 Format: database (full name) / blank / full command / blank / raw output (ANSI stripped). NOTE on the cluster db-sync: the plan was to drive the fresh /cnt cluster with a UNIT TESTS (consolidated branch)(no DB) cardano-db-tool:test [#2169 Report.Display] cardano-db-tool (no DB) cardano-db:test [#2168 ErrorRender + property suite] Test.Property.Cardano.Db.ErrorRender testing (local IO test DB) cardano-db:test-db -p "/TxOutQuery/ || /EpochBlockTxs/" [#2166 + #2171] Database REAL DATABASESpreprod-dbsync-13.7.2.1-node-11.0.1 PGPASSFILE=config/pgpass-preprod cardano-db-tool validate All pools have owners : ok EXIT=1 PAYOFF: TxAccounting ok (decoder, #2166), EpochBlockTxs ok with ZERO false preview-dbsync-13.7.2.1-node-11.0.1 PGPASSFILE=config/pgpass-preview cardano-db-tool validate All pools have owners : ok EXIT=1 Same as preprod: TxAccounting ok, EpochBlockTxs ok (0 false mismatches), preprod-dbsync-13.7.2.1-node-11.0.1 PGPASSFILE=config/pgpass-preprod cardano-db-tool utxo-set --slot-no 185480 Genesis supply: 30000000000 Ada EXIT=0 preprod-dbsync-13.7.2.1-node-11.0.1 PGPASSFILE=config/pgpass-preprod cardano-db-tool utxo-set --slot-no 999999999 Slot not found for slot_no: 999999999 EXIT=0 FRESH /cnt CLUSTER (live cardonnay localnet; consolidated db-TOOL vs the cluster DB)dbsync0 (cardonnay cluster, localhost:55432; 1914 blocks) PGPASSFILE=/pgpass cardano-db-tool validate All pools have owners : Failed, 3 pools are without owners. EXIT=1 Bug 2 FIXED (#2171): block-property ranges are [0 .. 1914] (clamped to the real dbsync0_clusterreport (pg_dump clone of the cluster DB, tip bumped to now so the report sync-guard passes; original cluster untouched) PGPASSFILE= cardano-db-tool report balance --stake-address <3 addrs> stake_address | balance
-----------------------------------------------------------------+---------------
stake_test1upxpaf4xmxq4fjnudj4ew0zupp5g4yewuvscr7de8fm3p3cy6uvtf | 1000771.170429
stake_test1up5rtsd2hxchqurdnl6up9fduc6l0pac78k5m9feemf43gsgfkvzh | 500000.000000
stake_test1up7dmkq9nntl84lzl2an85sxuh2levpz7lura42yxtxjj6swgmgg7 | 500000.000000
-----------------------------------------------------------------+---------------
total | 2000771.170429EXIT=0 dbsync0_clusterreport PGPASSFILE= cardano-db-tool report rewards latest --stake-address epoch | stake_address | delegated | pool_id | ticker | reward | RoS (%pa)
------+------------------------------------------------------------------+----------------+---------+--------+-------------+----------
17 | stake_test1uq38rj9hwuff97s6m3jfwqfge4q5wjtq2uyq9sz3r237kdqdw5sr3 | 3506106.755704 | 3 | ??? | 1900.383825 | 3.959EXIT=0 dbsync0_clusterreport PGPASSFILE= cardano-db-tool report transactions --stake-address stake_test1up5rtsd2hxchqurdnl6up9fduc6l0pac78k5m9feemf43gsgfkvzh Transactions for: stake_test1up5rtsd2hxchqurdnl6up9fduc6l0pac78k5m9feemf43gsgfkvzh tx_hash | date/time | direction | amount
-----------------------------------------------------------------+-------------------------+-----------+--------------
d351cae7940985d913905789d1fa80848289a035150a6fde67371f77a454e771 | 2026-07-16 18:07:15 UTC | Incoming | 500000.000000EXIT=0 SUMMARY
CONCLUSION: the four cardano-db-tool PRs combine cleanly, build under -Werror, and |
34c22c5 to
f3cc8b1
Compare
Collects the CHANGELOG entries for the currently-open fix/doc PRs into a single place so the individual PRs no longer touch CHANGELOG.md and stop conflicting with each other on merge. Covers #1966 (vote child rows and DRep image), #1729, value-domain schema checks, #2155, and the cardano-db-tool fixes #2163/#2164/#2170. Merge this last, once the referenced PRs have landed.
f3cc8b1 to
fcc9d77
Compare
Collects the CHANGELOG entries for the currently-open fix/doc PRs into one place, so those PRs no longer touch
CHANGELOG.mdand stop conflicting with each other on merge.The CHANGELOG entry has been removed from each of the following PRs; their entries now live here instead:
epoch_staterows (#2155)utxo-set/validateRowErrorcrashvalidateruns all checks + clean errors (#2163)reportcosmetics (#2164)validatecheck bugs (#2170)Merge this last, once the referenced PRs have landed, so each entry describes code already in master. The feature PRs can now merge in any order without CHANGELOG conflicts.
(#2138 already merged, so its entry is in master already; #2146 intentionally has no changelog entry.)