Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
16bc9cc
Add `DijkstraEra era` to `CardanoEra era`
Jimbo4350 Jul 30, 2025
001d246
Add `ShelleyBasedEraDijkstra` to `ShelleyBasedEra era`
Jimbo4350 Jul 30, 2025
a28a2b1
Add Dijkstra era to eons
Jimbo4350 Jul 30, 2025
780947b
Add `DijkstraEra` to `Era era`
Jimbo4350 Jul 30, 2025
87a01f4
COMBINE ME: cabal file updates
Jimbo4350 Jul 30, 2025
47f4e7a
Update `QueryInShelleyBasedEra era result`
Jimbo4350 Jul 30, 2025
176954c
Update `makeShelleyTransactionBody` with Dijkstra era
Jimbo4350 Jul 30, 2025
64ee3aa
Update ledger types `PParamUpdatePurpose`, `CommitteePurpose` and
Jimbo4350 Jul 30, 2025
120135d
Propagate `ChainAccountState`
Jimbo4350 Jul 30, 2025
02ead07
Consensus related Dijkstra changes
Jimbo4350 Jul 30, 2025
94c001f
Temporary Cardano.Api.LedgerState Dijkstra update
Jimbo4350 Jul 30, 2025
1fd5b79
Update TxOut rendering to handle Dijkstra era
Jimbo4350 Jul 30, 2025
ed3d1f1
Update `eraSpecificLedgerTxBody` with Dijkstra era
Jimbo4350 Jul 30, 2025
2856fbb
Update `decodeBigLedgerPeerSnapshot` to support snapshot SRV names
Jimbo4350 Jul 30, 2025
20e73b5
Update generators with PlutusScriptV4
Jimbo4350 Jul 30, 2025
473d9a9
Introduce PlutusScriptV4
Jimbo4350 Jul 30, 2025
199a835
Propagate Dijkstra era
Jimbo4350 Jul 30, 2025
9d5b92f
Merge with PlutusV4 intro
Jimbo4350 Jul 30, 2025
5c09074
Merge with propagate Dikstra
Jimbo4350 Jul 30, 2025
7f037d5
REMOVE ME: Add ledger and consensus SRPs
Jimbo4350 Jul 30, 2025
0b0273f
Update nix flake
Jimbo4350 Jul 30, 2025
fcc5093
Update cardano-rpc with PlutusV4
Jimbo4350 Jul 31, 2025
c00071c
Implement `executeLocalStateQueryExprWithVersion`
Jimbo4350 Jul 31, 2025
04218dc
Fix parseHardForkTriggers
Jimbo4350 Jul 31, 2025
3943aa9
Fix cardano-rpc-test for protocol parameters roundtrip
carbolymer Aug 1, 2025
3c1a7c7
Update flake lock and ouroboros-network and plutus patches
palas Aug 1, 2025
115af33
Update wasm cache
palas Aug 1, 2025
7715043
Merge with: Consensus related Dijkstra change
Aug 7, 2025
459b232
Use exampleDijkstraGenesis value
Aug 7, 2025
11fbf44
Run formolu
Aug 7, 2025
391aeac
Fix HLS CI job
carbolymer Aug 11, 2025
ba0f883
Address lints
palas Aug 12, 2025
8f13ef3
Update `ouroboros-consensus` stanza
palas Aug 12, 2025
17470b5
wip: cardano-api with kes-agent support
fraser-iohk Jun 25, 2025
2662df0
WIP: update ledger and index-state
ana-pantilie Aug 21, 2025
6fc4dbf
Fix most compilation errors
ana-pantilie Aug 25, 2025
8bebd3a
Upgrade plutus to 1.52
ana-pantilie Aug 25, 2025
73553c8
Add bounds to quickcheck
ana-pantilie Aug 26, 2025
5c7d1c5
Add another quickcheck bound
ana-pantilie Aug 26, 2025
a0e354b
Fill in undefineds
Jimbo4350 Aug 26, 2025
5627c2e
Bump CHaP in nix flake
Jimbo4350 Sep 9, 2025
0afeea3
Rebase changes
Jimbo4350 Sep 10, 2025
d355965
WIP
Jimbo4350 Sep 10, 2025
f484f43
bump CHaP and hackage, remove ledger srp
carbolymer Sep 11, 2025
2415873
WIP: update dependencies accordingly, remove allow-newer
ana-pantilie Sep 11, 2025
00f064a
Fix type errors
Jimbo4350 Sep 11, 2025
fa66fee
WIP: add kes-agent, cardano-base SRPs; add constraints
ana-pantilie Sep 12, 2025
14e600e
Dependencies resolve in nix shell, but there are build failures
Jimbo4350 Sep 12, 2025
5cd0497
Comment out cardano-rpc from the project temporarily.
carbolymer Sep 15, 2025
ae5f2f0
Add Dijkstra era support to experimental eras
carbolymer Sep 19, 2025
c062448
Disable Alonzo Genesis cost models validation, since it is done by le…
carbolymer Sep 19, 2025
71ad99c
Update CHaP index state
ana-pantilie Sep 22, 2025
a9a3d49
Use newer process library, otherwise mingw32 build is broken
carbolymer Sep 22, 2025
2dcbe65
Change quasiquoter used in tests to raw-strings-qq - gets rid of proc…
carbolymer Sep 23, 2025
7388805
GHA: Bump HLS cache version
carbolymer Sep 23, 2025
6a71053
Fix wasm32 build
palas Sep 23, 2025
aa2acde
Update cache for wasm32
palas Sep 24, 2025
cee9b20
Bump ouroboros-consensus versions
jasagredo Oct 2, 2025
02a2274
Add L.Era* constraints to ShelleyBasedEra
carbolymer Oct 3, 2025
bcb16bf
Add Dijkstra Genesis defaults
carbolymer Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/haskell-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ jobs:

- name: Restore cached deps
run: |
wget "https://agrius.feralhosting.com/palas/wasm-cache/4c200033737be4736cd2a363d64c49a385937d5ea57d8e52773f65d08bbd1342.tar.bz2"
tar -jxf 4c200033737be4736cd2a363d64c49a385937d5ea57d8e52773f65d08bbd1342.tar.bz2
wget "https://agrius.feralhosting.com/palas/wasm-cache/b2db82f9f5a05c4d7712a1ec30b1d73d626738a52922d0c5ee9077563430763c.tar.xz"
tar -xf b2db82f9f5a05c4d7712a1ec30b1d73d626738a52922d0c5ee9077563430763c.tar.xz
rm -fr ~/.ghc-wasm/.cabal/store/
mv store ~/.ghc-wasm/.cabal/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test-hls-works:
env:
# Modify this value to "invalidate" the cache.
HLS_CACHE_VERSION: "2025-09-04"
HLS_CACHE_VERSION: "2025-09-23"

runs-on: ubuntu-latest
timeout-minutes: 60
Expand Down
36 changes: 26 additions & 10 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2025-06-22T20:18:27Z
, cardano-haskell-packages 2025-06-20T09:11:51Z
, hackage.haskell.org 2025-09-11T01:58:40Z
, cardano-haskell-packages 2025-09-30T09:59:24Z

packages:
cardano-api
cardano-api-gen
cardano-wasm
cardano-rpc
-- TODO fix potential issues with build-type: Custom and protoc and reenable
-- cardano-rpc

extra-packages: Cabal, process

if impl(ghc < 9.8)
constraints: interpolatedstring-perl6:setup.time source

constraints: process >= 1.6.26.1

-- It may slow down build plan preparation, but without it cabal has problems
-- with solving constraints. Remove this when not needed anymore.
Expand Down Expand Up @@ -61,18 +61,19 @@ if impl (ghc >= 9.12)
-- https://github.com/kapralVV/Unique/issues/11
, Unique:hashable


-- WASM compilation specific

if arch(wasm32)
source-repository-package
type: git
location: https://github.com/amesgen/plutus.git
tag: dc1edea4458d6fb794b245a26c730620265645f3
location: https://github.com/intersectmbo/plutus.git
tag: 5f3517c6937a24dc4d852cda079b2c3cdcaa5ef0
subdir:
plutus-core
plutus-ledger-api
plutus-tx
--sha256: sha256-QBtLmoS54b5QMAKIDOJIM6lmRC+1leBpuGKaFc7QQos=
--sha256: sha256-+GhWhzGQ94KfxHKS6Bycfxf+TWVkMyWDY/51EFipkZI=

package plutus-core
flags: +do-not-build-plutus-exec
Expand All @@ -86,11 +87,11 @@ if arch(wasm32)
source-repository-package
type: git
location: https://github.com/palas/ouroboros-network.git
tag: ef3e30603e4e45dac336a085114ee22b7aa8c9ed
tag: 2fddbdb8ed23b63a43852bb98bd6ddc1a6d96d98
subdir:
ouroboros-network
ouroboros-network-framework
--sha256: sha256-+IdAmWJqzRy+erKONywtk+5YLrm63q942nZavoEA4E4=
--sha256: sha256-OAPsul8TaOpNwd2BlTE0jwqWiRk83rNVSxtIA5Se9Kg=

source-repository-package
type: git
Expand Down Expand Up @@ -140,6 +141,22 @@ if arch(wasm32)
tag: ab92e48e9fdf3abe214f85fdbe5301c1280e14e9
--sha256: sha256-U+ln/gbXoQZpNjZHydNa0FG/9GdJFgL1+T3+7KTzDWo=

source-repository-package
type: git
location: https://github.com/palas/kes-agent
tag: a234ca2beede6fb557dfb4ce829b52874cc94613
--sha256: sha256-k6PJC2uYr4VP+erPrVCFHMAbJaGMqESRowSvoB/w0ss=
subdir:
kes-agent

source-repository-package
type: git
location: https://github.com/palas/fs-sim
tag: c39efe618cf63df909e8e0acab31684b10223550
--sha256: sha256-zHJfVFEzdeq9WhInEIRCJ1OQTYM06k++9gzfUaG//S8=
subdir:
fs-sim

package cardano-crypto-praos
flags: -external-libsodium-vrf

Expand All @@ -160,4 +177,3 @@ if arch(wasm32)
-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

51 changes: 29 additions & 22 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ library
cardano-ledger-api >=1.11,
cardano-ledger-babbage >=1.11,
cardano-ledger-binary >=1.6,
cardano-ledger-byron >=1.1,
cardano-ledger-byron >=1.2,
cardano-ledger-conway >=1.19,
cardano-ledger-core >=1.17,
cardano-ledger-core >=1.17 && <1.19,
cardano-ledger-dijkstra >=0.1,
cardano-ledger-mary >=1.8,
cardano-ledger-shelley >=1.16,
cardano-protocol-tpraos >=1.4,
Expand All @@ -153,24 +154,23 @@ library
iproute,
memory,
microlens,
microlens-aeson,
mono-traversable,
mtl,
network,
network-mux,
nothunks,
ordered-containers,
ouroboros-consensus ^>=0.27,
ouroboros-consensus-cardano ^>=0.25.1,
ouroboros-consensus-diffusion ^>=0.23,
ouroboros-consensus-protocol ^>=0.12,
ouroboros-consensus ^>=0.28,
ouroboros-consensus-cardano ^>=0.26,
ouroboros-consensus-diffusion ^>=0.24,
ouroboros-consensus-protocol ^>=0.13,
ouroboros-network,
ouroboros-network-api >=0.14,
ouroboros-network-api >=0.15,
ouroboros-network-framework,
ouroboros-network-protocols >=0.14,
ouroboros-network-protocols >=0.15,
parsec,
plutus-core,
plutus-ledger-api ^>=1.45,
plutus-core ^>=1.53,
plutus-ledger-api ^>=1.53,
pretty-simple,
prettyprinter,
prettyprinter-ansi-terminal,
Expand All @@ -188,7 +188,7 @@ library
time,
transformers,
transformers-except ^>=0.1.3,
typed-protocols ^>=0.3,
typed-protocols ^>=1.0,
validation,
vector,
yaml,
Expand Down Expand Up @@ -311,19 +311,21 @@ library gen

build-depends:
FailT,
QuickCheck,
QuickCheck <2.16,
aeson >=1.5.6.0,
base16-bytestring,
bytestring,
cardano-api,
cardano-binary >=1.6 && <1.8,
cardano-crypto-class ^>=2.2.1,
cardano-crypto-test ^>=1.6,
cardano-crypto-wrapper,
cardano-ledger-alonzo >=1.8.1,
cardano-ledger-babbage,
cardano-ledger-byron-test >=1.5,
cardano-ledger-byron,
cardano-ledger-conway,
cardano-ledger-core >=1.14,
cardano-ledger-dijkstra >=0.1,
cardano-ledger-mary,
cardano-ledger-shelley >=1.13,
cardano-strict-containers,
Expand All @@ -345,9 +347,12 @@ test-suite cardano-api-test
hs-source-dirs: test/cardano-api-test
main-is: cardano-api-test.hs
type: exitcode-stdio-1.0

if arch(wasm32)
buildable: False
build-depends:
FailT,
QuickCheck,
QuickCheck <2.16,
aeson >=1.5.6.0,
base16-bytestring,
bytestring,
Expand All @@ -359,7 +364,7 @@ test-suite cardano-api-test
cardano-crypto-tests ^>=2.2,
cardano-crypto-wrapper,
cardano-ledger-alonzo,
cardano-ledger-api >=1.9,
cardano-ledger-api >=1.11,
cardano-ledger-binary,
cardano-ledger-conway,
cardano-ledger-core >=1.14,
Expand All @@ -373,13 +378,12 @@ test-suite cardano-api-test
hedgehog >=1.1,
hedgehog-extras,
hedgehog-quickcheck,
interpolatedstring-perl6,
microlens,
mtl,
ouroboros-consensus,
ouroboros-consensus-cardano,
ouroboros-consensus-protocol,
plutus-ledger-api,
raw-strings-qq,
tasty,
tasty-hedgehog,
tasty-quickcheck,
Expand Down Expand Up @@ -421,6 +425,9 @@ test-suite cardano-api-golden
hs-source-dirs: test/cardano-api-golden
main-is: cardano-api-golden.hs
type: exitcode-stdio-1.0

if arch(wasm32)
buildable: False
build-depends:
aeson,
base64-bytestring,
Expand All @@ -432,7 +439,7 @@ test-suite cardano-api-golden
cardano-crypto-class ^>=2.2.1,
cardano-data >=1.0,
cardano-ledger-alonzo,
cardano-ledger-api >=1.9,
cardano-ledger-api >=1.11,
cardano-ledger-binary,
cardano-ledger-core >=1.14,
cardano-ledger-shelley,
Expand All @@ -441,10 +448,10 @@ test-suite cardano-api-golden
errors,
filepath,
hedgehog >=1.1,
hedgehog-extras ^>=0.8,
hedgehog-extras ^>=0.10,
microlens,
plutus-core ^>=1.45,
plutus-ledger-api,
plutus-core ^>=1.53,
plutus-ledger-api ^>=1.53,
tasty,
tasty-discover,
tasty-hedgehog,
Expand Down
2 changes: 2 additions & 0 deletions cardano-api/gen/Test/Gen/Cardano/Api/Era.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ shelleyBasedEraTestConstraints = \case
ShelleyBasedEraAlonzo -> id
ShelleyBasedEraBabbage -> id
ShelleyBasedEraConway -> id
ShelleyBasedEraDijkstra -> id

conwayEraOnwardsTestConstraints
:: ()
Expand All @@ -48,3 +49,4 @@ conwayEraOnwardsTestConstraints
-> a
conwayEraOnwardsTestConstraints = \case
ConwayEraOnwardsConway -> id
ConwayEraOnwardsDijkstra -> id
36 changes: 31 additions & 5 deletions cardano-api/gen/Test/Gen/Cardano/Api/Orphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@ import Cardano.Ledger.Address ()
import Cardano.Ledger.Alonzo.PParams qualified as Ledger
import Cardano.Ledger.Alonzo.Scripts qualified as Alonzo
import Cardano.Ledger.Babbage.PParams qualified as Ledger
import Cardano.Ledger.BaseTypes (textToDns, textToUrl)
import Cardano.Ledger.BaseTypes
import Cardano.Ledger.BaseTypes qualified as Ledger
import Cardano.Ledger.Coin qualified as L
import Cardano.Ledger.Conway.Governance qualified as Ledger
import Cardano.Ledger.Conway.PParams qualified as Ledger
import Cardano.Ledger.Core qualified as Ledger
import Cardano.Ledger.Dijkstra (DijkstraEra)
import Cardano.Ledger.Dijkstra.PParams
import Cardano.Ledger.HKD (HKD, NoUpdate (..))
import Cardano.Ledger.Keys (VRFVerKeyHash (..))
import Cardano.Ledger.Mary.Value qualified as ConcreteValue
import Cardano.Ledger.Mary.Value qualified as Ledger
import Cardano.Ledger.Plutus.CostModels qualified as L
import Cardano.Ledger.Plutus.CostModels qualified as Ledger
import Cardano.Ledger.Plutus.Language qualified as L
import Cardano.Ledger.Plutus.Language qualified as Ledger
Expand Down Expand Up @@ -79,6 +82,7 @@ import Test.QuickCheck
, scale
, shrinkBoundedEnum
, sublistOf
, suchThatMap
, vectorOf
)
import Test.QuickCheck.Gen (Gen (MkGen))
Expand Down Expand Up @@ -392,7 +396,7 @@ multiAssetFromListBounded =
instance Arbitrary L.GovActionId where
arbitrary = L.GovActionId <$> arbitrary <*> arbitrary

deriving instance Arbitrary (L.GovPurposeId p era)
deriving instance Arbitrary (L.GovPurposeId p)

instance Arbitrary L.DRep where
arbitrary =
Expand Down Expand Up @@ -736,7 +740,7 @@ instance Arbitrary Alonzo.CostModels where

genValidCostModel :: Ledger.Language -> Gen Ledger.CostModel
genValidCostModel lang = do
newParamValues <- vectorOf (Ledger.costModelParamsCount lang) arbitrary
newParamValues <- vectorOf (L.costModelInitParamCount lang) arbitrary
either (\err -> error $ "Corrupt cost model: " ++ show err) pure $
Ledger.mkCostModel lang newParamValues

Expand Down Expand Up @@ -772,12 +776,12 @@ genCostModelValues lang = do
Positive sub <- arbitrary
(,) lang'
<$> oneof
[ listAtLeast (Ledger.costModelParamsCount lang)
[ listAtLeast (L.costModelInitParamCount lang)
, take (tooFew sub) <$> arbitrary
]
where
lang' = fromIntegral (fromEnum lang)
tooFew sub = Ledger.costModelParamsCount lang - sub
tooFew sub = L.costModelInitParamCount lang - sub
listAtLeast :: Int -> Gen [Int64]
listAtLeast x = do
NonNegative y <- arbitrary
Expand Down Expand Up @@ -805,3 +809,25 @@ obtainArbitraryConstraints era f = case era of
ShelleyBasedEraAlonzo -> f
ShelleyBasedEraBabbage -> f
ShelleyBasedEraConway -> f
ShelleyBasedEraDijkstra -> f

instance Arbitrary (DijkstraPParams Identity DijkstraEra) where
arbitrary = genericArbitraryU

instance Arbitrary (DijkstraPParams StrictMaybe DijkstraEra) where
arbitrary = genericArbitraryU

instance Arbitrary PositiveInterval where
arbitrary = do
p <- chooseInt (0, maxDecimalsWord64)
let y = 10 ^ p :: Word64
x <- choose (1, 10 ^ (maxDecimalsWord64 :: Int))
pure $ unsafeBoundedRational $ promoteRatio (x % y)

instance (Arbitrary a, HasZero a) => Arbitrary (NonZero a) where
arbitrary = arbitrary `suchThatMap` nonZero

instance Arbitrary (L.CompactForm Coin) where
arbitrary =
L.CompactCoin <$> oneof [choose (0, 1000000), fromIntegral <$> (arbitrary :: Gen Word), arbitrary]
shrink (L.CompactCoin i) = L.CompactCoin <$> shrink i
Loading