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
76 changes: 74 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 2026-04-16T00:15:23Z
, cardano-haskell-packages 2026-05-18T18:23:40Z
, hackage.haskell.org 2026-05-18T17:14:36Z
, cardano-haskell-packages 2026-05-26T09:41:58Z

active-repositories:
, :rest
Expand Down Expand Up @@ -140,3 +140,75 @@ if impl(ghc >= 9.14)
, wl-pprint-text:base-compat
-- cabal-allow-newer end


source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api.git
tag: ea7b1bdb3174b0d727ad128a5bb8e3065a658d97
--sha256: sha256-VfpiRNwnKVMoYkf1Khw0TQnDSKaE1+0l4qvsWLhPlTc=
subdir:
cardano-api

-- cuddle 1.7
source-repository-package
type: git
location: https://github.com/input-output-hk/cuddle
tag: 7b67a97a71601e686823afe362485d51340fb317
--sha256: sha256-nUEFgDC7lQoSfwqjwDWhKfc/1ZOO/D+zPiBd7hoNaYs=

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger.git
tag: 6a71a6b37879c0b77abdeac30ae94102620f5a2c
--sha256: sha256-8mKgdf9b4UAy6c6OeaJh0yRPqt3NDeOUH9ko2uBSSBI=
subdir:
eras/allegra/impl
eras/alonzo/impl
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/small-steps
libs/vector-map

source-repository-package
type: git
location: https://github.com/f-f/kes-agent.git
tag: 0b362519f6915841c92869ed288ce83f89b17b73
--sha256: sha256-8pZYF7MJZZ1tM19wIUhbLKORDL+OP2ckhueWJM4aG/c=
subdir:
kes-agent
kes-agent-crypto

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus.git
tag: 4b8da559df6b760f12edc9d5ebe6f01ab4f5ee91
--sha256: sha256-+fbOSEZW59Vq3IyuLxPdknSau4idpUCoyrYdGEt0L0g=
subdir:
.

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network.git
tag: d842a238a9ac329a4bb676dd95e46ee25a7a1a94
--sha256: sha256-8vW+gEV3UxoEYRBJKH02TjQKVFw++gdDh77bzLCrWCI=
subdir:
./cardano-diffusion
./cardano-ping
./monoidal-synchronisation
./network-mux
./ouroboros-network
5 changes: 3 additions & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ library
cardano-api ^>=11.2,
cardano-binary,
cardano-crypto,
cardano-crypto-class ^>=2.3,
cardano-crypto-class ^>=2.5,
cardano-crypto-wrapper ^>=1.7,
cardano-data >=1.1,
cardano-git-rev ^>=0.2.2,
Expand All @@ -267,6 +267,7 @@ library
exceptions,
filepath,
formatting,
fs-api,
generic-lens,
haskeline,
http-client,
Expand All @@ -292,7 +293,7 @@ library
transformers,
unliftio-core,
utf8-string,
validation,
validation ^>=1.2,
vary ^>=0.1.1.2,
vector,
yaml,
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ submitByronUpdateProposal
submitByronUpdateProposal nodeSocketPath network proposalFp = do
proposal <- readByronUpdateProposal proposalFp
let genTx = toByronLedgerUpdateProposal proposal
traceWith stdoutTracer $ "Update proposal TxId: " ++ condense (txId genTx)
liftIO $ traceWith stdoutTracer $ "Update proposal TxId: " ++ condense (txId genTx)
fromExceptTCli $ nodeSubmitTx nodeSocketPath network genTx
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Byron/Vote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ submitByronVote
submitByronVote nodeSocketPath network voteFp = do
vote <- readByronVote voteFp
let genTx = toByronLedgertoByronVote vote
traceWith stdoutTracer ("Vote TxId: " ++ condense (txId genTx))
liftIO $ traceWith stdoutTracer ("Vote TxId: " ++ condense (txId genTx))
fromExceptTCli $ nodeSubmitTx nodeSocketPath network genTx

readByronVote :: FilePath -> CIO e ByronVote
Expand Down
13 changes: 6 additions & 7 deletions cardano-cli/src/Cardano/CLI/EraIndependent/Cip/Cip129/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import Data.ByteString (ByteString)
import Data.ByteString qualified as BS
import Data.ByteString.Char8 qualified as BSC
import Data.Text.Encoding qualified as Text
import Data.Validation qualified as Valid
import System.IO

runCip129 :: Cip129 -> CIO e ()
Expand All @@ -32,9 +31,9 @@ runCip129 (Cip129DRep inp out) = do
f <- liftIO $ fileOrPipe textEnvFp
fromEitherIOCli $ readDrepVerificationKeyFile f
InputHexText t -> do
fromEitherCli . Valid.toEither $ readDRepHexVerificationKeyText t
fromEitherCli . toEither $ readDRepHexVerificationKeyText t
InputBech32Text t -> do
fromEitherCli . Valid.toEither $ readDRepBech32VerificationKeyText t
fromEitherCli . toEither $ readDRepBech32VerificationKeyText t
let cip129Output = Text.encodeUtf8 $ encodeCip129DrepVerficationKeyText k
renderOutput cip129Output out
runCip129 (Cip129CommitteeHotKey inp out) = do
Expand All @@ -43,9 +42,9 @@ runCip129 (Cip129CommitteeHotKey inp out) = do
f <- liftIO $ fileOrPipe textEnvFp
fromEitherIOCli $ readCommitteeHotVerificationKeyFile f
InputHexText t ->
fromEitherCli . Valid.toEither $ readCommitteeHotHexVerificationKeyText t
fromEitherCli . toEither $ readCommitteeHotHexVerificationKeyText t
InputBech32Text t ->
fromEitherCli . Valid.toEither $ readCommitteeHotBech32VerificationKeyText t
fromEitherCli . toEither $ readCommitteeHotBech32VerificationKeyText t
let cip129Output = Text.encodeUtf8 $ encodeCip129CommitteeHotVerficationKeyText k
renderOutput cip129Output out
runCip129 (Cip129CommitteeColdKey inp out) = do
Expand All @@ -54,9 +53,9 @@ runCip129 (Cip129CommitteeColdKey inp out) = do
f <- liftIO $ fileOrPipe textEnvFp
fromEitherIOCli $ readCommitteeColdVerificationKeyFile f
InputHexText t ->
fromEitherCli . Valid.toEither $ readCommitteeColdHexVerificationKeyText t
fromEitherCli . toEither $ readCommitteeColdHexVerificationKeyText t
InputBech32Text t ->
fromEitherCli . Valid.toEither $ readCommitteeColdBech32VerificationKeyText t
fromEitherCli . toEither $ readCommitteeColdBech32VerificationKeyText t
let cip129Output = Text.encodeUtf8 $ encodeCip129CommitteeColdVerficationKeyText k
renderOutput cip129Output out
runCip129 (Cip129GovernanceAction inp out) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import Cardano.CLI.Orphan ()

import Data.Aeson qualified as Aeson
import Data.ByteString.Lazy qualified as LBS
import System.Directory (makeAbsolute)
import System.FS.API (SomeHasFS (..))
import System.FS.API.Types (MountPoint (MountPoint))
import System.FS.IO (ioHasFS)
import System.FilePath (takeDirectory)
import System.IO qualified as IO

runLogEpochStateCmd
Expand All @@ -28,9 +33,13 @@ runLogEpochStateCmd
} = do
LBS.appendFile outputFilePath ""

configDir <- takeDirectory <$> makeAbsolute (unFile configurationFile)
let fs = SomeHasFS (ioHasFS (MountPoint configDir))

result <-
runExceptT $
foldEpochState
fs
configurationFile
nodeSocketPath
Api.QuickValidation
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraIndependent/Ping/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Control.Concurrent.Class.MonadSTM.Strict qualified as STM
import Control.Exception (SomeException)
import Control.Monad (forM, unless)
import Control.Monad.Class.MonadAsync (MonadAsync (async, wait, waitCatch))
import Control.Tracer (Tracer (..))
import Control.Tracer (Tracer, mkTracer)
import Data.List qualified as L
import Data.List qualified as List
import Network.Socket (AddrInfo)
Expand Down Expand Up @@ -96,7 +96,7 @@ runPingCmd options = do
-- Ping client thread handles
caids <-
forM addresses $
liftIO . async . pingClient (Tracer $ doLog msgQueue) (Tracer doErrLog) options versions
liftIO . async . pingClient (mkTracer $ doLog msgQueue) (mkTracer doErrLog) options versions
res <- L.zip addresses <$> mapM (liftIO . waitCatch) caids
liftIO $ doLog msgQueue CNP.LogEnd
liftIO $ wait laid
Expand Down
8 changes: 0 additions & 8 deletions cardano-cli/src/Cardano/CLI/Orphan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Cardano.Api.Experimental as Exp
import Cardano.Api.Ledger qualified as L

import Cardano.CLI.Type.Error.ScriptDecodeError
import Cardano.Ledger.Conway.Governance qualified as L
import Cardano.Ledger.Conway.State qualified as L

import Control.Exception
Expand All @@ -24,13 +23,6 @@ import Data.List qualified as List
import Data.Typeable
import Data.Word

instance ToJSON L.DefaultVote where
toJSON defaultVote =
case defaultVote of
L.DefaultNo -> String "DefaultNo"
L.DefaultAbstain -> String "DefaultAbstain"
L.DefaultNoConfidence -> String "DefaultNoConfidence"

instance Error [Bech32DecodeError] where
prettyError errs = vsep $ map prettyError errs

Expand Down
13 changes: 13 additions & 0 deletions cardano-cli/src/Cardano/CLI/Read.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ module Cardano.CLI.Read

-- * utilities
, readerFromParsecParser
, liftError
, toEither
)
where

Expand Down Expand Up @@ -134,6 +136,7 @@ import Data.Text qualified as T
import Data.Text qualified as Text
import Data.Text.Encoding qualified as Text
import Data.Text.Encoding.Error qualified as Text
import Data.Validation (Validation (Failure, Success))
import GHC.IO.Handle (hClose, hIsSeekable)
import GHC.IO.Handle.FD (openFileBlocking)
import GHC.Stack
Expand Down Expand Up @@ -819,6 +822,16 @@ readFileCli = withFrozenCallStack . readFileBinary
readerFromParsecParser :: P.Parser a -> Opt.ReadM a
readerFromParsecParser p = Opt.eitherReader (P.runParser p . T.pack)

liftError :: (e -> e') -> Either e a -> Validation e' a
liftError f = \case
Left e -> Failure (f e)
Right a -> Success a

toEither :: Validation e a -> Either e a
toEither = \case
Failure e -> Left e
Success a -> Right a

-- TODO: Update to handle hex script bytes directly as well!
readFilePlutusScript
:: forall e era
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading