Skip to content

Dijkstra integration#2

Draft
johnalotoski wants to merge 11 commits into
setup-for-hydrafrom
jmillar/dijkstra-integration
Draft

Dijkstra integration#2
johnalotoski wants to merge 11 commits into
setup-for-hydrafrom
jmillar/dijkstra-integration

Conversation

@johnalotoski
Copy link
Copy Markdown

  • WIP

johnalotoski and others added 11 commits May 26, 2026 21:08
Update cabal.project constraints and index-state for cardano-node
11.0.1 (ouroboros-consensus 3.0.1, cardano-ledger-conway >= 1.22.1).
Pin validation < 1.2 to avoid breaking API change. Update ogmios
source-repository-package to rebased node-11.0 branch. Bump
dependency bounds in package.yaml.

Co-Authored-By: Claude <noreply@anthropic.com>
Add BlockDijkstra and DijkstraEra pattern matches across block
processing, scripts, transactions, and Hydra/Ogmios modules. Dijkstra
transactions are coerced to Conway at the block-processing boundary
since the types are representationally identical. Replace unsafeCoerce
in Metadata era translation with explicit pattern match and
translateTimelock. Update Prelude era list and codec config.

Co-Authored-By: Claude <noreply@anthropic.com>
…wayEra

Replace the unsafeCoerce-based approach to Dijkstra era handling with
proper TransactionDijkstra constructors and explicit era conversion
functions. Change the Metadata, Output, Script, and BinaryData type
aliases from ConwayEra to DijkstraEra and add the necessary upgrade
paths through all era conversion functions using Ledger.Dijkstra.upgradeTimelock.

Add cardano-ledger-dijkstra as an explicit dependency.

Co-Authored-By: Claude <noreply@anthropic.com>
Replace unsafeBinaryDataFromBytes with Ledger.dataToBinaryData and
Ledger.upgradeData for era conversions. With BinaryData now aliased
to DijkstraEra, fromDijkstraBinaryData and toDijkstraBinaryData
simplify to identity. Uses coerce for the phantom era parameter in
Conway datum conversions.

Co-Authored-By: Claude <noreply@anthropic.com>
Replace Timelock ConwayEra with DijkstraNativeScript DijkstraEra and
simplify scriptFromBytes to decode directly at DijkstraEra instead of
decoding at ConwayEra and upgrading. Removes the extra upgradeTimelock
and fromConwayScript steps from fromNativeScript.

Co-Authored-By: Claude <noreply@anthropic.com>
Add comment noting that ouroboros-network provides a general
ToJSON (Point block) instance that conflicts with this one.

Co-Authored-By: Claude <noreply@anthropic.com>
Use Ledger.dataToBinaryData with Ledger.upgradeData for Alonzo and
Babbage era data conversions, removing the HasCallStack constraint
from fromAlonzoData and the intermediate type annotation from
fromBabbageData.

Co-Authored-By: Claude <noreply@anthropic.com>
These Conway-era datum conversions are dead code now that the Datum,
BinaryData, and Output types are all aliased to DijkstraEra.

Co-Authored-By: Claude <noreply@anthropic.com>
The previous genServerPort (1024 + size + arbitrary) could generate
privileged ports below 1024 and duplicate ports across iterations,
causing bind failures. Replace with OS-assigned ephemeral ports via
bind-to-zero on localhost. Also use newEnvironmentWith throwIO so
test failures surface the real exception instead of opaque ExitFailure 1.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
  This is only used to pull in the fast-bech32 module, which is not impacted by the hard fork at all.
@johnalotoski johnalotoski changed the title Jmillar/dijkstra integration Dijkstra integration May 27, 2026
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.

3 participants