Skip to content

Commit 9237b8e

Browse files
authored
Merge pull request #1179 from IntersectMBO/jordan/rio-propagation-20250507
`RIO` propagation 2025-05-07
2 parents 170158e + 91554e7 commit 9237b8e

File tree

50 files changed

+316
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+316
-574
lines changed

cardano-cli/cardano-cli.cabal

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ library
192192
Cardano.CLI.Type.Error.GenesisCmdError
193193
Cardano.CLI.Type.Error.GovernanceActionsError
194194
Cardano.CLI.Type.Error.GovernanceCmdError
195-
Cardano.CLI.Type.Error.GovernanceCommitteeError
196195
Cardano.CLI.Type.Error.GovernanceQueryError
197-
Cardano.CLI.Type.Error.GovernanceVoteCmdError
198196
Cardano.CLI.Type.Error.HashCmdError
199197
Cardano.CLI.Type.Error.ItnKeyConversionError
200198
Cardano.CLI.Type.Error.KeyCmdError
@@ -424,7 +422,6 @@ test-suite cardano-cli-golden
424422
base16-bytestring,
425423
bytestring,
426424
cardano-api:{cardano-api, gen},
427-
cardano-binary,
428425
cardano-cli,
429426
cardano-cli:cardano-cli-test-lib,
430427
cardano-crypto-wrapper,

cardano-cli/src/Cardano/CLI/Compatible/Governance/Run.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ import Data.Typeable (Typeable)
1515

1616
runCompatibleGovernanceCmds :: Typeable era => CompatibleGovernanceCmds era -> CIO e ()
1717
runCompatibleGovernanceCmds = \case
18-
CreateCompatibleProtocolUpdateCmd cmd -> fromExceptTCli $ runGovernanceCmds cmd
18+
CreateCompatibleProtocolUpdateCmd cmd -> runGovernanceCmds cmd

cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,25 @@ import Vary.Utils ((:|))
120120

121121
runGenesisKeyGenGenesisCmd
122122
:: GenesisKeyGenGenesisCmdArgs
123-
-> ExceptT GenesisCmdError IO ()
123+
-> CIO e ()
124124
runGenesisKeyGenGenesisCmd
125125
Cmd.GenesisKeyGenGenesisCmdArgs
126126
{ Cmd.verificationKeyPath
127127
, Cmd.signingKeyPath
128128
} = do
129129
skey <- generateSigningKey AsGenesisKey
130130
let vkey = getVerificationKey skey
131-
firstExceptT GenesisCmdGenesisFileError . newExceptT $ do
132-
void $ writeLazyByteStringFile signingKeyPath $ textEnvelopeToJSON (Just skeyDesc) skey
133-
writeLazyByteStringFile verificationKeyPath $ textEnvelopeToJSON (Just Key.genesisVkeyDesc) vkey
131+
void $ writeLazyByteStringFile signingKeyPath $ textEnvelopeToJSON (Just skeyDesc) skey
132+
fromEitherIOCli @(FileError ()) $
133+
writeLazyByteStringFile verificationKeyPath $
134+
textEnvelopeToJSON (Just Key.genesisVkeyDesc) vkey
134135
where
135136
skeyDesc :: TextEnvelopeDescr
136137
skeyDesc = "Genesis Signing Key"
137138

138139
runGenesisKeyGenDelegateCmd
139140
:: GenesisKeyGenDelegateCmdArgs
140-
-> ExceptT GenesisCmdError IO ()
141+
-> CIO e ()
141142
runGenesisKeyGenDelegateCmd
142143
Cmd.GenesisKeyGenDelegateCmdArgs
143144
{ Cmd.verificationKeyPath
@@ -146,7 +147,7 @@ runGenesisKeyGenDelegateCmd
146147
} = do
147148
skey <- generateSigningKey AsGenesisDelegateKey
148149
let vkey = getVerificationKey skey
149-
firstExceptT GenesisCmdGenesisFileError . newExceptT $ do
150+
fromEitherIOCli @(FileError ()) $ do
150151
void $
151152
writeLazyByteStringFile signingKeyPath $
152153
textEnvelopeToJSON (Just skeyDesc) skey
@@ -188,15 +189,15 @@ runGenesisKeyGenDelegateVRF vkeyPath skeyPath = do
188189

189190
runGenesisKeyGenUTxOCmd
190191
:: GenesisKeyGenUTxOCmdArgs
191-
-> ExceptT GenesisCmdError IO ()
192+
-> CIO e ()
192193
runGenesisKeyGenUTxOCmd
193194
Cmd.GenesisKeyGenUTxOCmdArgs
194195
{ Cmd.verificationKeyPath
195196
, Cmd.signingKeyPath
196197
} = do
197198
skey <- generateSigningKey AsGenesisUTxOKey
198199
let vkey = getVerificationKey skey
199-
firstExceptT GenesisCmdGenesisFileError . newExceptT $ do
200+
fromEitherIOCli @(FileError ()) $ do
200201
void $
201202
writeLazyByteStringFile signingKeyPath $
202203
textEnvelopeToJSON (Just skeyDesc) skey
@@ -289,9 +290,8 @@ runGenesisCreateTestNetDataCmd
289290
stakeDelegatorsDirs = [stakeDelegatorsDir </> "delegator" <> show i | i <- [1 .. numOfStakeDelegators]]
290291

291292
forM_ [1 .. numGenesisKeys] $ \index -> do
292-
fromExceptTCli $ createGenesisKeys (genesisDir </> ("genesis" <> show index))
293-
fromExceptTCli $
294-
createDelegateKeys desiredKeyOutputFormat (delegateDir </> ("delegate" <> show index))
293+
createGenesisKeys (genesisDir </> ("genesis" <> show index))
294+
createDelegateKeys desiredKeyOutputFormat (delegateDir </> ("delegate" <> show index))
295295

296296
when (0 < numGenesisKeys) $ do
297297
fromExceptTCli $ writeREADME genesisDir genesisREADME
@@ -303,7 +303,7 @@ runGenesisCreateTestNetDataCmd
303303
| index <- [1 .. numUtxoKeys]
304304
]
305305
forM_ [1 .. numUtxoKeys] $ \index ->
306-
fromExceptTCli $ createUtxoKeys (utxoKeysDir </> ("utxo" <> show index))
306+
createUtxoKeys (utxoKeysDir </> ("utxo" <> show index))
307307

308308
fromExceptTCli $ when (0 < numUtxoKeys) $ writeREADME utxoKeysDir utxoKeysREADME
309309

@@ -337,11 +337,9 @@ runGenesisCreateTestNetDataCmd
337337
coldArgs = CC.GovernanceCommitteeKeyGenColdCmdArgs ConwayEraOnwardsConway vkeyColdFile skeyColdFile
338338
liftIO $ createDirectoryIfMissing True committeeDir
339339
void $
340-
fromExceptTCli $
341-
CC.runGovernanceCommitteeKeyGenHot hotArgs
340+
CC.runGovernanceCommitteeKeyGenHot hotArgs
342341
(vColdKey, _) <-
343-
fromExceptTCli $
344-
CC.runGovernanceCommitteeKeyGenCold coldArgs
342+
CC.runGovernanceCommitteeKeyGenCold coldArgs
345343
return vColdKey
346344

347345
fromExceptTCli $ when (0 < numCommitteeKeys) $ writeREADME committeesDir committeeREADME
@@ -350,7 +348,7 @@ runGenesisCreateTestNetDataCmd
350348
-- that before Conway, the number of DReps at this point is 0.
351349
g <- Random.getStdGen
352350

353-
dRepKeys <- fromExceptTCli $
351+
dRepKeys <-
354352
case dRepCredentialGenerationMode of
355353
OnDisk -> forM [1 .. numOfDRepCredentials] $ \index -> do
356354
let drepDir = drepsDir </> "drep" <> show index
@@ -643,7 +641,7 @@ mkPaths numKeys dir segment filename =
643641
createDelegateKeys
644642
:: Vary [FormatBech32, FormatTextEnvelope]
645643
-> FilePath
646-
-> ExceptT GenesisCmdError IO ()
644+
-> CIO e ()
647645
createDelegateKeys fmt dir = do
648646
liftIO $ createDirectoryIfMissing True dir
649647
runGenesisKeyGenDelegateCmd
@@ -652,10 +650,11 @@ createDelegateKeys fmt dir = do
652650
, Cmd.signingKeyPath = onlyOut coldSK
653651
, Cmd.opCertCounterPath = onlyOut opCertCtr
654652
}
655-
runGenesisKeyGenDelegateVRF
656-
(File @(VerificationKey ()) $ dir </> "vrf.vkey")
657-
(File @(SigningKey ()) $ dir </> "vrf.skey")
658-
firstExceptT GenesisCmdNodeCmdError $ do
653+
fromExceptTCli $
654+
runGenesisKeyGenDelegateVRF
655+
(File @(VerificationKey ()) $ dir </> "vrf.vkey")
656+
(File @(SigningKey ()) $ dir </> "vrf.skey")
657+
fromExceptTCli $ do
659658
runNodeKeyGenKesCmd $
660659
Cmd.NodeKeyGenKESCmdArgs
661660
fmt
@@ -673,7 +672,7 @@ createDelegateKeys fmt dir = do
673672
coldSK = File @(SigningKey ()) $ dir </> "key.skey"
674673
opCertCtr = File $ dir </> "opcert.counter"
675674

676-
createGenesisKeys :: FilePath -> ExceptT GenesisCmdError IO ()
675+
createGenesisKeys :: FilePath -> CIO e ()
677676
createGenesisKeys dir = do
678677
liftIO $ createDirectoryIfMissing True dir
679678
runGenesisKeyGenGenesisCmd
@@ -703,7 +702,7 @@ createStakeDelegatorCredentials dir = do
703702
stakingVK = File @(VerificationKey ()) $ dir </> "staking.vkey"
704703
stakingSK = File @(SigningKey ()) $ dir </> "staking.skey"
705704

706-
createUtxoKeys :: FilePath -> ExceptT GenesisCmdError IO ()
705+
createUtxoKeys :: FilePath -> CIO e ()
707706
createUtxoKeys dir = do
708707
liftIO $ createDirectoryIfMissing True dir
709708
runGenesisKeyGenUTxOCmd

0 commit comments

Comments
 (0)