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
67 changes: 63 additions & 4 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ index-state:
, hackage.haskell.org 2026-06-02T21:49:32Z
, cardano-haskell-packages 2026-06-02T21:14:32Z

active-repositories:
, :rest
, cardano-haskell-packages:override

packages:
cardano-cli

Expand Down Expand Up @@ -100,3 +96,66 @@ if impl(ghc >= 9.14)
, with-utf8:base
-- cabal-allow-newer end

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api.git
tag: 500e283a93fcb4c82b03febf243cb976431a613f
--sha256: sha256-aHpjdMQhjRpe0w5Fb9a5LeVGcO44VAl928CS7HoYB0Q=
subdir:
cardano-api

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger.git
tag: 3f879bb37df4738ed8211e500c7d180443cfcbe4
--sha256: sha256-uLjiIHiU1SzAmoKs+rynQphc3FUYXKeJLlOnp87uNdg=
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: fdb4f4db05e3744ed413f83477020fdf43cf32a2
--sha256: sha256-eyQc8Dk7+upSRQvH5eXZuj6asYhOLsH59ABJZDyvQ6I=
subdir:
kes-agent
kes-agent-crypto

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus.git
tag: 0411b4d50dc62cab07bbbf75805cf585a7a1f8e7
--sha256: sha256-DNnGHdo+oQDBbHzAl6UZ/VcPoS4TxGrC9eCOiMxgc8A=
subdir:
.

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network.git
tag: 1881340e26ca98b3ee2b89ea536348406b79e051
--sha256: sha256-O1Th+YI6LZqCLM6n75tVV+3InA4W8sC0yHEi09u8Fyw=
subdir:
./cardano-diffusion
./monoidal-synchronisation
./network-mux
./ouroboros-network
12 changes: 6 additions & 6 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,15 @@ library
cardano-api ^>=11.3,
cardano-binary,
cardano-crypto,
cardano-crypto-class ^>=2.3,
cardano-crypto-class ^>=2.5,
cardano-crypto-wrapper ^>=1.7,
cardano-data >=1.1,
cardano-diffusion:ping ^>=1.0,
cardano-git-rev ^>=0.2.2,
cardano-ledger-api,
cardano-ledger-conway,
cardano-ledger-core,
cardano-ledger-dijkstra,
cardano-ping ^>=0.10,
cardano-prelude,
cardano-protocol-tpraos,
cardano-slotting ^>=0.2.0.0,
Expand All @@ -267,20 +267,20 @@ library
exceptions,
filepath,
formatting,
fs-api,
generic-lens,
haskeline,
http-client,
http-client-tls,
http-types,
io-classes,
io-classes:strict-stm,
iproute,
microlens,
mmorph,
mtl,
network,
network-uri,
optparse-applicative-fork,
optparse-applicative,
ordered-containers,
prettyprinter,
prettyprinter-ansi-terminal,
Expand All @@ -292,7 +292,7 @@ library
transformers,
unliftio-core,
utf8-string,
validation,
validation ^>=1.2,
vary ^>=0.1.1.2,
vector,
yaml,
Expand All @@ -310,7 +310,7 @@ executable cardano-cli
cardano-api,
cardano-cli,
cardano-crypto-class,
optparse-applicative-fork,
optparse-applicative,
rio,
terminal-size,

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
44 changes: 22 additions & 22 deletions cardano-cli/src/Cardano/CLI/EraBased/Transaction/Option.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Data.Universe (Some)
import Options.Applicative hiding (help, str)
import Options.Applicative qualified as Opt
import Options.Applicative.Help qualified as H
-- import Options.Applicative.Help qualified as H
import Prettyprinter (line)

pTransactionCmds
Expand All @@ -55,13 +55,13 @@ pTransactionCmds envCli =
[ pretty @String "Build a transaction (low-level, inconvenient)"
, line
, line
, H.yellow $
mconcat
[ "Please note "
, H.underline "the order"
, " of some cmd options is crucial. If used incorrectly may produce "
, "undesired tx body. See nested [] notation above for details."
]
-- , H.yellow $
-- mconcat
-- [ "Please note "
-- , H.underline "the order"
-- , " of some cmd options is crucial. If used incorrectly may produce "
-- , "undesired tx body. See nested [] notation above for details."
-- ]
]
, pTransactionBuildCmd envCli
, pTransactionBuildEstimateCmd envCli
Expand Down Expand Up @@ -179,13 +179,13 @@ pTransactionBuildCmd envCli = do
[ pretty @String "Build a balanced transaction (automatically calculates fees)"
, line
, line
, H.yellow $
mconcat
[ "Please note "
, H.underline "the order"
, " of some cmd options is crucial. If used incorrectly may produce "
, "undesired tx body. See nested [] notation above for details."
]
-- , H.yellow $
-- mconcat
-- [ "Please note "
-- , H.underline "the order"
-- , " of some cmd options is crucial. If used incorrectly may produce "
-- , "undesired tx body. See nested [] notation above for details."
-- ]
]
where
pCmd era' = do
Expand Down Expand Up @@ -243,13 +243,13 @@ pTransactionBuildEstimateCmd _envCli = do
"Build a balanced transaction without access to a live node (automatically estimates fees)"
, line
, line
, H.yellow $
mconcat
[ "Please note "
, H.underline "the order"
, " of some cmd options is crucial. If used incorrectly may produce "
, "undesired tx body. See nested [] notation above for details."
]
-- , H.yellow $
-- mconcat
-- [ "Please note "
-- , H.underline "the order"
-- , " of some cmd options is crucial. If used incorrectly may produce "
-- , "undesired tx body. See nested [] notation above for details."
-- ]
]
where
pCmd :: Parser (TransactionCmds era)
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
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pPing =
, Opt.short 'm'
, Opt.metavar "MAGIC"
, Opt.help "Network magic."
, Opt.value CNP.mainnetMagic
, Opt.value (CNP.unNetworkMagic CNP.mainnetMagic)
]
)
<*> ( Opt.switch $
Expand Down
Loading
Loading