Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1dff406
[wip] Add s-r-ps on Consensus, Ledger and Network
geo2a Dec 8, 2025
876c808
[wip] integrate new Ledger
geo2a Dec 9, 2025
d5ab5f7
Add Javier's upgrage to LSM
geo2a Dec 9, 2025
8ba2f6c
Use `StrictMaybe` in transaction body
geo2a Dec 9, 2025
0eaf071
Update key roles
geo2a Dec 9, 2025
6e4e452
Replace Witness with Guard
geo2a Dec 9, 2025
3620dae
PoolParams -> StakePoolParams
geo2a Dec 9, 2025
edb7966
[wip] comment-out redundant patterns
geo2a Dec 22, 2025
91aa8c4
Add ledger lenses for `ChainAccountState` to exports from `Cardano.Ap…
carbolymer Jan 5, 2026
9887e16
[wip] bump Network, Ledger and Consensus s-r-ps
geo2a Jan 30, 2026
57630f4
Bump index states
geo2a Jan 30, 2026
0d7d1b7
Bump typed-protocols and Network packages
geo2a Jan 30, 2026
f2723be
Rename Leger's `PParams` fields
geo2a Jan 30, 2026
b56b967
Bump Consensus and Ledger srps
geo2a Feb 2, 2026
1b54881
Shelley.RewardAccount -> Shelley.AccountAddress
geo2a Feb 2, 2026
46d1da5
Integrate `PoolMetadata` hash type change
geo2a Feb 2, 2026
09adff6
[wip] Coin -> CompactCoin Coin
geo2a Feb 2, 2026
4138f0b
Use new name of the Constitution script hash
geo2a Feb 2, 2026
cc4905c
[wip] integrate GetLedgerPeerSnapshot query
geo2a Feb 2, 2026
d3c83ff
[wip] downgrade Consensus to make it build with the srp
geo2a Feb 2, 2026
35f6118
[wip] assorted integration work
geo2a Feb 2, 2026
cc234b6
Introduce transaction levels
Jimbo4350 Feb 3, 2026
58dc248
Update CostModel JSON format
Jimbo4350 Feb 3, 2026
d7d8d48
Address undefineds and review comments
Jimbo4350 Feb 4, 2026
eee03a9
Fix CI errors
palas Feb 3, 2026
9ed9c43
Make pragma conditional for 9.10
palas Feb 3, 2026
5390491
Update WASM cache
palas Feb 3, 2026
7e03660
Run formatter on everything
palas Feb 3, 2026
4510c45
Remove unnecessary stanza
palas Feb 5, 2026
24a0e7b
Integrate ledger peer snapshot query
crocodile-dentist Feb 4, 2026
7020645
consensus srp
crocodile-dentist Feb 5, 2026
aaf83b9
Fill in ApplyTx JSON rendering fro Dijkstra
Jimbo4350 Feb 5, 2026
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
6 changes: 3 additions & 3 deletions .github/workflows/haskell-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ jobs:

- name: Restore cached deps
run: |
wget "https://agrius.feralhosting.com/palas/wasm-cache/96feb8056220c74aa6b5af41ca64ad982f207fc4f99a22e0393a4de12169bf04.tar.xz"
tar -xf 96feb8056220c74aa6b5af41ca64ad982f207fc4f99a22e0393a4de12169bf04.tar.xz
rm 96feb8056220c74aa6b5af41ca64ad982f207fc4f99a22e0393a4de12169bf04.tar.xz
wget "https://agrius.feralhosting.com/palas/wasm-cache/12419d337f57e7ea7b01c6499af0a70402bd2f2f055951c84693deb21b182a6f.tar.xz"
tar -xf 12419d337f57e7ea7b01c6499af0a70402bd2f2f055951c84693deb21b182a6f.tar.xz
rm 12419d337f57e7ea7b01c6499af0a70402bd2f2f055951c84693deb21b182a6f.tar.xz
rm -fr ~/.ghc-wasm/.cabal/store/
mv store ~/.ghc-wasm/.cabal/

Expand Down
78 changes: 57 additions & 21 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ 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-12-02T22:23:29Z
, cardano-haskell-packages 2026-01-24T11:25:12Z
, hackage.haskell.org 2026-01-12T19:29:50Z
, cardano-haskell-packages 2026-01-27T13:37:12Z

packages:
cardano-api
Expand Down Expand Up @@ -79,15 +79,6 @@ if arch(wasm32)
tag: a198a76c584dc2cfdcde6b431968de92a5fed65e
--sha256: sha256-LRC3L+J921+/moZS7F17vCfM/4usYy/eMR+w/mXsjeA=

source-repository-package
type: git
location: https://github.com/palas/ouroboros-network.git
tag: 2fddbdb8ed23b63a43852bb98bd6ddc1a6d96d98
subdir:
ouroboros-network
ouroboros-network-framework
--sha256: sha256-OAPsul8TaOpNwd2BlTE0jwqWiRk83rNVSxtIA5Se9Kg=

source-repository-package
type: git
location: https://github.com/palas/criterion.git
Expand Down Expand Up @@ -127,23 +118,15 @@ if arch(wasm32)
source-repository-package
type: git
location: https://github.com/palas/mempack.git
tag: 0211addbbbf51011e5348d3696566eb12ccbef07
--sha256: sha256-iLc+foF2AM3vG6deuZ51+faI6buMkubMP75md51hMe8=
tag: 3514811b33741c4ac37d6f78b01f5d33088f6303
--sha256: sha256-fATs5q/l+gs5qJnzqxW0pe/EqjdwxKYcBcGKrbU4L+Y=

source-repository-package
type: git
location: https://github.com/haskell-wasm/network
tag: ab92e48e9fdf3abe214f85fdbe5301c1280e14e9
--sha256: sha256-U+ln/gbXoQZpNjZHydNa0FG/9GdJFgL1+T3+7KTzDWo=

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 @@ -164,3 +147,56 @@ 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.

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
tag: 324efe565237061615ec10e7f47e08699cace660
--sha256: sha256-Tu5TlPwJgVpEfTui+zbaUJIOMoexCwFTQ5M/n2DP2/I=
subdir:
eras/allegra/impl
eras/alonzo/impl
eras/alonzo/test-suite
eras/babbage/impl
eras/byron/chain/executable-spec
eras/byron/crypto
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
eras/conway/impl
eras/dijkstra/impl
eras/mary/impl
eras/shelley-ma/test-suite
eras/shelley/impl
eras/shelley/test-suite
libs/cardano-data
libs/cardano-ledger-api
libs/cardano-ledger-binary
libs/cardano-ledger-core
libs/cardano-protocol-tpraos
libs/non-integral
libs/plutus-preprocessor
libs/small-steps
libs/vector-map

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: c7587e868ab2ea3802d6c880668a5d7689ab27d2
--sha256: sha256-TfU1QCQ5wOpGzjLojKl8dhXLrI0k6RuzZ5lCgELlX3U=
subdir:
ouroboros-consensus
ouroboros-consensus-cardano
ouroboros-consensus-diffusion
ouroboros-consensus-protocol
strict-sop-core
sop-extras

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network
tag: 228bb2045784a9c180651dedeea9af9396140f47
--sha256: sha256-q/93M6+TtnqWiguOiwuUSJljA7nrICOsu+5SLl6jiCc=
subdir:
ouroboros-network
cardano-diffusion
network-mux
37 changes: 18 additions & 19 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,17 @@ library
cardano-binary,
cardano-crypto,
cardano-crypto-class ^>=2.2.3.2,
cardano-crypto-wrapper ^>=1.6,
cardano-crypto-wrapper ^>=1.7,
cardano-data >=1.0,
cardano-diffusion:{cardano-diffusion, api} ^>=0.1,
cardano-ledger-allegra >=1.7,
cardano-ledger-alonzo >=1.13,
cardano-ledger-api ^>=1.12.1,
cardano-ledger-api ^>=1.13,
cardano-ledger-babbage >=1.11,
cardano-ledger-binary >=1.6,
cardano-ledger-byron >=1.2,
cardano-ledger-conway >=1.19,
cardano-ledger-core >=1.17 && <1.19,
cardano-ledger-core >=1.17 && <1.20,
cardano-ledger-dijkstra >=0.1,
cardano-ledger-mary >=1.8,
cardano-ledger-shelley >=1.16,
Expand All @@ -158,21 +159,19 @@ library
groups,
iproute,
memory,
microlens,
mempack,
microlens <0.5,
mono-traversable,
mtl,
network,
network-mux,
nothunks,
ordered-containers,
ouroboros-consensus ^>=0.29,
ouroboros-consensus ^>=0.28,
Copy link

@geo2a geo2a Feb 4, 2026

Choose a reason for hiding this comment

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

Consensus main is still at version 0.28 . 0.29 is the mempool timeout release. Unfortunately this likely means that we cannot merge this PR until we've released Consensus.

ouroboros-consensus-cardano ^>=0.26,
ouroboros-consensus-diffusion ^>=0.25,
ouroboros-consensus-diffusion ^>=0.24,
ouroboros-consensus-protocol ^>=0.13,
ouroboros-network,
ouroboros-network-api >=0.15,
ouroboros-network-framework,
ouroboros-network-protocols >=0.15,
ouroboros-network:{ouroboros-network, api, framework, protocols} ^>=0.24,
parsec,
plutus-core ^>=1.57,
plutus-ledger-api ^>=1.57,
Expand All @@ -193,7 +192,7 @@ library
time,
transformers,
transformers-except ^>=0.1.3,
typed-protocols ^>=1.0,
typed-protocols ^>=1.1,
validation,
vector,
yaml,
Expand Down Expand Up @@ -324,13 +323,13 @@ library gen
base16-bytestring,
bytestring,
cardano-api,
cardano-binary >=1.6 && <1.8,
cardano-crypto-class,
cardano-crypto-test ^>=1.6,
cardano-binary >=1.6 && <1.9,
cardano-crypto-class ^>=2.2.1,
cardano-crypto-wrapper:testlib ^>=1.7,
cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib} >=1.8.1,
cardano-ledger-byron:testlib,
cardano-ledger-conway:testlib,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.17,
cardano-ledger-dijkstra:testlib >=0.1,
cardano-ledger-shelley >=1.13,
cardano-strict-containers,
Expand Down Expand Up @@ -366,10 +365,10 @@ test-suite cardano-api-test
cardano-crypto-tests ^>=2.2,
cardano-crypto-wrapper:testlib,
cardano-ledger-alonzo,
cardano-ledger-api ^>=1.12.1,
cardano-ledger-api ^>=1.13,
cardano-ledger-binary,
cardano-ledger-conway,
cardano-ledger-core >=1.14,
cardano-ledger-core,
cardano-ledger-mary,
cardano-ledger-shelley,
cardano-protocol-tpraos,
Expand Down Expand Up @@ -442,9 +441,9 @@ test-suite cardano-api-golden
cardano-crypto-class,
cardano-data >=1.0,
cardano-ledger-alonzo,
cardano-ledger-api ^>=1.12.1,
cardano-ledger-api ^>=1.13,
cardano-ledger-binary,
cardano-ledger-core >=1.14,
cardano-ledger-core,
cardano-ledger-shelley,
cardano-protocol-tpraos,
containers,
Expand Down
38 changes: 27 additions & 11 deletions cardano-api/gen/Test/Gen/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ module Test.Gen.Cardano.Api
)
where

import Cardano.Api.Genesis (defaultV1CostModel)

import Cardano.Ledger.Alonzo.Core qualified as Ledger
import Cardano.Ledger.Alonzo.Genesis qualified as Alonzo
import Cardano.Ledger.Alonzo.Scripts qualified as Alonzo
import Cardano.Ledger.Alonzo.Scripts qualified as L
import Cardano.Ledger.BaseTypes qualified as Ledger
import Cardano.Ledger.Coin qualified as Ledger
import Cardano.Ledger.Plutus.CostModels qualified as Plutus
Expand Down Expand Up @@ -97,22 +100,35 @@ genAlonzoGenesis :: Gen Alonzo.AlonzoGenesis
genAlonzoGenesis = do
coinsPerUTxOWord <- genCoin (Range.linear 0 5)
-- TODO: Babbage: Figure out how to deal with the asymmetric cost model JSON
_costmdls' <- genCostModels
costmdls' <- genCostModels
v1CostModel <- case Map.lookup Alonzo.PlutusV1 $ L.costModelsValid costmdls' of
Just cm -> return cm
Nothing -> return defaultV1CostModel

let v2OnwardsCostModels =
mconcat $
map
( \l -> case l `Map.lookup` L.costModelsValid costmdls' of
Just cm -> Map.singleton l cm
Nothing -> Map.empty
)
[Alonzo.PlutusV2 .. maxBound]
extraConfig = Just $ Alonzo.AlonzoExtraConfig $ Just $ L.mkCostModels v2OnwardsCostModels
prices' <- genPrices
maxTxExUnits' <- genExUnits
maxBlockExUnits' <- genExUnits
maxValSize' <- Gen.integral (Range.linear 0 10)
collateralPercentage' <- Gen.integral (Range.linear 0 10)
maxCollateralInputs' <- Gen.integral (Range.linear 0 10)

return
return $
Alonzo.AlonzoGenesis
{ Alonzo.agCoinsPerUTxOWord = Ledger.CoinPerWord coinsPerUTxOWord
, Alonzo.agCostModels = mempty
, Alonzo.agPrices = prices'
, Alonzo.agMaxTxExUnits = maxTxExUnits'
, Alonzo.agMaxBlockExUnits = maxBlockExUnits'
, Alonzo.agMaxValSize = maxValSize'
, Alonzo.agCollateralPercentage = collateralPercentage'
, Alonzo.agMaxCollateralInputs = maxCollateralInputs'
}
(Ledger.CoinPerWord coinsPerUTxOWord)
v1CostModel
prices'
maxTxExUnits'
maxBlockExUnits'
maxValSize'
collateralPercentage'
maxCollateralInputs'
extraConfig
4 changes: 2 additions & 2 deletions cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ import Cardano.Crypto.Seed qualified as Crypto
import Cardano.Ledger.Alonzo.Scripts qualified as Alonzo
import Cardano.Ledger.BaseTypes qualified as Ledger
import Cardano.Ledger.Core qualified as Ledger
import Cardano.Ledger.Hashes (unsafeMakeSafeHash)
import Cardano.Ledger.Plutus.Language qualified as L
import Cardano.Ledger.SafeHash (unsafeMakeSafeHash)

import Control.Applicative (Alternative (..), optional)
import Control.Monad
Expand Down Expand Up @@ -736,7 +736,7 @@ genTxValidityLowerBound =
-- TODO: Accept a range for generating ttl.
genTxValidityUpperBound :: ShelleyBasedEra era -> Gen (TxValidityUpperBound era)
genTxValidityUpperBound sbe =
TxValidityUpperBound sbe <$> Gen.maybe genTtl
TxValidityUpperBound sbe . Ledger.maybeToStrictMaybe <$> Gen.maybe genTtl

genTxMetadataInEra :: CardanoEra era -> Gen (TxMetadataInEra era)
genTxMetadataInEra =
Expand Down
31 changes: 16 additions & 15 deletions cardano-api/src/Cardano/Api/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import Cardano.Chain.Common qualified as Byron
import Cardano.Ledger.Address qualified as Shelley
import Cardano.Ledger.BaseTypes qualified as Shelley
import Cardano.Ledger.Credential qualified as Shelley
import Cardano.Ledger.Keys qualified as Shelley
import Cardano.Ledger.Plutus.TxInfo qualified as Plutus
import PlutusLedgerApi.V1 qualified as PlutusAPI

Expand Down Expand Up @@ -183,7 +184,7 @@ data Address addrtype where
-- in Shelley era and are thus supported from the Shelley era onwards
ShelleyAddress
:: Shelley.Network
-> Shelley.PaymentCredential
-> Shelley.Credential Shelley.Payment
-> Shelley.StakeReference
-> Address ShelleyAddr

Expand Down Expand Up @@ -527,7 +528,7 @@ makeShelleyAddressInEra sbe nw pc scr =
data StakeAddress where
StakeAddress
:: Shelley.Network
-> Shelley.StakeCredential
-> Shelley.Credential Shelley.Staking
-> StakeAddress
deriving (Eq, Ord, Show)

Expand Down Expand Up @@ -567,12 +568,12 @@ instance HasTypeProxy StakeAddress where

instance SerialiseAsRawBytes StakeAddress where
serialiseToRawBytes (StakeAddress nw sc) =
Shelley.serialiseRewardAccount (Shelley.RewardAccount nw sc)
Shelley.serialiseAccountAddress (Shelley.AccountAddress nw (Shelley.AccountId sc))

deserialiseFromRawBytes AsStakeAddress bs =
case Shelley.deserialiseRewardAccount bs of
case Shelley.deserialiseAccountAddress bs of
Nothing -> Left (SerialiseAsRawBytesError "Unable to deserialise StakeAddress")
Just (Shelley.RewardAccount nw sc) -> Right (StakeAddress nw sc)
Just (Shelley.AccountAddress nw (Shelley.AccountId sc)) -> Right (StakeAddress nw sc)

instance SerialiseAsBech32 StakeAddress where
bech32PrefixFor (StakeAddress Shelley.Mainnet _) = unsafeHumanReadablePartFromText "stake"
Expand Down Expand Up @@ -643,24 +644,24 @@ toShelleyAddr
) =
Shelley.Addr nw pc scr

toShelleyStakeAddr :: StakeAddress -> Shelley.RewardAccount
toShelleyStakeAddr :: StakeAddress -> Shelley.AccountAddress
toShelleyStakeAddr (StakeAddress nw sc) =
Shelley.RewardAccount
{ Shelley.raNetwork = nw
, Shelley.raCredential = sc
Shelley.AccountAddress
{ Shelley.aaNetworkId = nw
, Shelley.aaAccountId = Shelley.AccountId sc
}

toShelleyPaymentCredential
:: PaymentCredential
-> Shelley.PaymentCredential
-> Shelley.Credential Shelley.Payment
toShelleyPaymentCredential (PaymentCredentialByKey (PaymentKeyHash kh)) =
Shelley.KeyHashObj kh
toShelleyPaymentCredential (PaymentCredentialByScript sh) =
Shelley.ScriptHashObj (toShelleyScriptHash sh)

toShelleyStakeCredential
:: StakeCredential
-> Shelley.StakeCredential
-> Shelley.Credential Shelley.Staking
toShelleyStakeCredential (StakeCredentialByKey (StakeKeyHash kh)) =
Shelley.KeyHashObj kh
toShelleyStakeCredential (StakeCredentialByScript sh) =
Expand Down Expand Up @@ -700,19 +701,19 @@ fromShelleyAddr sbe (Shelley.Addr nw pc scr) =
(ShelleyAddressInEra sbe)
(ShelleyAddress nw pc scr)

fromShelleyStakeAddr :: Shelley.RewardAccount -> StakeAddress
fromShelleyStakeAddr (Shelley.RewardAccount nw sc) = StakeAddress nw sc
fromShelleyStakeAddr :: Shelley.AccountAddress -> StakeAddress
fromShelleyStakeAddr (Shelley.AccountAddress nw (Shelley.AccountId sc)) = StakeAddress nw sc

fromShelleyStakeCredential
:: Shelley.StakeCredential
:: Shelley.Credential Shelley.Staking
-> StakeCredential
fromShelleyStakeCredential (Shelley.KeyHashObj kh) =
StakeCredentialByKey (StakeKeyHash kh)
fromShelleyStakeCredential (Shelley.ScriptHashObj sh) =
StakeCredentialByScript (fromShelleyScriptHash sh)

fromShelleyPaymentCredential
:: Shelley.PaymentCredential
:: Shelley.Credential Shelley.Payment
-> PaymentCredential
fromShelleyPaymentCredential (Shelley.KeyHashObj kh) =
PaymentCredentialByKey (PaymentKeyHash kh)
Expand Down
Loading
Loading