Repository navigation
Support Dijkstra blocks and move to node 11.1 - #9
Conversation
99ccfcb to
edb4250
Compare
edb4250 to
b935c93
Compare
ba17822 to
d1546fd
Compare
d1546fd to
52ae892
Compare
|
|
||
| checkSubTransactions = \case | ||
| BlockDijkstra (ShelleyBlock (Ledger.Block _ txs) _) -> | ||
| traverse_ rejectSubTransactions (txs ^. Ledger.txSeqBlockBodyL) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| :: block | ||
| -> Either UnsupportedSubTransactions () | ||
| checkSubTransactions _ = | ||
| Right () |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| :: block | ||
| -> Either UnsupportedSubTransactions () | ||
| checkSubTransactions _ = | ||
| Right () |
There was a problem hiding this comment.
Can we not have a default definition and explicitly define instances where appropriate?
There was a problem hiding this comment.
Each instance now defines it explicitly. Details are in the other thread on this line.
52ae892 to
66bab2d
Compare
66bab2d to
ca37014
Compare
ca37014 to
e495b4c
Compare
This PR is stacked on the GHC 9.12 PR and needs it to merge first.
What changes for users
nodeToClientVMinis raised to V23 to match.UnsupportedSubTransactionserror 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
flake.lockis 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.vector-map1.2.0.0 and the newernothunksboth defineNoThunks (VP.Vector e), so that stack no longer builds.contra-tracersnow comes from IntersectMBO/ogmios master at2f9b5d14d, 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-bech32now comes from Hackage, pinned at 1.0.1.withNumTestsinstead of the deprecatedwithMaxSuccess, which the newer QuickCheck requires.CI
Related