diff --git a/auth/types/txbuilder.go b/auth/types/txbuilder.go index bc316d9d3..ef8d221a2 100644 --- a/auth/types/txbuilder.go +++ b/auth/types/txbuilder.go @@ -72,7 +72,7 @@ func NewTxBuilderFromCLI() TxBuilder { gas: client.GasFlagVar.Gas, gasAdjustment: viper.GetFloat64(client.FlagGasAdjustment), simulateAndExecute: client.GasFlagVar.Simulate, - chainID: viper.GetString(client.FlagChain), + chainID: viper.GetString(client.FlagChainID), memo: viper.GetString(client.FlagMemo), } diff --git a/cmd/heimdallcli/main.go b/cmd/heimdallcli/main.go index c26b23e1a..08271847a 100644 --- a/cmd/heimdallcli/main.go +++ b/cmd/heimdallcli/main.go @@ -94,7 +94,7 @@ func main() { // with the cdc. // chain id - rootCmd.PersistentFlags().String(client.FlagChain, "", "Chain ID of tendermint node") + rootCmd.PersistentFlags().String(client.FlagChainID, "", "Chain ID of tendermint node") helper.DecorateWithHeimdallFlags(rootCmd, viper.GetViper(), logger, "main") @@ -214,7 +214,7 @@ func exportCmd(ctx *server.Context, _ *codec.Codec) *cobra.Command { config.SetRoot(viper.GetString(cli.HomeFlag)) // create chain id - chainID := viper.GetString(client.FlagChain) + chainID := viper.GetString(client.FlagChainID) if chainID == "" { chainID = fmt.Sprintf("heimdall-%v", common.RandStr(6)) } @@ -246,7 +246,7 @@ func exportCmd(ctx *server.Context, _ *codec.Codec) *cobra.Command { } cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "Node's home directory") cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory") - cmd.Flags().String(client.FlagChain, "", "Genesis file chain-id, if left blank will be randomly created") + cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created") return cmd } diff --git a/cmd/heimdalld/service/init.go b/cmd/heimdalld/service/init.go index 80dd7848a..55343d8e4 100644 --- a/cmd/heimdalld/service/init.go +++ b/cmd/heimdalld/service/init.go @@ -172,7 +172,7 @@ func initCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command { Args: cobra.NoArgs, RunE: func(_ *cobra.Command, _ []string) error { initConfig := &initHeimdallConfig{ - chainID: viper.GetString(client.FlagChain), + chainID: viper.GetString(client.FlagChainID), chain: viper.GetString(helper.ChainFlag), validatorID: viper.GetInt64(stakingcli.FlagValidatorID), clientHome: viper.GetString(helper.FlagClientHome), @@ -186,7 +186,7 @@ func initCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command { cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "Node's home directory") cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory") - cmd.Flags().String(client.FlagChain, "", "Genesis file chain-id, if left blank will be randomly created") + cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created") cmd.Flags().Int(stakingcli.FlagValidatorID, 1, "--id=, if left blank will be assigned 1") cmd.Flags().Bool(helper.OverwriteGenesisFlag, false, "Overwrite the genesis.json file if it exists") diff --git a/cmd/heimdalld/service/rollback.go b/cmd/heimdalld/service/rollback.go index b3133a5b3..c1d71dddf 100644 --- a/cmd/heimdalld/service/rollback.go +++ b/cmd/heimdalld/service/rollback.go @@ -61,7 +61,7 @@ application. cmd.Flags().Bool(flagForce, false, "force rollback") cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "Node's home directory") cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory") - cmd.Flags().String(client.FlagChain, "", "Genesis file chain-id, if left blank will be randomly created") + cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created") cmd.Flags().Int(stakingcli.FlagValidatorID, 1, "--id=, if left blank will be assigned 1") return cmd diff --git a/cmd/heimdalld/service/testnet.go b/cmd/heimdalld/service/testnet.go index 76c44954b..33341a570 100644 --- a/cmd/heimdalld/service/testnet.go +++ b/cmd/heimdalld/service/testnet.go @@ -46,7 +46,7 @@ testnet --v 4 --n 8 --output-dir ./output --starting-ip-address 192.168.10.2 outDir := viper.GetString(flagOutputDir) // create chain id - chainID := viper.GetString(client.FlagChain) + chainID := viper.GetString(client.FlagChainID) if chainID == "" { chainID = fmt.Sprintf("heimdall-%v", common.RandStr(6)) } @@ -239,7 +239,7 @@ testnet --v 4 --n 8 --output-dir ./output --starting-ip-address 192.168.10.2 cmd.Flags().String(flagNodeHostPrefix, "node", "Hostname prefix (node results in persistent peers list ID0@node0:26656, ID1@node1:26656, ...)") - cmd.Flags().String(client.FlagChain, "", "Genesis file chain-id, if left blank will be randomly created") + cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created") cmd.Flags().Bool("signer-dump", true, "Dumps all signer information in a json file") return cmd diff --git a/go.mod b/go.mod index 188e1cd37..6b6332f0a 100644 --- a/go.mod +++ b/go.mod @@ -74,6 +74,7 @@ require ( github.com/stumble/gorocksdb v0.0.3 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.12 // indirect + github.com/tendermint/btcd v0.1.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect @@ -171,7 +172,7 @@ replace github.com/tendermint/tendermint => github.com/maticnetwork/tendermint v replace github.com/tendermint/tm-db => github.com/tendermint/tm-db v0.2.0 -replace github.com/cosmos/cosmos-sdk => github.com/maticnetwork/cosmos-sdk v0.38.5-0.20240607074904-fb48e72cb2b0 +replace github.com/cosmos/cosmos-sdk => github.com/maticnetwork/cosmos-sdk v0.38.5-0.20240607072526-1c68ef662c09 replace github.com/ethereum/go-ethereum => github.com/maticnetwork/bor v1.4.1 diff --git a/go.sum b/go.sum index e9696a37d..e918707a8 100644 --- a/go.sum +++ b/go.sum @@ -2224,8 +2224,8 @@ github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNf github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maticnetwork/bor v1.4.1 h1:IS6/ap7TgUYIEzM5uwq776NxOkx4rziyit32UZUPDyU= github.com/maticnetwork/bor v1.4.1/go.mod h1:DSIYFopCa1PqDOI6f3cTunTbSCL2VpBhGwAsTFiYMbo= -github.com/maticnetwork/cosmos-sdk v0.38.5-0.20240607074904-fb48e72cb2b0 h1:OgqW/Alx8vbZXjxY5ATpisTmj95Rvnntii1VbF8MC7c= -github.com/maticnetwork/cosmos-sdk v0.38.5-0.20240607074904-fb48e72cb2b0/go.mod h1:UO5jPHn0McJyQYW2PxCN+GlryBQjWmbOGQilS2wMNKw= +github.com/maticnetwork/cosmos-sdk v0.38.5-0.20240607072526-1c68ef662c09 h1:FWi2zxpM8t62sejfmjokOz+iH8C6e7ka9UA3HeVyBcM= +github.com/maticnetwork/cosmos-sdk v0.38.5-0.20240607072526-1c68ef662c09/go.mod h1:NbuVdUoqlRF6RrFJp27hpbqSoRB8cJJfUxCzUJWtaLA= github.com/maticnetwork/crand v1.0.2 h1:Af0tAivC8zrxXDpGWNWVT/0s1fOz8w0eRbahZgURS8I= github.com/maticnetwork/crand v1.0.2/go.mod h1:/NRNL3bj2eYdqpWmoIP5puxndTpi0XRxpj5ZKxfHjyg= github.com/maticnetwork/heimdall v1.0.7/go.mod h1:+ANI5+VV28ahwfdl7oMzrcNwaTEs1Fn6z39BqBGcvaA= @@ -2490,7 +2490,6 @@ github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NX github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -2671,6 +2670,7 @@ github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOd github.com/tdewolff/parse/v2 v2.6.7/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= @@ -3808,7 +3808,6 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230920183334-c177e329c48b/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= diff --git a/server/root.go b/server/root.go index 6a80db517..ee46e354e 100644 --- a/server/root.go +++ b/server/root.go @@ -78,7 +78,7 @@ func StartRestServer(mainCtx ctx.Context, cdc *codec.Codec, registerRoutesFn fun logger.Info( fmt.Sprintf( "Starting application REST service (chain-id: %q)...", - viper.GetString(flags.FlagChain), + viper.GetString(flags.FlagChainID), ), ) @@ -253,7 +253,7 @@ func DecorateWithRestFlags(cmd *cobra.Command) { cmd.Flags().Uint(FlagRPCReadHeaderTimeout, 10, "The RPC header read timeout (in seconds)") cmd.Flags().Uint(client.FlagRPCWriteTimeout, 10, "The RPC write timeout (in seconds)") // heimdall specific flags for rest server start - cmd.Flags().String(client.FlagChain, "", "The chain ID to connect to") + cmd.Flags().String(client.FlagChainID, "", "The chain ID to connect to") cmd.Flags().String(client.FlagNode, helper.DefaultTendermintNode, "Address of the node to connect to") // heimdall specific flags for gRPC server start cmd.Flags().String(FlagGrpcAddr, "0.0.0.0:3132", "The address for the gRPC server to listen on")