Skip to content

Commit e7c8634

Browse files
committed
Remove genesis hash command
1 parent 7dc09c9 commit e7c8634

23 files changed

+0
-154
lines changed

cardano-cli/src/Cardano/CLI/EraBased/Commands/Genesis.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ data GenesisCmds era
3838
| GenesisVerKey !GenesisVerKeyCmdArgs
3939
| GenesisTxIn !GenesisTxInCmdArgs
4040
| GenesisAddr !GenesisAddrCmdArgs
41-
| GenesisHashFile !GenesisFile
4241
deriving Show
4342

4443
data GenesisCreateCmdArgs era = GenesisCreateCmdArgs
@@ -192,5 +191,3 @@ renderGenesisCmds = \case
192191
"genesis initial-txin"
193192
GenesisAddr{} ->
194193
"genesis initial-addr"
195-
GenesisHashFile{} ->
196-
"genesis hash"

cardano-cli/src/Cardano/CLI/EraBased/Options/Genesis.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ pGenesisCmds era envCli =
9999
mconcat
100100
[ "Create data to use for starting a testnet."
101101
]
102-
, Just $
103-
subParser "hash" $
104-
Opt.info pGenesisHash $
105-
Opt.progDesc "Compute the hash of a genesis file"
106102
]
107103

108104
pGenesisKeyGen :: Parser (GenesisCmds era)
@@ -360,10 +356,6 @@ pGenesisCreateTestNetData sbe envCli =
360356
, Opt.help "The directory where to generate the data. Created if not existing."
361357
]
362358

363-
pGenesisHash :: Parser (GenesisCmds era)
364-
pGenesisHash =
365-
GenesisHashFile <$> pGenesisFile "The genesis file."
366-
367359
pGenesisDir :: Parser GenesisDir
368360
pGenesisDir =
369361
fmap GenesisDir $

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module Cardano.CLI.EraBased.Run.Genesis
2020
, runGenesisCreateCardanoCmd
2121
, runGenesisCreateCmd
2222
, runGenesisCreateStakedCmd
23-
, runGenesisHashFileCmd
2423
, runGenesisKeyHashCmd
2524
, runGenesisTxInCmd
2625
, runGenesisVerKeyCmd
@@ -108,7 +107,6 @@ runGenesisCmds = \case
108107
GenesisCreateCardano args -> runGenesisCreateCardanoCmd args
109108
GenesisCreateStaked args -> runGenesisCreateStakedCmd args
110109
GenesisCreateTestNetData args -> TN.runGenesisCreateTestNetDataCmd args
111-
GenesisHashFile gf -> runGenesisHashFileCmd gf
112110

113111
runGenesisKeyHashCmd :: VerificationKeyFile In -> ExceptT GenesisCmdError IO ()
114112
runGenesisKeyHashCmd vkeyPath = do
@@ -1341,13 +1339,3 @@ readInitialFundAddresses utxodir nw = do
13411339
(PaymentCredentialByKey vkh)
13421340
NoStakeAddress
13431341
]
1344-
1345-
-- | Hash a genesis file
1346-
runGenesisHashFileCmd :: GenesisFile -> ExceptT GenesisCmdError IO ()
1347-
runGenesisHashFileCmd (GenesisFile fpath) = do
1348-
content <-
1349-
handleIOExceptT (GenesisCmdGenesisFileError . FileIOError fpath) $
1350-
BS.readFile fpath
1351-
let gh :: Crypto.Hash Crypto.Blake2b_256 ByteString
1352-
gh = Crypto.hashWith id content
1353-
liftIO $ Text.putStrLn (Crypto.hashToTextAsHex gh)

cardano-cli/src/Cardano/CLI/Legacy/Commands/Genesis.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ data LegacyGenesisCmds
8181
(VerificationKeyFile In)
8282
NetworkId
8383
(Maybe (File () Out))
84-
| GenesisHashFile
85-
GenesisFile
8684
deriving Show
8785

8886
renderLegacyGenesisCmds :: LegacyGenesisCmds -> Text
@@ -97,4 +95,3 @@ renderLegacyGenesisCmds = \case
9795
GenesisVerKey{} -> "genesis get-ver-key"
9896
GenesisTxIn{} -> "genesis initial-txin"
9997
GenesisAddr{} -> "genesis initial-addr"
100-
GenesisHashFile{} -> "genesis hash"

cardano-cli/src/Cardano/CLI/Legacy/Options.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ pGenesisCmds envCli =
171171
[ "Create a staked Shelley genesis file from a genesis "
172172
, "template and genesis/delegation/spending keys."
173173
]
174-
, subParser "hash" $
175-
Opt.info pGenesisHash $
176-
Opt.progDesc "Compute the hash of a genesis file"
177174
]
178175
where
179176
pGenesisKeyGen :: Parser LegacyGenesisCmds
@@ -278,10 +275,6 @@ pGenesisCmds envCli =
278275
<*> pStuffedUtxoCount
279276
<*> Opt.optional pRelayJsonFp
280277

281-
pGenesisHash :: Parser LegacyGenesisCmds
282-
pGenesisHash =
283-
GenesisHashFile <$> pGenesisFile "The genesis file."
284-
285278
pGenesisDir :: Parser GenesisDir
286279
pGenesisDir =
287280
fmap GenesisDir $

cardano-cli/src/Cardano/CLI/Legacy/Run/Genesis.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ runLegacyGenesisCmds = \case
4444
runLegacyGenesisCreateCardanoCmd eSbe gd gn un ms am k slotLength sc nw bg sg ag cg mNodeCfg
4545
GenesisCreateStaked eSbe fmt gd gn gp gl un ms am ds nw bf bp su relayJsonFp ->
4646
runLegacyGenesisCreateStakedCmd eSbe fmt gd gn gp gl un ms am ds nw bf bp su relayJsonFp
47-
GenesisHashFile gf ->
48-
runLegacyGenesisHashFileCmd gf
4947

5048
runLegacyGenesisKeyGenGenesisCmd
5149
:: ()
@@ -271,10 +269,3 @@ runLegacyGenesisCreateStakedCmd
271269
, Cmd.numStuffedUtxo = numStuffedUtxo
272270
, Cmd.mStakePoolRelaySpecFile = mStakePoolRelaySpecFile
273271
}
274-
275-
-- | Hash a genesis file
276-
runLegacyGenesisHashFileCmd
277-
:: ()
278-
=> GenesisFile
279-
-> ExceptT GenesisCmdError IO ()
280-
runLegacyGenesisHashFileCmd = runGenesisHashFileCmd

cardano-cli/test/cardano-cli-golden/files/golden/help.cli

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ Usage: cardano-cli legacy genesis
544544
| create-cardano
545545
| create
546546
| create-staked
547-
| hash
548547
)
549548

550549
Genesis block commands
@@ -665,10 +664,6 @@ Usage: cardano-cli legacy genesis create-staked
665664
Create a staked Shelley genesis file from a genesis template and
666665
genesis/delegation/spending keys.
667666

668-
Usage: cardano-cli legacy genesis hash --genesis FILEPATH
669-
670-
Compute the hash of a genesis file
671-
672667
Usage: cardano-cli byron
673668
( key
674669
| transaction
@@ -1095,7 +1090,6 @@ Usage: cardano-cli shelley genesis
10951090
| create
10961091
| create-staked
10971092
| create-testnet-data
1098-
| hash
10991093
)
11001094

11011095
Genesis block commands.
@@ -1217,10 +1211,6 @@ Usage: cardano-cli shelley genesis create-testnet-data [--spec-shelley FILEPATH]
12171211

12181212
Create data to use for starting a testnet.
12191213

1220-
Usage: cardano-cli shelley genesis hash --genesis FILEPATH
1221-
1222-
Compute the hash of a genesis file
1223-
12241214
Usage: cardano-cli shelley governance
12251215
( create-mir-certificate
12261216
| create-genesis-key-delegation-certificate
@@ -2168,7 +2158,6 @@ Usage: cardano-cli allegra genesis
21682158
| create
21692159
| create-staked
21702160
| create-testnet-data
2171-
| hash
21722161
)
21732162

21742163
Genesis block commands.
@@ -2290,10 +2279,6 @@ Usage: cardano-cli allegra genesis create-testnet-data [--spec-shelley FILEPATH]
22902279

22912280
Create data to use for starting a testnet.
22922281

2293-
Usage: cardano-cli allegra genesis hash --genesis FILEPATH
2294-
2295-
Compute the hash of a genesis file
2296-
22972282
Usage: cardano-cli allegra governance
22982283
( create-mir-certificate
22992284
| create-genesis-key-delegation-certificate
@@ -3241,7 +3226,6 @@ Usage: cardano-cli mary genesis
32413226
| create
32423227
| create-staked
32433228
| create-testnet-data
3244-
| hash
32453229
)
32463230

32473231
Genesis block commands.
@@ -3361,10 +3345,6 @@ Usage: cardano-cli mary genesis create-testnet-data [--spec-shelley FILEPATH]
33613345

33623346
Create data to use for starting a testnet.
33633347

3364-
Usage: cardano-cli mary genesis hash --genesis FILEPATH
3365-
3366-
Compute the hash of a genesis file
3367-
33683348
Usage: cardano-cli mary governance
33693349
( create-mir-certificate
33703350
| create-genesis-key-delegation-certificate
@@ -4304,7 +4284,6 @@ Usage: cardano-cli alonzo genesis
43044284
| create
43054285
| create-staked
43064286
| create-testnet-data
4307-
| hash
43084287
)
43094288

43104289
Genesis block commands.
@@ -4424,10 +4403,6 @@ Usage: cardano-cli alonzo genesis create-testnet-data [--spec-shelley FILEPATH]
44244403

44254404
Create data to use for starting a testnet.
44264405

4427-
Usage: cardano-cli alonzo genesis hash --genesis FILEPATH
4428-
4429-
Compute the hash of a genesis file
4430-
44314406
Usage: cardano-cli alonzo governance
44324407
( create-mir-certificate
44334408
| create-genesis-key-delegation-certificate
@@ -5382,7 +5357,6 @@ Usage: cardano-cli babbage genesis
53825357
| create
53835358
| create-staked
53845359
| create-testnet-data
5385-
| hash
53865360
)
53875361

53885362
Genesis block commands.
@@ -5504,10 +5478,6 @@ Usage: cardano-cli babbage genesis create-testnet-data [--spec-shelley FILEPATH]
55045478

55055479
Create data to use for starting a testnet.
55065480

5507-
Usage: cardano-cli babbage genesis hash --genesis FILEPATH
5508-
5509-
Compute the hash of a genesis file
5510-
55115481
Usage: cardano-cli babbage governance
55125482
( create-mir-certificate
55135483
| create-genesis-key-delegation-certificate
@@ -6740,7 +6710,6 @@ Usage: cardano-cli conway genesis
67406710
| create
67416711
| create-staked
67426712
| create-testnet-data
6743-
| hash
67446713
)
67456714

67466715
Genesis block commands.
@@ -6860,10 +6829,6 @@ Usage: cardano-cli conway genesis create-testnet-data [--spec-shelley FILEPATH]
68606829

68616830
Create data to use for starting a testnet.
68626831

6863-
Usage: cardano-cli conway genesis hash --genesis FILEPATH
6864-
6865-
Compute the hash of a genesis file
6866-
68676832
Usage: cardano-cli conway governance (action | committee | drep | vote)
68686833

68696834
Governance commands.
@@ -8740,7 +8705,6 @@ Usage: cardano-cli latest genesis
87408705
| create
87418706
| create-staked
87428707
| create-testnet-data
8743-
| hash
87448708
)
87458709

87468710
Genesis block commands.
@@ -8860,10 +8824,6 @@ Usage: cardano-cli latest genesis create-testnet-data [--spec-shelley FILEPATH]
88608824

88618825
Create data to use for starting a testnet.
88628826

8863-
Usage: cardano-cli latest genesis hash --genesis FILEPATH
8864-
8865-
Compute the hash of a genesis file
8866-
88678827
Usage: cardano-cli latest governance (action | committee | drep | vote)
88688828

88698829
Governance commands.

cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_genesis.cli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Usage: cardano-cli allegra genesis
1010
| create
1111
| create-staked
1212
| create-testnet-data
13-
| hash
1413
)
1514

1615
Genesis block commands.
@@ -36,4 +35,3 @@ Available commands:
3635
create-staked Create a staked Shelley genesis file from a genesis
3736
template and genesis/delegation/spending keys.
3837
create-testnet-data Create data to use for starting a testnet.
39-
hash Compute the hash of a genesis file

cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_genesis_hash.cli

Lines changed: 0 additions & 7 deletions
This file was deleted.

cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_genesis.cli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Usage: cardano-cli alonzo genesis
1010
| create
1111
| create-staked
1212
| create-testnet-data
13-
| hash
1413
)
1514

1615
Genesis block commands.
@@ -36,4 +35,3 @@ Available commands:
3635
create-staked Create a staked Shelley genesis file from a genesis
3736
template and genesis/delegation/spending keys.
3837
create-testnet-data Create data to use for starting a testnet.
39-
hash Compute the hash of a genesis file

0 commit comments

Comments
 (0)