Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming bakers to validators. #283

Merged
merged 4 commits into from
Nov 13, 2023
Merged
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
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- Revise client's reconnect handling so that the client will no longer attempt
to automatically reconnect on timeouts and node resource exhaustion.
- Rename bakers to validators in output.
- Add additional configuration options that use `validator` in place of `baker`.
For example `concordium-client validator add`.
The older options still exist, but are hidden.

## 6.1.0

Expand Down
129 changes: 74 additions & 55 deletions src/Concordium/Client/Commands.hs

Large diffs are not rendered by default.

55 changes: 31 additions & 24 deletions src/Concordium/Client/LegacyCommands.hs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ legacyProgramOptions =
<> getInstanceInfoCommand
<> invokeContractCommand
<> getPoolStatusCommand
<> getBakerListCommand
<> getBakerListCommand "GetValidatorList"
<> getRewardStatusCommand
<> getBirkParametersCommand
<> getModuleListCommand
Expand All @@ -215,12 +215,19 @@ legacyProgramOptions =
<> getAnonymityRevokersCommand
<> getCryptographicParametersCommand
<> getNextUpdateSequenceNumbersCommand
<> getBakersRewardPeriodCommand
<> getBakersRewardPeriodCommand "GetValidatorsRewardPeriod"
<> getBlockCertificatesCommand
<> getBakerEarliestWinTimeCommand
<> getWinningBakersEpochCommand
<> getBakerEarliestWinTimeCommand "GetValidatorEarliestWinTime"
<> getWinningBakersEpochCommand "GetWinningValidatorsEpoch"
<> getFirstBlockEpochCommand
)
<|> hsubparser
( internal
<> getBakerListCommand "GetBakerList"
<> getBakersRewardPeriodCommand "GetBakersRewardPeriod"
<> getBakerEarliestWinTimeCommand "GetBakerEarliestWinTime"
<> getWinningBakersEpochCommand "GetWinningBakersEpoch"
)

getPeerDataCommand :: Mod CommandFields LegacyCmd
getPeerDataCommand =
Expand Down Expand Up @@ -250,7 +257,7 @@ sendTransactionCommand =
(metavar "TX-SOURCE" <> help "JSON file with the transaction")
)
( progDesc
"Parse transaction in current context and send it to the baker."
"Parse transaction in current context and send it to the node."
)
)

Expand Down Expand Up @@ -424,15 +431,15 @@ getNextUpdateSequenceNumbersCommand =
(progDesc "Query the gRPC server for the next update sequence numbers for all update queues.")
)

getBakersRewardPeriodCommand :: Mod CommandFields LegacyCmd
getBakersRewardPeriodCommand =
getBakersRewardPeriodCommand :: String -> Mod CommandFields LegacyCmd
getBakersRewardPeriodCommand name =
command
"GetBakersRewardPeriod"
name
( info
( GetBakersRewardPeriod
<$> optional (strArgument (metavar "BLOCK-HASH" <> help "Hash of the block to query (default: Query the best block)"))
)
(progDesc "Query the gRPC server for the bakers of the reward period given by the block.")
(progDesc "Query the gRPC server for the validators of the reward period given by the block.")
)

getBlockCertificatesCommand :: Mod CommandFields LegacyCmd
Expand All @@ -446,16 +453,16 @@ getBlockCertificatesCommand =
(progDesc "Query the gRPC server for the certificates of a block.")
)

getBakerEarliestWinTimeCommand :: Mod CommandFields LegacyCmd
getBakerEarliestWinTimeCommand =
getBakerEarliestWinTimeCommand :: String -> Mod CommandFields LegacyCmd
getBakerEarliestWinTimeCommand name =
command
"GetBakerEarliestWinTime"
name
( info
( GetBakerEarliestWinTime
<$> argument auto (metavar "BAKER-ID" <> help "Baker ID of the baker.")
<$> argument auto (metavar "VALIDATOR-ID" <> help "Validator ID of the validator.")
)
( progDesc
"Query the gRPC server for the earliest time that a given baker is expected \
"Query the gRPC server for the earliest time that a given validator is expected \
\to bake."
)
)
Expand Down Expand Up @@ -499,21 +506,21 @@ getPoolStatusCommand =
"GetPoolStatus"
( info
( GetPoolStatus
<$> optional (option auto (long "pool" <> metavar "POOL" <> help "Baker ID of pool. If not provided, status of passive delegation is queried."))
<$> optional (option auto (long "pool" <> metavar "POOL" <> help "Validator ID of pool. If not provided, status of passive delegation is queried."))
<*> optional
( strArgument
( metavar "BLOCK-HASH"
<> help "Hash of the block to query (default: Query the best block)"
)
)
)
(progDesc "Query the gRPC server for the status of a baker pool or passive delegation.")
(progDesc "Query the gRPC server for the status of a validator pool or passive delegation.")
)

getBakerListCommand :: Mod CommandFields LegacyCmd
getBakerListCommand =
getBakerListCommand :: String -> Mod CommandFields LegacyCmd
getBakerListCommand name =
command
"GetBakerList"
name
( info
( GetBakerList
<$> optional
Expand All @@ -523,7 +530,7 @@ getBakerListCommand =
)
)
)
(progDesc "Query the gRPC server for the list of bakers.")
(progDesc "Query the gRPC server for the list of validators.")
)

getRewardStatusCommand :: Mod CommandFields LegacyCmd
Expand Down Expand Up @@ -716,13 +723,13 @@ getCryptographicParametersCommand =
(progDesc "Query the gRPC server for the cryptographic parameters in a specific block.")
)

getWinningBakersEpochCommand :: Mod CommandFields LegacyCmd
getWinningBakersEpochCommand =
getWinningBakersEpochCommand :: String -> Mod CommandFields LegacyCmd
getWinningBakersEpochCommand name =
command
"GetWinningBakersEpoch"
name
( info
(GetWinningBakersEpoch <$> parseEpochSpecifier)
(progDesc "Query the winning bakers for an epoch.")
(progDesc "Query the winning validators for an epoch.")
)

getFirstBlockEpochCommand :: Mod CommandFields LegacyCmd
Expand Down
Loading
Loading