Skip to content

Dijkstra integration#2

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

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

Conversation

@johnalotoski
Copy link
Copy Markdown

  • WIP

johnalotoski and others added 12 commits May 26, 2026 20:34
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
Jimbo4350 added a commit that referenced this pull request May 28, 2026
After the warp-bracket fix, failures #1/#2/CardanoSolutions#4 still reproduce with a
different shape: stage N+1's kupo logs ConfigurationMaxConcurrency and
then stalls before ConfigurationCardanoNode. That maps to the call
between newDBPool returning and newProducer being called — i.e. inside
withDatabaseExclusiveWriter / withLongLivedConnection. Most likely
stage N+1's withConnection' is blocking on a SQLite file lock that
stage N's RW connection hasn't released yet.

Add [db-trace] OPENING / OPENED / BODYEND / CLOSED stderr lines so we
can confirm whether stage N's close actually runs before stage N+1's
open, and measure the inter-stage gap. Same shape as the existing
[port-trace] diagnostic on the warp side.

Diagnostic only; no semantic change to the bracket itself.
@snarlysodboxer snarlysodboxer force-pushed the setup-for-hydra branch 6 times, most recently from ce4dd0f to 5420327 Compare May 30, 2026 05:14
@Jimbo4350 Jimbo4350 force-pushed the setup-for-hydra branch 2 times, most recently from 24880a7 to 2a8d635 Compare May 30, 2026 16:58
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.

4 participants