From bd362ee590f35436a02b04d8a482392dbe941713 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 13 Jun 2018 15:13:51 -0700 Subject: [PATCH] Merge PR #1090: Switch away from ephemeral ports * Switch ports 4665x to be 2655x This is done so the default ports aren't in the linux kernel's default ephemeral port range. * Missed one doc file, change dep so gaiad works * Update changelog, fix Gopkg.lock --- CHANGELOG.md | 5 ++++- baseapp/helpers.go | 2 +- client/flags.go | 4 ++-- client/lcd/root.go | 2 +- client/rpc/block.go | 2 +- client/rpc/root.go | 2 +- client/rpc/status.go | 2 +- client/rpc/validators.go | 2 +- client/tx/query.go | 2 +- client/tx/search.go | 2 +- docs/old/basecoin/basics.rst | 2 +- docs/old/basecoin/extensions.rst | 2 +- docs/old/staking/local-testnet.rst | 12 ++++++------ docs/old/staking/public-testnet.rst | 2 +- docs/sdk/lcd-rest-api.yaml | 2 +- docs/staking/intro.rst | 2 +- docs/staking/testnet.rst | 2 +- examples/kvstore/main.go | 2 +- networks/remote/ansible/status.yml | 2 +- server/init.go | 2 +- server/start.go | 2 +- x/ibc/client/cli/README.md | 4 ++-- x/ibc/client/cli/relay.go | 2 +- 23 files changed, 33 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdfd1895f4..b37db22926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ *TBD* +BREAKING CHANGES +* Change default ports from 466xx to 266xx + ## 0.19.0 *June 13, 2018* @@ -24,7 +27,7 @@ IMPROVEMENTS FIXES * Fixes consensus fault on testnet - see postmortem [here](https://github.com/cosmos/cosmos-sdk/issues/1197#issuecomment-396823021) -* [x/stake] bonded inflation removed, non-bonded inflation partially implemented +* [x/stake] bonded inflation removed, non-bonded inflation partially implemented * [lcd] Switch to bech32 for addresses on all human readable inputs and outputs * [lcd] fixed tx indexing/querying * [cli] Added `--gas` flag to specify transaction gas limit diff --git a/baseapp/helpers.go b/baseapp/helpers.go index 43bd654d67..b7ac45d9aa 100644 --- a/baseapp/helpers.go +++ b/baseapp/helpers.go @@ -10,7 +10,7 @@ import ( func RunForever(app abci.Application) { // Start the ABCI server - srv, err := server.NewServer("0.0.0.0:46658", "socket", app) + srv, err := server.NewServer("0.0.0.0:26658", "socket", app) if err != nil { cmn.Exit(err.Error()) } diff --git a/client/flags.go b/client/flags.go index 4991b9a776..5af588bd44 100644 --- a/client/flags.go +++ b/client/flags.go @@ -25,7 +25,7 @@ func GetCommands(cmds ...*cobra.Command) []*cobra.Command { // TODO: make this default false when we support proofs c.Flags().Bool(FlagTrustNode, true, "Don't verify proofs for responses") c.Flags().String(FlagChainID, "", "Chain ID of tendermint node") - c.Flags().String(FlagNode, "tcp://localhost:46657", ": to tendermint rpc interface for this chain") + c.Flags().String(FlagNode, "tcp://localhost:26657", ": to tendermint rpc interface for this chain") c.Flags().Int64(FlagHeight, 0, "block height to query, omit to get most recent provable block") } return cmds @@ -39,7 +39,7 @@ func PostCommands(cmds ...*cobra.Command) []*cobra.Command { c.Flags().Int64(FlagSequence, 0, "Sequence number to sign the tx") c.Flags().String(FlagFee, "", "Fee to pay along with transaction") c.Flags().String(FlagChainID, "", "Chain ID of tendermint node") - c.Flags().String(FlagNode, "tcp://localhost:46657", ": to tendermint rpc interface for this chain") + c.Flags().String(FlagNode, "tcp://localhost:26657", ": to tendermint rpc interface for this chain") c.Flags().Int64(FlagGas, 200000, "gas limit to set per-transaction") } return cmds diff --git a/client/lcd/root.go b/client/lcd/root.go index 66491dfec1..7d819740cd 100644 --- a/client/lcd/root.go +++ b/client/lcd/root.go @@ -57,7 +57,7 @@ func ServeCommand(cdc *wire.Codec) *cobra.Command { cmd.Flags().StringP(flagListenAddr, "a", "tcp://localhost:1317", "Address for server to listen on") cmd.Flags().String(flagCORS, "", "Set to domains that can make CORS requests (* for all)") cmd.Flags().StringP(client.FlagChainID, "c", "", "ID of chain we connect to") - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") return cmd } diff --git a/client/rpc/block.go b/client/rpc/block.go index 693298bb86..3244e8d122 100644 --- a/client/rpc/block.go +++ b/client/rpc/block.go @@ -24,7 +24,7 @@ func BlockCommand() *cobra.Command { Args: cobra.MaximumNArgs(1), RunE: printBlock, } - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") // TODO: change this to false when we can cmd.Flags().Bool(client.FlagTrustNode, true, "Don't verify proofs for responses") cmd.Flags().StringSlice(flagSelect, []string{"header", "tx"}, "Fields to return (header|txs|results)") diff --git a/client/rpc/root.go b/client/rpc/root.go index 63ba64a18b..bb5a162a7f 100644 --- a/client/rpc/root.go +++ b/client/rpc/root.go @@ -36,7 +36,7 @@ func initClientCommand() *cobra.Command { RunE: todoNotImplemented, } cmd.Flags().StringP(client.FlagChainID, "c", "", "ID of chain we connect to") - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") cmd.Flags().String(flagGenesis, "", "Genesis file to verify header validity") cmd.Flags().String(flagCommit, "", "File with trusted and signed header") cmd.Flags().String(flagValHash, "", "Hash of trusted validator set (hex-encoded)") diff --git a/client/rpc/status.go b/client/rpc/status.go index 70d6628e43..96517cc190 100644 --- a/client/rpc/status.go +++ b/client/rpc/status.go @@ -18,7 +18,7 @@ func statusCommand() *cobra.Command { Short: "Query remote node for status", RunE: printNodeStatus, } - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") return cmd } diff --git a/client/rpc/validators.go b/client/rpc/validators.go index f8835d7377..d88fb73173 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -24,7 +24,7 @@ func ValidatorCommand() *cobra.Command { Args: cobra.MaximumNArgs(1), RunE: printValidators, } - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") // TODO: change this to false when we can cmd.Flags().Bool(client.FlagTrustNode, true, "Don't verify proofs for responses") return cmd diff --git a/client/tx/query.go b/client/tx/query.go index 7673dd38db..86439b3177 100644 --- a/client/tx/query.go +++ b/client/tx/query.go @@ -42,7 +42,7 @@ func QueryTxCmd(cdc *wire.Codec) *cobra.Command { }, } - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") // TODO: change this to false when we can cmd.Flags().Bool(client.FlagTrustNode, true, "Don't verify proofs for responses") diff --git a/client/tx/search.go b/client/tx/search.go index b3ebbf34ef..7c75be8f7e 100644 --- a/client/tx/search.go +++ b/client/tx/search.go @@ -43,7 +43,7 @@ func SearchTxCmd(cdc *wire.Codec) *cobra.Command { }, } - cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:46657", "Node to connect to") + cmd.Flags().StringP(client.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") // TODO: change this to false once proofs built in cmd.Flags().Bool(client.FlagTrustNode, true, "Don't verify proofs for responses") diff --git a/docs/old/basecoin/basics.rst b/docs/old/basecoin/basics.rst index d3627b2b10..3b61dd6e55 100644 --- a/docs/old/basecoin/basics.rst +++ b/docs/old/basecoin/basics.rst @@ -78,7 +78,7 @@ window. Here run: :: - basecli init --node=tcp://localhost:46657 --genesis=$HOME/.basecoin/genesis.json + basecli init --node=tcp://localhost:26657 --genesis=$HOME/.basecoin/genesis.json If you provide the genesis file to basecli, it can calculate the proper chainID and validator hash. Basecli needs to get this information from diff --git a/docs/old/basecoin/extensions.rst b/docs/old/basecoin/extensions.rst index c1db864a3c..6f31222def 100644 --- a/docs/old/basecoin/extensions.rst +++ b/docs/old/basecoin/extensions.rst @@ -49,7 +49,7 @@ initialize the light-client and send a transaction: :: - countercli init --node=tcp://localhost:46657 --genesis=$HOME/.counter/genesis.json + countercli init --node=tcp://localhost:26657 --genesis=$HOME/.counter/genesis.json YOU=$(countercli keys get friend | awk '{print $2}') countercli tx send --name=cool --amount=1000mycoin --to=$YOU --sequence=1 diff --git a/docs/old/staking/local-testnet.rst b/docs/old/staking/local-testnet.rst index e3f69bded1..b8d30d2e21 100644 --- a/docs/old/staking/local-testnet.rst +++ b/docs/old/staking/local-testnet.rst @@ -39,18 +39,18 @@ and ports. It should look like: :: - proxy_app = "tcp://127.0.0.1:46668" + proxy_app = "tcp://127.0.0.1:26668" moniker = "anonymous" fast_sync = true db_backend = "leveldb" log_level = "state:info,*:error" [rpc] - laddr = "tcp://0.0.0.0:46667" + laddr = "tcp://0.0.0.0:26667" [p2p] - laddr = "tcp://0.0.0.0:46666" - seeds = "0.0.0.0:46656" + laddr = "tcp://0.0.0.0:26666" + seeds = "0.0.0.0:26656" Start Nodes ----------- @@ -69,14 +69,14 @@ account: :: - gaia client init --chain-id=gaia-test --node=tcp://localhost:46657 + gaia client init --chain-id=gaia-test --node=tcp://localhost:26657 gaia client query account 5D93A6059B6592833CBC8FA3DA90EE0382198985 To see what tendermint considers the validator set is, use: :: - curl localhost:46657/validators + curl localhost:26657/validators and compare the information in this file: ``~/.gaia1/priv_validator.json``. The ``address`` and ``pub_key`` fields should match. diff --git a/docs/old/staking/public-testnet.rst b/docs/old/staking/public-testnet.rst index 6401636428..587c025b17 100644 --- a/docs/old/staking/public-testnet.rst +++ b/docs/old/staking/public-testnet.rst @@ -49,7 +49,7 @@ Finally, let's initialize the gaia client to interact with the testnet: :: - gaia client init --chain-id=gaia-1 --node=tcp://localhost:46657 + gaia client init --chain-id=gaia-1 --node=tcp://localhost:26657 and check our balance: diff --git a/docs/sdk/lcd-rest-api.yaml b/docs/sdk/lcd-rest-api.yaml index 3008d7f73c..6a5be2394d 100644 --- a/docs/sdk/lcd-rest-api.yaml +++ b/docs/sdk/lcd-rest-api.yaml @@ -41,7 +41,7 @@ paths: type: string listen_addr: type: string - example: 192.168.56.1:46656 + example: 192.168.56.1:26656 version: description: Tendermint version type: string diff --git a/docs/staking/intro.rst b/docs/staking/intro.rst index 00a68811a8..3ed20852b4 100644 --- a/docs/staking/intro.rst +++ b/docs/staking/intro.rst @@ -291,7 +291,7 @@ To confirm for certain the new validator is active, ask the tendermint node: :: - curl localhost:46657/validators + curl localhost:26657/validators If you now kill either node, blocks will stop streaming in, because there aren't enough validators online. Turn it back on and they will diff --git a/docs/staking/testnet.rst b/docs/staking/testnet.rst index 4fca09c4ad..0e86a952d2 100644 --- a/docs/staking/testnet.rst +++ b/docs/staking/testnet.rst @@ -66,7 +66,7 @@ To confirm for certain the new validator is active, check tendermint: :: - curl localhost:46657/validators + curl localhost:26657/validators Finally, to relinquish all your power, unbond some coins. You should see your VotingPower reduce and your account balance increase. diff --git a/examples/kvstore/main.go b/examples/kvstore/main.go index 856538f63a..6835f54071 100644 --- a/examples/kvstore/main.go +++ b/examples/kvstore/main.go @@ -50,7 +50,7 @@ func main() { } // Start the ABCI server - srv, err := server.NewServer("0.0.0.0:46658", "socket", baseApp) + srv, err := server.NewServer("0.0.0.0:26658", "socket", baseApp) if err != nil { fmt.Println(err) os.Exit(1) diff --git a/networks/remote/ansible/status.yml b/networks/remote/ansible/status.yml index fffba41fce..d0b89d13f6 100644 --- a/networks/remote/ansible/status.yml +++ b/networks/remote/ansible/status.yml @@ -9,7 +9,7 @@ - name: Gather status uri: body_format: json - url: "http://{{inventory_hostname}}:46657/status" + url: "http://{{inventory_hostname}}:26657/status" register: status - name: Print status diff --git a/server/init.go b/server/init.go index 512751bed0..5e5a73fbeb 100644 --- a/server/init.go +++ b/server/init.go @@ -255,7 +255,7 @@ func processGenTxs(genTxsDir string, cdc *wire.Codec, appInit AppInit) ( if len(persistentPeers) == 0 { comma = "" } - persistentPeers += fmt.Sprintf("%s%s@%s:46656", comma, genTx.NodeID, genTx.IP) + persistentPeers += fmt.Sprintf("%s%s@%s:26656", comma, genTx.NodeID, genTx.IP) } return diff --git a/server/start.go b/server/start.go index 5224ef30d2..77a18fffb9 100644 --- a/server/start.go +++ b/server/start.go @@ -37,7 +37,7 @@ func StartCmd(ctx *Context, appCreator AppCreator) *cobra.Command { // basic flags for abci app cmd.Flags().Bool(flagWithTendermint, true, "run abci app embedded in-process with tendermint") - cmd.Flags().String(flagAddress, "tcp://0.0.0.0:46658", "Listen address") + cmd.Flags().String(flagAddress, "tcp://0.0.0.0:26658", "Listen address") // AddNodeFlags adds support for all tendermint-specific command line options tcmd.AddNodeFlags(cmd) diff --git a/x/ibc/client/cli/README.md b/x/ibc/client/cli/README.md index ed9652fa34..e91fb55bfc 100644 --- a/x/ibc/client/cli/README.md +++ b/x/ibc/client/cli/README.md @@ -58,7 +58,7 @@ I[04-02|14:09:14.453] Generated genesis file module=main p } > ADDR2=DC26002735D3AA9573707CFA6D77C12349E49868 > ID2=test-chain-4XHTPn -> NODE2=tcp://0.0.0.0:46657 +> NODE2=tcp://0.0.0.0:26657 > basecli keys add key2 --recover Enter a passphrase for your key: Repeat the passphrase: @@ -70,7 +70,7 @@ key2 DC26002735D3AA9573707CFA6D77C12349E49868 > basecoind start --home ~/.chain1 --address tcp://0.0.0.0:36658 --rpc.laddr tcp://0.0.0.0:36657 --p2p.laddr tcp://0.0.0.0:36656 ... -> basecoind start --home ~/.chain2 # --address tcp://0.0.0.0:46658 --rpc.laddr tcp://0.0.0.0:46657 --p2p.laddr tcp://0.0.0.0:46656 +> basecoind start --home ~/.chain2 # --address tcp://0.0.0.0:26658 --rpc.laddr tcp://0.0.0.0:26657 --p2p.laddr tcp://0.0.0.0:26656 ... ``` ## Check balance diff --git a/x/ibc/client/cli/relay.go b/x/ibc/client/cli/relay.go index 96c5b08cc7..9742f83f93 100644 --- a/x/ibc/client/cli/relay.go +++ b/x/ibc/client/cli/relay.go @@ -54,7 +54,7 @@ func IBCRelayCmd(cdc *wire.Codec) *cobra.Command { } cmd.Flags().String(FlagFromChainID, "", "Chain ID for ibc node to check outgoing packets") - cmd.Flags().String(FlagFromChainNode, "tcp://localhost:46657", ": to tendermint rpc interface for this chain") + cmd.Flags().String(FlagFromChainNode, "tcp://localhost:26657", ": to tendermint rpc interface for this chain") cmd.Flags().String(FlagToChainID, "", "Chain ID for ibc node to broadcast incoming packets") cmd.Flags().String(FlagToChainNode, "tcp://localhost:36657", ": to tendermint rpc interface for this chain")