Skip to content

Support Dijkstra blocks and move to node 11.1 - #9

Merged
carbolymer merged 1 commit into
masterfrom
mgalazyn/chore/bump-cardano-deps
Nov 6, 2026
Merged

carbolymer merged 1 commit into
masterfrom
mgalazyn/chore/bump-cardano-deps

Conversation

@carbolymer

@carbolymer carbolymer commented Oct 27, 2026 •

Copy link
Copy Markdown

This PR is stacked on the GHC 9.12 PR and needs it to merge first.

What changes for users

  • Kupo now needs cardano-node 11.1 or newer. ouroboros-network 2.0 only speaks node-to-client V23, so nodeToClientVMin is raised to V23 to match.
  • Kupo now indexes Dijkstra blocks. Before this change, it stopped with an error on the first one.
  • Kupo does not index a Dijkstra transaction that carries sub-transactions yet. It stops with a typed UnsupportedSubTransactions error that names the transaction, rather than silently dropping the inputs and outputs of its sub-transactions. The metadata endpoint fails that request with the same error. How to number sub-transactions in the index is still undecided.

Dependencies

  • The Hackage index-state moves to 2026-10-23, and the CHaP index-state to 2026-10-30. The CHaP input in flake.lock is bumped to match. The solver picks cardano-ledger-conway 1.24, cardano-ledger-dijkstra 0.4, ouroboros-consensus 5.3.0.0, ouroboros-network 2.0.0.0 and cardano-diffusion 1.3.0.1.
  • The Hackage bump also forces the move off the old cardano stack. On GHC 9.12, vector-map 1.2.0.0 and the newer nothunks both define NoThunks (VP.Vector e), so that stack no longer builds.
  • contra-tracers now comes from IntersectMBO/ogmios master at 2f9b5d14d, which includes the PR below. Only its unpublished contra-tracers 1.0.1 builds against contra-tracer 0.2, which ouroboros-consensus 4.0 and later requires.
  • fast-bech32 now comes from Hackage, pinned at 1.0.1.
  • The unit tests use QuickCheck's withNumTests instead of the deprecated withMaxSuccess, which the newer QuickCheck requires.

CI

  • The integration test now runs against cardano-node 11.1.3 instead of 11.0.1.

Related

@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch from 99ccfcb to edb4250 Compare November 3, 2026 13:54
@carbolymer carbolymer changed the title Bump GHC to 9.12 and update cardano deps Support Dijkstra blocks and move to GHC 9.12 and node 11.1 Nov 3, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch from edb4250 to b935c93 Compare November 3, 2026 16:12
@carbolymer carbolymer mentioned this pull request Nov 3, 2026
@carbolymer carbolymer changed the title Support Dijkstra blocks and move to GHC 9.12 and node 11.1 Support Dijkstra blocks and move to node 11.1 Nov 3, 2026
@carbolymer
carbolymer changed the base branch from master to mgalazyn/chore/ghc-9.12 November 3, 2026 16:13
@carbolymer
carbolymer added this pull request to stack #11 November 3, 2026 16:15
@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch 2 times, most recently from ba17822 to d1546fd Compare November 3, 2026 18:49
@carbolymer
carbolymer marked this pull request as ready for review November 3, 2026 18:52
@carbolymer carbolymer self-assigned this Nov 3, 2026
@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch from d1546fd to 52ae892 Compare November 4, 2026 09:22

@Jimbo4350 Jimbo4350 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM a couple of comments

Comment thread src/Kupo/Data/Cardano.hs

checkSubTransactions = \case
BlockDijkstra (ShelleyBlock (Ledger.Block _ txs) _) ->
traverse_ rejectSubTransactions (txs ^. Ledger.txSeqBlockBodyL)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a follow up PR can you propose how to store and access sub transactions in the database? Have a look at other indexers to get an idea of how the community may want to retrieve these from said indexers.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened a spike for this. It collects the requirements for storing and querying sub-transactions, and includes a look at how other indexers expose them.

Comment thread src/Kupo/Data/Cardano.hs Outdated
:: block
-> Either UnsupportedSubTransactions ()
checkSubTransactions _ =
Right ()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove the default implementation and require each IsBlock instance to implement this explicitly? Right () reports success without inspecting the block, so an instance that omits the method silently bypasses the check. PartialBlock currently inherits this default, and the Ogmios decoder neither rejects nor preserves sub-transactions. We should also validate those during decoding, before that information is discarded; removing the default alone would not close that gap.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is gone, and every IsBlock instance now defines checkSubTransactions. There is nothing to validate in the Ogmios JSON yet, because Ogmios does not serialise Dijkstra transactions. It sends only their id and spends, so sub-transactions never reach Kupo.

decodeBlock now reads the block's era. For a Dijkstra block, the PartialBlock check fails with the new UnverifiableSubTransactions error, so Kupo stops with a message pointing to a direct cardano-node connection instead of indexing empty transactions. Hydra decodes Conway transactions only, so it cannot carry sub-transactions.

Once Ogmios encodes Dijkstra transactions in full, the decoder can check the sub-transactions themselves.

Comment thread src/Kupo/Data/Cardano.hs Outdated
:: block
-> Either UnsupportedSubTransactions ()
checkSubTransactions _ =
Right ()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not have a default definition and explicitly define instances where appropriate?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each instance now defines it explicitly. Details are in the other thread on this line.

Base automatically changed from mgalazyn/chore/ghc-9.12 to master November 5, 2026 18:15
@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch from 52ae892 to 66bab2d Compare November 5, 2026 18:15
@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch from 66bab2d to ca37014 Compare November 6, 2026 14:04
@carbolymer
carbolymer force-pushed the mgalazyn/chore/bump-cardano-deps branch from ca37014 to e495b4c Compare November 6, 2026 14:05
@carbolymer
carbolymer merged commit bdb4497 into master Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants