Skip to content

Commit

Permalink
chore: Remove deprecated flags (Do NOT backport) (#202)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
  • Loading branch information
facundomedica and alexanderbez authored Feb 21, 2022
1 parent ad30eb2 commit 71cf555
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions cmd/peggo/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const (
flagEthGasAdjustment = "eth-gas-price-adjustment"
flagEthGasLimitAdjustment = "eth-gas-limit-adjustment"
flagEthAlchemyWS = "eth-alchemy-ws"
flagRelayValsets = "relay-valsets"
flagValsetRelayMode = "valset-relay-mode"
flagRelayBatches = "relay-batches"
flagCoinGeckoAPI = "coingecko-api"
Expand Down Expand Up @@ -81,9 +80,7 @@ func ethereumKeyOptsFlagSet() *pflag.FlagSet {
fs.String(flagEthKeystoreDir, "", "Specify the Ethereum keystore directory (Geth-format) prefix")
fs.String(flagEthFrom, "", "Specify the Ethereum from address; If specified, it must exist in the keystore, ledger or match the privkey")
fs.String(flagEthPassphrase, "", "Specify the passphrase to unlock the private key from armor; If empty then STDIN is used")
fs.String(flagEthPK, "", "Provide the Ethereum private key of the orchestrator in hex")
fs.Bool(flagEthUseLedger, false, "Use the Ethereum app on hardware ledger to sign transactions")
_ = fs.MarkDeprecated(flagEthPK, "use the env var $PEGGO_ETH_PK instead")
return fs
}

Expand All @@ -101,10 +98,8 @@ func bridgeFlagSet() *pflag.FlagSet {
fs := pflag.NewFlagSet("", pflag.ContinueOnError)

fs.String(flagEthRPC, "http://localhost:8545", "Specify the RPC address of an Ethereum node")
fs.String(flagEthPK, "", "Provide the Ethereum private key of the orchestrator in hex")
fs.Int64(flagEthGasPrice, 0, "The Ethereum gas price to include in the transaction; If zero, gas price will be estimated")
fs.Int64(flagEthGasLimit, 6000000, "The Ethereum gas limit to include in the transaction")
_ = fs.MarkDeprecated(flagEthPK, "use the env var $PEGGO_ETH_PK instead")

return fs
}
9 changes: 0 additions & 9 deletions cmd/peggo/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,11 @@ func getOrchestratorCmd() *cobra.Command {
// Here we cast the float64 to a Duration (int64); as we are dealing with ms, we'll lose as much as 1ms.
relayerLoopDuration := time.Duration(ethBlockTimeF64*relayerLoopMultiplier) * time.Millisecond

relayValsets := konfig.Bool(flagRelayValsets)
valsetRelayMode, err := validateRelayValsetsMode(konfig.String(flagValsetRelayMode))
if err != nil {
return err
}

// If relayValsets is true then the user didn't specify a value for 'valset-relay-mode',
// so we'll default to "minimum".
if relayValsets && valsetRelayMode == relayer.ValsetRelayModeNone {
valsetRelayMode = relayer.ValsetRelayModeMinimum
}

relayer := relayer.NewGravityRelayer(
logger,
gravityQuerier,
Expand Down Expand Up @@ -255,7 +248,6 @@ func getOrchestratorCmd() *cobra.Command {
},
}

cmd.Flags().Bool(flagRelayValsets, false, "Relay validator set updates to Ethereum")
cmd.Flags().String(flagValsetRelayMode, relayer.ValsetRelayModeNone.String(), "Set an (optional) relaying mode for valset updates to Ethereum. Possible values: none, minimum, all")
cmd.Flags().Bool(flagRelayBatches, false, "Relay transaction batches to Ethereum")
cmd.Flags().Int64(flagEthBlocksPerLoop, 2000, "Number of Ethereum blocks to process per orchestrator loop")
Expand All @@ -272,7 +264,6 @@ func getOrchestratorCmd() *cobra.Command {
cmd.Flags().AddFlagSet(cosmosKeyringFlagSet())
cmd.Flags().AddFlagSet(ethereumKeyOptsFlagSet())
cmd.Flags().AddFlagSet(ethereumOptsFlagSet())
_ = cmd.Flags().MarkDeprecated(flagRelayValsets, "use --valset-relay-mode instead")

return cmd
}
Expand Down

0 comments on commit 71cf555

Please sign in to comment.