From 955a690a93dde6d13f9596a9aff993f7e824adf4 Mon Sep 17 00:00:00 2001 From: HeeJin Lee Date: Wed, 31 May 2023 16:14:51 +0900 Subject: [PATCH 1/4] Change default port for initialize --- plugins/node_active_status/main.go | 2 +- plugins/node_block_sync/main.go | 22 +++++++++++----------- plugins/node_governance_alarm/main.go | 2 +- plugins/node_is_alived/main.go | 2 +- plugins/node_peer_count/main.go | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/node_active_status/main.go b/plugins/node_active_status/main.go index 2a9260d..d603cee 100644 --- a/plugins/node_active_status/main.go +++ b/plugins/node_active_status/main.go @@ -16,7 +16,7 @@ const ( // Default values. defaultRPCAddr = "http://localhost:1317" defaultAddr = "127.0.0.1" - defaultPort = 9100 + defaultPort = 10004 pluginName = "cosmoshub-active-status" ) diff --git a/plugins/node_block_sync/main.go b/plugins/node_block_sync/main.go index 50989b1..77f1e9c 100644 --- a/plugins/node_block_sync/main.go +++ b/plugins/node_block_sync/main.go @@ -15,21 +15,21 @@ import ( const ( // Default values. - defaultRPCAddr = "http://localhost:26657" - defaultAddr = "127.0.0.1" - defaultPort = 9091 - pluginName = "cosmoshub-block-sync" + defaultRPCAddr = "http://localhost:26657" + defaultAddr = "127.0.0.1" + defaultPort = 10001 + pluginName = "cosmoshub-block-sync" defaultCriticalCount = 3 ) var ( - rpcAddr string - addr string - port int - prevHeight int - latestHeight int - warningCount int - criticalCount int + rpcAddr string + addr string + port int + prevHeight int + latestHeight int + warningCount int + criticalCount int ) func init() { diff --git a/plugins/node_governance_alarm/main.go b/plugins/node_governance_alarm/main.go index 4f58983..45e04fd 100644 --- a/plugins/node_governance_alarm/main.go +++ b/plugins/node_governance_alarm/main.go @@ -17,7 +17,7 @@ import ( const ( // Default values. defaultAddr = "127.0.0.1" - defaultPort = 9091 + defaultPort = 10005 defaultPeer = 5 defaultApiPort = 1317 defaultProposalId = 0 diff --git a/plugins/node_is_alived/main.go b/plugins/node_is_alived/main.go index b2bcdf2..042c69a 100644 --- a/plugins/node_is_alived/main.go +++ b/plugins/node_is_alived/main.go @@ -14,7 +14,7 @@ import ( const ( defaultAddr = "127.0.0.1" - defaultPort = 9098 + defaultPort = 10002 defaultRPCAddr = "http://localhost:26657" ) diff --git a/plugins/node_peer_count/main.go b/plugins/node_peer_count/main.go index 040e5c1..004aea9 100644 --- a/plugins/node_peer_count/main.go +++ b/plugins/node_peer_count/main.go @@ -16,7 +16,7 @@ import ( const ( // Default values. defaultAddr = "127.0.0.1" - defaultPort = 9091 + defaultPort = 10003 defaultPeer = 5 defaultRpcAddr = "http://localhost:26657" From 69705f17d0ca7a94f478892e60ed86e6f5293bca Mon Sep 17 00:00:00 2001 From: HeeJin Lee Date: Wed, 31 May 2023 17:12:36 +0900 Subject: [PATCH 2/4] Remove default port info for governance_alarm --- plugins/node_governance_alarm/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node_governance_alarm/main.go b/plugins/node_governance_alarm/main.go index 45e04fd..ac83ec1 100644 --- a/plugins/node_governance_alarm/main.go +++ b/plugins/node_governance_alarm/main.go @@ -38,7 +38,7 @@ var ( func init() { flag.StringVar(&addr, "addr", defaultAddr, "IP Address(e.g. 0.0.0.0, 127.0.0.1)") - flag.IntVar(&port, "port", defaultPort, "Port number, default 9091") + flag.IntVar(&port, "port", defaultPort, "Port number") flag.UintVar(&apiPort, "apiPort", defaultApiPort, "Need to know proposal id") flag.UintVar(&proposalId, "proposalId", defaultProposalId, "Need to know last proposal id") flag.StringVar(&voterAddr, "voterAddr", defaultVoterVote, "Need to voter address") From 46e7b9b66467e383d1e0e6c4880bb640964233af Mon Sep 17 00:00:00 2001 From: HeeJin Lee Date: Wed, 31 May 2023 17:18:16 +0900 Subject: [PATCH 3/4] Remove default port info for peer_count --- plugins/node_peer_count/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node_peer_count/main.go b/plugins/node_peer_count/main.go index 004aea9..bcc11c4 100644 --- a/plugins/node_peer_count/main.go +++ b/plugins/node_peer_count/main.go @@ -32,7 +32,7 @@ var ( func init() { flag.StringVar(&addr, "addr", defaultAddr, "IP Address(e.g. 0.0.0.0, 127.0.0.1)") - flag.IntVar(&port, "port", defaultPort, "Port number, default 9091") + flag.IntVar(&port, "port", defaultPort, "Port number") flag.IntVar(&minPeer, "minPeer", defaultPeer, "minimum peer count, default 5") flag.StringVar(&rpcAddr, "rpcAddr", defaultRpcAddr, "RPC Address, default http://localhost:26657") From 529cb4235750303df6d38f93917d79001acb4784 Mon Sep 17 00:00:00 2001 From: HeeJin Lee Date: Wed, 31 May 2023 17:26:58 +0900 Subject: [PATCH 4/4] Update README for default port configuration --- README.md | 85 +++++++++++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index e310bdd..86d6a48 100644 --- a/README.md +++ b/README.md @@ -63,59 +63,52 @@ $ vatz plugin list > Run as default config or option flags ``` $ node_block_sync -2023-01-02T09:26:47Z INF Register module=grpc -2023-01-02T09:26:47Z INF Start 127.0.0.1 9091 module=sdk -2023-01-02T09:26:47Z INF Start module=grpc -2023-01-02T09:26:56Z INF Execute module=grpc -2023-01-02T09:26:56Z INF previous block height: 0, latest block height: 3791025 module=plugin -2023-01-02T09:26:56Z DBG block height increasing module=plugin -2023-01-02T09:27:25Z INF Execute module=grpc -2023-01-02T09:27:25Z INF previous block height: 3791025, latest block height: 3791030 module=plugin -2023-01-02T09:27:25Z DBG block height increasing module=plugin +2023-05-31T07:07:36Z INF Register module=grpc +2023-05-31T07:07:36Z INF Start 127.0.0.1 10001 module=sdk +2023-05-31T07:07:36Z INF Start module=grpc +2023-05-31T07:08:10Z INF Execute module=grpc +2023-05-31T07:08:10Z INF previous block height: 0, latest block height: 5969512 module=plugin +2023-05-31T07:08:10Z DBG block height increasing module=plugin ``` ``` $ node_is_alived -2023-01-02T09:26:47Z INF Register module=grpc -2023-01-02T09:26:47Z INF Start 127.0.0.1 9098 module=sdk -2023-01-02T09:26:47Z INF Start module=grpc -2023-01-02T09:26:56Z INF Execute module=grpc -2023-01-02T09:26:56Z INF HEALTHY process=up -2023-01-02T09:27:25Z INF Execute module=grpc -2023-01-02T09:27:25Z INF HEALTHY process=up +2023-05-31T07:07:36Z INF Register module=grpc +2023-05-31T07:07:36Z INF Start 127.0.0.1 10002 module=sdk +2023-05-31T07:07:36Z INF Start module=grpc +2023-05-31T07:08:10Z INF Execute module=grpc +2023-05-31T07:08:10Z INF HEALTHY process=up +2023-05-31T07:08:40Z INF Execute module=grpc +2023-05-31T07:08:40Z INF HEALTHY process=up ``` ``` $ node_peer_count -2023-01-02T09:26:47Z INF Register module=grpc -2023-01-02T09:26:47Z INF Start 127.0.0.1 9091 module=sdk -2023-01-02T09:26:47Z INF Start module=grpc -2023-01-02T09:26:56Z INF Execute module=grpc -2023-01-02T09:26:56Z INF Good: peer_count is 10 moudle=plugin -2023-01-02T09:27:25Z INF Execute module=grpc -2023-01-02T09:27:25Z INF Good: peer_count is 10 moudle=plugin +2023-05-31T07:07:36Z INF Register module=grpc +2023-05-31T07:07:36Z INF Start 127.0.0.1 10003 module=sdk +2023-05-31T07:07:36Z INF Start module=grpc +2023-05-31T07:08:10Z INF Execute module=grpc +2023-05-31T07:08:10Z INF Good: peer_count is 50 moudle=plugin +2023-05-31T07:08:40Z INF Execute module=grpc +2023-05-31T07:08:40Z INF Good: peer_count is 50 moudle=plugin ``` ``` $ node_active_status -valoperAddr -2023-01-02T09:26:47Z INF Register module=grpc -2023-01-02T09:26:47Z INF Start 127.0.0.1 9100 module=sdk -2023-01-02T09:26:47Z INF Start module=grpc -2023-01-02T09:26:56Z INF Execute module=grpc -2023-01-02T09:26:56Z DBG Validator bonded. included active set module=plugin -2023-01-02T09:27:25Z INF Execute module=grpc -2023-01-02T09:27:26Z DBG Validator bonded. included active set module=plugin +2023-05-31T07:07:36Z INF Register module=grpc +2023-05-31T07:07:36Z INF Start 127.0.0.1 10004 module=sdk +2023-05-31T07:07:36Z INF Start module=grpc +2023-05-31T07:08:10Z INF Execute module=grpc +2023-05-31T07:08:10Z DBG Validator bonded. included active set module=plugin +2023-05-31T07:08:40Z INF Execute module=grpc +2023-05-31T07:08:40Z DBG Validator bonded. included active set module=plugin ``` ``` # Your node have to enable API configuration ({HOME_DIR}/config/app.toml) -$ node_governance_alarm -port 9097 -apiPort -voterAddr -2023-01-02T09:27:32Z INF Register module=grpc -2023-01-02T09:27:32Z INF Start 127.0.0.1 9097 module=sdk -2023-01-02T09:27:32Z INF Start module=grpc -2023-01-02T09:27:55Z INF Execute module=grpc -2023-01-02T09:28:04Z DBG DEBUG : tmp == proposalId module=plugin -2023-01-02T09:28:04Z INF Lastest proposal is #2 - module=plugin -2023-01-02T09:28:25Z INF Execute module=grpc -2023-01-02T09:28:26Z DBG DEBUG : tmp == proposalId module=plugin -2023-01-02T09:28:26Z INF Lastest proposal is #2 +$ node_governance_alarm -apiPort -voterAddr +2023-05-31T07:07:36Z INF Register module=grpc +2023-05-31T07:07:36Z INF Start 127.0.0.1 10005 module=sdk +2023-05-31T07:07:36Z INF Start module=grpc +2023-05-31T07:08:10Z INF Execute module=grpc +2023-05-31T07:08:10Z DBG DEBUG : tmp == proposalId module=plugin +2023-05-31T07:08:10Z INF Lastest proposal is #51 module=plugin ``` ## Command line arguments @@ -127,7 +120,7 @@ Usage of node_block_sync: -critical int block height stucked count to raise critical level of alert (default 3) -port int - Listening port (default 9091) + Listening port (default 10001) -rpcURI string Tendermint RPC URI Address (default "http://localhost:26657") ``` @@ -137,7 +130,7 @@ Usage of node_is_alived: -addr string IP Address(e.g. 0.0.0.0, 127.0.0.1) (default "127.0.0.1") -port int - Port number, default 9098 (default 9098) + Port number (default 10002) -rpcAddr string RPC addrest:port (e.g. http://127.0.0.1:26667) (default "http://localhost:26657") ``` @@ -149,7 +142,7 @@ Usage of node_peer_count: -minPeer int minimum peer count, default 5 (default 5) -port int - Port number, default 9091 (default 9091) + Port number (default 10003) -rpcAddr string RPC Address, default http://localhost:26657 (default "https://localhost:26657") ``` @@ -159,7 +152,7 @@ Usage of node_active_status: -addr string Listening address (default "127.0.0.1") -port int - Listening port (default 9100) + Listening port (default 10004) -rpcURI string CosmosHub RPC URI Address (default "http://localhost:1317") -valoperAddr string @@ -173,7 +166,7 @@ Usage of node_governance_alarm: -apiPort uint Need to know proposal id (default 1317) -port int - Port number, default 9091 (default 9091) + Port number (default 10005) -proposalId uint Need to know last proposal id -voterAddr string