Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
64 changes: 62 additions & 2 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-30T03:40:53Z
, hackage.haskell.org 2026-01-12T19:29:50Z
, cardano-haskell-packages 2026-01-27T13:37:12Z

packages:
cardano-cli
Expand Down Expand Up @@ -67,3 +67,63 @@ if impl (ghc >= 9.12)
-- 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: 0106df607184099af6770d0f49557e8f8ae93de4
--sha256: sha256-NpyTScEwSUz2zr1DtxUVJSGT2LaDBD8wtRj6NObBOuc=
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

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api
tag: 88149e968d0536ac2110abe32a69f221d4b1ea8c
--sha256: sha256-/0oaPmSjsN0H3O/bCLSpimIzT7+Kloof1LBcDOahu5Y=
subdir:
cardano-api
4 changes: 2 additions & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ 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.1,
cardano-git-rev ^>=0.2.2,
cardano-ledger-api,
cardano-ledger-conway,
cardano-ledger-core,
cardano-ledger-dijkstra,
cardano-ping ^>=0.9,
cardano-ping ^>=0.10,
cardano-prelude,
cardano-protocol-tpraos,
cardano-slotting ^>=0.2.0.0,
Expand Down
10 changes: 5 additions & 5 deletions cardano-cli/src/Cardano/CLI/Compatible/Json/Friendly.hs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ getScriptWitnessDetails era tb =
where
aeo = convert era
friendlyRedeemers
:: Ledger.Tx (ShelleyLedgerEra era)
:: Ledger.Tx C.TopTx (ShelleyLedgerEra era)
-> Aeson.Value
friendlyRedeemers tx =
alonzoEraOnwardsConstraints aeo $ do
Expand All @@ -293,7 +293,7 @@ getScriptWitnessDetails era tb =
Aeson.Array $ Vector.fromList redeemerList

friendlyRedeemerInfo
:: Ledger.Tx (ShelleyLedgerEra era)
:: Ledger.Tx C.TopTx (ShelleyLedgerEra era)
-> Ledger.PlutusPurpose Ledger.AsIx (ShelleyLedgerEra era)
-> (Ledger.Data (ShelleyLedgerEra era), ExUnits)
-> Aeson.Value
Expand Down Expand Up @@ -373,7 +373,7 @@ getScriptWitnessDetails era tb =
addLabelToPurpose Proposing pp = Aeson.object ["submitting a proposal following proposal policy" .= pp]
addLabelToPurpose Guarding _ = error "TODO Dijkstra"

friendlyScriptData :: Ledger.Tx (ShelleyLedgerEra era) -> Aeson.Value
friendlyScriptData :: Ledger.Tx C.TopTx (ShelleyLedgerEra era) -> Aeson.Value
friendlyScriptData tx =
alonzoEraOnwardsConstraints aeo $ do
Aeson.Array $
Expand All @@ -386,7 +386,7 @@ getScriptWitnessDetails era tb =
| (scriptHash, scriptData) <- Map.toList $ tx ^. Ledger.witsTxL . Ledger.scriptTxWitsL
]

friendlyDats :: Ledger.Tx (ShelleyLedgerEra era) -> Aeson.Value
friendlyDats :: Ledger.Tx C.TopTx (ShelleyLedgerEra era) -> Aeson.Value
friendlyDats tx =
alonzoEraOnwardsConstraints aeo $
let Ledger.TxDats dats = tx ^. Ledger.witsTxL . Ledger.datsTxWitsL
Expand Down Expand Up @@ -633,7 +633,7 @@ renderCertificate sbe (Exp.Certificate c) =

renderDrepCredential
:: ()
=> L.Credential 'L.DRepRole
=> L.Credential L.DRepRole
-> Aeson.Value
renderDrepCredential =
object . \case
Expand Down
23 changes: 15 additions & 8 deletions cardano-cli/src/Cardano/CLI/EraBased/Common/Option.hs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ parseLovelace = do
then fail $ show i <> " lovelace exceeds the Word64 upper bound"
else return $ L.Coin i

parseCoinPerByte :: P.Parser L.CoinPerByte
parseCoinPerByte = do
i <- P.parseDecimal
case L.toCompact (Coin i) of
Nothing -> fail $ show i <> " lovelace exceeds the Word64 upper bound"
Just c -> pure . L.CoinPerByte $ c

-- | The first argument is the optional prefix.
pStakePoolVerificationKeyOrFile
:: Maybe String
Expand Down Expand Up @@ -2246,14 +2253,14 @@ pInvalidHereafter
pInvalidHereafter eon =
fmap (TxValidityUpperBound $ convert eon) $
asum
[ fmap (Just . SlotNo) $
[ fmap (L.SJust . SlotNo) $
Opt.option (bounded "SLOT") $
mconcat
[ Opt.long "invalid-hereafter"
, Opt.metavar "SLOT"
, Opt.help "Time that transaction is valid until (in slots)."
]
, fmap (Just . SlotNo) $
, fmap (L.SJust . SlotNo) $
Opt.option (bounded "SLOT") $
mconcat
[ Opt.long "upper-bound"
Expand All @@ -2265,15 +2272,15 @@ pInvalidHereafter eon =
]
, Opt.internal
]
, fmap (Just . SlotNo) $
, fmap (L.SJust . SlotNo) $
Opt.option (bounded "SLOT") $
mconcat
[ Opt.long "ttl"
, Opt.metavar "SLOT"
, Opt.help "Time to live (in slots) (deprecated; use --invalid-hereafter instead)."
, Opt.internal
]
, pure Nothing
, pure L.SNothing
]

pTxFee :: Parser Lovelace
Expand Down Expand Up @@ -2702,9 +2709,9 @@ pCostModels =
, Opt.completer (Opt.bashCompleter "file")
]

pMinFeePerByteFactor :: Parser Lovelace
pMinFeePerByteFactor :: Parser L.CoinPerByte
pMinFeePerByteFactor =
Opt.option (readerFromParsecParser parseLovelace) $
Opt.option (readerFromParsecParser parseCoinPerByte) $
mconcat
[ Opt.long "min-fee-linear"
, Opt.metavar "LOVELACE"
Expand Down Expand Up @@ -2925,9 +2932,9 @@ pExtraEntropy =
. BSC.pack
=<< some P.hexDigit

pUTxOCostPerByte :: Parser Lovelace
pUTxOCostPerByte :: Parser L.CoinPerByte
pUTxOCostPerByte =
Opt.option (readerFromParsecParser parseLovelace) $
Opt.option (readerFromParsecParser parseCoinPerByte) $
mconcat
[ Opt.long "utxo-cost-per-byte"
, Opt.metavar "LOVELACE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ runGenesisCreateTestNetDataCmd
mkPoolDir idx = poolsDir </> ("pool" <> show idx)

mkDelegationMapEntry
:: Delegation -> (L.KeyHash L.Staking, L.PoolParams)
:: Delegation -> (L.KeyHash L.Staking, L.StakePoolParams)
mkDelegationMapEntry d = (dDelegStaking d, dPoolParams d)

addCommitteeToConwayGenesis
Expand Down Expand Up @@ -751,7 +751,7 @@ createPoolCredentials fmt dir = do
data Delegation = Delegation
{ dInitialUtxoAddr :: !(AddressInEra ShelleyEra)
, dDelegStaking :: !(L.KeyHash L.Staking)
, dPoolParams :: !L.PoolParams
, dPoolParams :: !L.StakePoolParams
}
deriving (Generic, NFData)

Expand All @@ -763,7 +763,7 @@ buildPoolParams
-- ^ The index of the pool being built. Starts at 0.
-> Map Word [L.StakePoolRelay]
-- ^ User submitted stake pool relay map. Starts at 0
-> ExceptT GenesisCmdError IO L.PoolParams
-> ExceptT GenesisCmdError IO L.StakePoolParams
buildPoolParams nw dir index specifiedRelays = do
StakePoolVerificationKey poolColdVK <-
firstExceptT (GenesisCmdStakePoolCmdError . StakePoolCmdReadFileError)
Expand All @@ -780,17 +780,17 @@ buildPoolParams nw dir index specifiedRelays = do
$ readFileTextEnvelope poolRewardVKF

pure
L.PoolParams
{ L.ppId = L.hashKey poolColdVK
, L.ppVrf = C.hashVerKeyVRF @StandardCrypto poolVrfVK
, L.ppPledge = L.Coin 0
, L.ppCost = L.Coin 0
, L.ppMargin = minBound
, L.ppRewardAccount =
L.StakePoolParams
{ L.sppId = L.hashKey poolColdVK
, L.sppVrf = C.hashVerKeyVRF @StandardCrypto poolVrfVK
, L.sppPledge = L.Coin 0
, L.sppCost = L.Coin 0
, L.sppMargin = minBound
, L.sppAccountAddress =
toShelleyStakeAddr $ makeStakeAddress nw $ StakeCredentialByKey (verificationKeyHash rewardsSVK)
, L.ppOwners = mempty
, L.ppRelays = lookupPoolRelay specifiedRelays
, L.ppMetadata = L.SNothing
, L.sppOwners = mempty
, L.sppRelays = lookupPoolRelay specifiedRelays
, L.sppMetadata = L.SNothing
}
where
lookupPoolRelay :: Map Word [L.StakePoolRelay] -> Seq.StrictSeq L.StakePoolRelay
Expand All @@ -812,7 +812,7 @@ computeInsecureStakeKeyAddr g0 = do
computeDelegation
:: NetworkId
-> (VerificationKey PaymentKey, VerificationKey StakeKey)
-> L.PoolParams
-> L.StakePoolParams
-> Delegation
computeDelegation nw (paymentVK, stakeVK) dPoolParams = do
let paymentCredential = PaymentCredentialByKey (verificationKeyHash paymentVK)
Expand All @@ -835,9 +835,9 @@ updateOutputTemplate
-- ^ Total amount of lovelace
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> [(L.KeyHash 'L.StakePool, L.PoolParams)]
-> [(L.KeyHash L.StakePool, L.StakePoolParams)]
-- ^ Pool map
-> [(L.KeyHash 'L.Staking, L.KeyHash 'L.StakePool)]
-> [(L.KeyHash L.Staking, L.KeyHash L.StakePool)]
-- ^ Delegaton map
-> Maybe Lovelace
-- ^ Amount of lovelace to delegate
Expand Down
34 changes: 17 additions & 17 deletions cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ runGenesisCreateStakedCmd
where
adjustTemplate t = t{sgNetworkMagic = unNetworkMagic (toNetworkMagic networkId)}
mkDelegationMapEntry
:: Delegation -> (L.KeyHash L.Staking, L.PoolParams)
:: Delegation -> (L.KeyHash L.Staking, L.StakePoolParams)
mkDelegationMapEntry d = (dDelegStaking d, dPoolParams d)

-- -------------------------------------------------------------------------------------------------
Expand All @@ -756,9 +756,9 @@ updateOutputTemplate
-- ^ Number of UTxO addresses that are delegating
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> [(L.KeyHash 'L.StakePool, L.PoolParams)]
-> [(L.KeyHash L.StakePool, L.StakePoolParams)]
-- ^ Pool map
-> [(L.KeyHash 'L.Staking, L.KeyHash 'L.StakePool)]
-> [(L.KeyHash L.Staking, L.KeyHash L.StakePool)]
-- ^ Delegaton map
-> Maybe Lovelace
-- ^ Amount of lovelace to delegate
Expand Down Expand Up @@ -939,7 +939,7 @@ createPoolCredentials fmt dir index = do
data Delegation = Delegation
{ dInitialUtxoAddr :: !(AddressInEra ShelleyEra)
, dDelegStaking :: !(L.KeyHash L.Staking)
, dPoolParams :: !L.PoolParams
, dPoolParams :: !L.StakePoolParams
}
deriving (Generic, NFData)

Expand All @@ -950,7 +950,7 @@ buildPoolParams
-> Maybe Word
-> Map Word [L.StakePoolRelay]
-- ^ User submitted stake pool relay map
-> ExceptT GenesisCmdError IO L.PoolParams
-> ExceptT GenesisCmdError IO L.StakePoolParams
buildPoolParams nw dir index specifiedRelays = do
StakePoolVerificationKey poolColdVK <-
firstExceptT (GenesisCmdStakePoolCmdError . StakePoolCmdReadFileError)
Expand All @@ -967,17 +967,17 @@ buildPoolParams nw dir index specifiedRelays = do
$ readFileTextEnvelope @(VerificationKey StakeKey) poolRewardVKF

pure
L.PoolParams
{ L.ppId = L.hashKey poolColdVK
, L.ppVrf = C.hashVerKeyVRF @C.StandardCrypto poolVrfVK
, L.ppPledge = L.Coin 0
, L.ppCost = L.Coin 0
, L.ppMargin = minBound
, L.ppRewardAccount =
L.StakePoolParams
{ L.sppId = L.hashKey poolColdVK
, L.sppVrf = C.hashVerKeyVRF @C.StandardCrypto poolVrfVK
, L.sppPledge = L.Coin 0
, L.sppCost = L.Coin 0
, L.sppMargin = minBound
, L.sppAccountAddress =
toShelleyStakeAddr $ makeStakeAddress nw $ StakeCredentialByKey (verificationKeyHash rewardsSVK)
, L.ppOwners = mempty
, L.ppRelays = lookupPoolRelay specifiedRelays
, L.ppMetadata = L.SNothing
, L.sppOwners = mempty
, L.sppRelays = lookupPoolRelay specifiedRelays
, L.sppMetadata = L.SNothing
}
where
lookupPoolRelay
Expand Down Expand Up @@ -1030,7 +1030,7 @@ writeBulkPoolCredentials dir bulkIx poolIxs = do
computeInsecureDelegation
:: StdGen
-> NetworkId
-> L.PoolParams
-> L.StakePoolParams
-> IO (StdGen, Delegation)
computeInsecureDelegation g0 nw pool = do
(paymentVK, g1) <- first getVerificationKey <$> generateInsecureSigningKey g0 AsPaymentKey
Expand Down Expand Up @@ -1080,7 +1080,7 @@ updateTemplate
-- ^ Amount of lovelace not delegated
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> Map (L.KeyHash 'L.Staking) L.PoolParams
-> Map (L.KeyHash L.Staking) L.StakePoolParams
-- ^ Genesis staking: pools/delegation map & delegated initial UTxO spec
-> Lovelace
-- ^ Number of UTxO Addresses for delegation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pAlonzoOnwardsPParams =
pIntroducedInBabbagePParams :: Parser (IntroducedInBabbagePParams ledgerera)
pIntroducedInBabbagePParams =
IntroducedInBabbagePParams
<$> convertToLedger L.CoinPerByte (optional pUTxOCostPerByte)
<$> convertToLedger id (optional pUTxOCostPerByte)

pIntroducedInConwayPParams :: Parser (IntroducedInConwayPParams ledgerera)
pIntroducedInConwayPParams =
Expand Down
Loading
Loading