diff --git a/docker-compose-rpc.yml b/docker-compose-rpc.yml index f033a5dc..e98c23d7 100644 --- a/docker-compose-rpc.yml +++ b/docker-compose-rpc.yml @@ -286,8 +286,9 @@ services: - POCKET_CORE_PASSPHRASE=$POCKET_CORE_PASSPHRASE - POCKET_SNAPSHOT=$POCKET_SNAPSHOT volumes: - - ./chains/chains_mainnet.json:/home/app/.pocket/config/chains.json - ./bootstrap_skript/pokt_mainnet.sh:/home/app/.pocket/pokt_mainnet.sh + - ./chains/chains_mainnet.json:/home/app/.pocket/config/chains.json + - ./pokt/config.json:/home/app/.pocket/config/config.json - pocket-mainnet:/home/app/.pocket labels: - "traefik.enable=true" @@ -300,7 +301,6 @@ services: - "traefik.http.routers.pocket-mainnet.middlewares=pocket-mainnet-stripprefix, ipwhitelist" restart: unless-stopped - fusenetstat: image: fusenet/netstat:1.0.0 command: "--instance-name 0xeb5Ca1d019e9D8b9aa9C47991993C84d1062628d --role node --parity-version 2.0.1 --fuseapp-version 1.0.0 --netstats-version 1.0.0" diff --git a/docker-compose.pokt-mainnet.yml b/docker-compose.pokt-mainnet.yml index 070f5536..2c2043c4 100644 --- a/docker-compose.pokt-mainnet.yml +++ b/docker-compose.pokt-mainnet.yml @@ -138,8 +138,9 @@ services: - POCKET_CORE_PASSPHRASE=$POKT_FR_1_POCKET_CORE_PASSPHRASE - POCKET_SNAPSHOT=$POCKET_SNAPSHOT volumes: - - ./chains/chains_mainnet.json:/home/app/.pocket/config/chains.json - ./bootstrap_skript/pokt_mainnet.sh:/home/app/.pocket/pokt_mainnet.sh + - ./chains/chains_mainnet.json:/home/app/.pocket/config/chains.json + - ./pokt/config.json:/home/app/.pocket/config/config.json - pocket-mainnet:/home/app/.pocket restart: unless-stopped labels: @@ -166,8 +167,9 @@ services: - POCKET_CORE_PASSPHRASE=$POKT_FR_2_POCKET_CORE_PASSPHRASE - POCKET_SNAPSHOT=$POCKET_SNAPSHOT volumes: - - ./chains/chains_mainnet.json:/home/app/.pocket/config/chains.json - ./bootstrap_skript/pokt_mainnet.sh:/home/app/.pocket/pokt_mainnet.sh + - ./chains/chains_mainnet.json:/home/app/.pocket/config/chains.json + - ./pokt/config.json:/home/app/.pocket/config/config.json - pocket-fr-2:/home/app/.pocket restart: unless-stopped labels: diff --git a/haproxy/avalanche-healthcheck.sh b/haproxy/avalanche-healthcheck.sh deleted file mode 100644 index 211d2266..00000000 --- a/haproxy/avalanche-healthcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# $1 = Virtual Service IP (VIP) -# $2 = Virtual Service Port (VPT) -# $3 = Real Server IP (RIP) -# $4 = Real Server Port (RPT) -# $5 = Check Source IP - -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -VIP=$1 -VPT=$2 -RIP=$3 -RPT=$4 -# RPT=8545 - -# Run curl with appropriate options -curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' http://$RIP:$RPT/avalanche 2>/dev/null | jq '.result' -r | grep -q false -exit1=$? - -peers=$(curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' http://$RIP:$RPT/avalanche 2>/dev/null | jq '.result' -r) - -# If any of the above tests failed, then exit 1. -if [[ "$exit1" -ne 0 ]]; then exit 1; fi -if [[ `printf "%d" $peers` == "0" || `printf "%d" $peers` == "1" ]]; then exit 1; fi -exit 0 diff --git a/haproxy/erigon-healthcheck.sh b/haproxy/erigon-healthcheck.sh deleted file mode 100644 index 22922204..00000000 --- a/haproxy/erigon-healthcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# $1 = Virtual Service IP (VIP) -# $2 = Virtual Service Port (VPT) -# $3 = Real Server IP (RIP) -# $4 = Real Server Port (RPT) -# $5 = Check Source IP - -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -VIP=$1 -VPT=$2 -RIP=$3 -RPT=$4 -# RPT=8545 - -# Run curl with appropriate options -curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' http://$RIP:$RPT/erigon 2>/dev/null | jq '.result' -r | grep -q false -exit1=$? - -peers=$(curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' http://$RIP:$RPT/erigon 2>/dev/null | jq '.result' -r) - -# If any of the above tests failed, then exit 1. -if [[ "$exit1" -ne 0 ]]; then exit 1; fi -if [[ `printf "%d" $peers` == "0" || `printf "%d" $peers` == "1" ]]; then exit 1; fi -exit 0 diff --git a/haproxy/geth-healthcheck.sh b/haproxy/geth-healthcheck.sh deleted file mode 100644 index 08dcb292..00000000 --- a/haproxy/geth-healthcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# $1 = Virtual Service IP (VIP) -# $2 = Virtual Service Port (VPT) -# $3 = Real Server IP (RIP) -# $4 = Real Server Port (RPT) -# $5 = Check Source IP - -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -VIP=$1 -VPT=$2 -RIP=$3 -RPT=$4 -# RPT=8545 - -# Run curl with appropriate options -curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' http://$RIP:$RPT/geth 2>/dev/null | jq '.result' -r | grep -q false -exit1=$? - -peers=$(curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' http://$RIP:$RPT/geth 2>/dev/null | jq '.result' -r) - -# If any of the above tests failed, then exit 1. -if [[ "$exit1" -ne 0 ]]; then exit 1; fi -if [[ `printf "%d" $peers` == "0" || `printf "%d" $peers` == "1" ]]; then exit 1; fi -exit 0 diff --git a/haproxy/goerli-healthcheck.sh b/haproxy/goerli-healthcheck.sh deleted file mode 100644 index f8424bd1..00000000 --- a/haproxy/goerli-healthcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# $1 = Virtual Service IP (VIP) -# $2 = Virtual Service Port (VPT) -# $3 = Real Server IP (RIP) -# $4 = Real Server Port (RPT) -# $5 = Check Source IP - -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -VIP=$1 -VPT=$2 -RIP=$3 -RPT=$4 -# RPT=8545 - -# Run curl with appropriate options -curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' http://$RIP:$RPT/goerli 2>/dev/null | jq '.result' -r | grep -q false -exit1=$? - -peers=$(curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' http://$RIP:$RPT/goerli 2>/dev/null | jq '.result' -r) - -# If any of the above tests failed, then exit 1. -if [[ "$exit1" -ne 0 ]]; then exit 1; fi -if [[ `printf "%d" $peers` == "0" || `printf "%d" $peers` == "1" ]]; then exit 1; fi -exit 0 diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg deleted file mode 100644 index ffad8396..00000000 --- a/haproxy/haproxy.cfg +++ /dev/null @@ -1,131 +0,0 @@ -global - - nbproc 1 - nbthread 2 - cpu-map auto:1/1-2 0-1 - - log /dev/log local0 - log /dev/log local1 notice - #chroot /var/lib/haproxy - user haproxy - group haproxy - daemon - external-check - -defaults - mode http - log global - option httplog - option http-keep-alive - option dontlognull - option redispatch - option contstats - retries 3 - backlog 10000 - timeout client 50s - timeout connect 5s - timeout server 50s - timeout tunnel 3600s - timeout http-keep-alive 2s - timeout http-request 15s - timeout queue 30s - timeout tarpit 60s - default-server inter 3s rise 2 fall 3 - option forwardfor - - -listen stats - bind *:9600 - stats enable - stats uri /stats - stats realm Haproxy\ Statistics - stats auth pocket:P@ssw0rd00! - - -frontend rpc-frontend - bind *:80 - acl host_is_erigon path_beg /erigon - acl host_is_goerli path_beg /goerli - acl host_is_avalanche path_beg /avalanche - acl host_is_ropsten path_beg /ropsten - acl host_is_geth path_beg /geth - acl host_is_rinkeby path_beg /rinkeby - - use_backend erigon if host_is_erigon - use_backend goerli if host_is_goerli - use_backend avalanche if host_is_avalanche - use_backend ropsten if host_is_ropsten - use_backend geth if host_is_geth - use_backend rinkeby if host_is_rinkeby - - default_backend backend-no-match - -backend backend-no-match - http-request deny deny_status 400 - -backend erigon - mode http - balance roundrobin - - option external-check - external-check path "/usr/bin:/bin" - external-check command /usr/local/etc/erigon-healthcheck.sh - - server %[env(MAINNODE)] %[env(MAINNODE)]:80 check inter 10000 fall 3 rise 2 maxconn 2000 - - -backend goerli - mode http - balance roundrobin - - option external-check - external-check path "/usr/bin:/bin" - external-check command /usr/local/etc/goerli-healthcheck.sh - - server %[env(MAINNODE)] %[env(MAINNODE)]:80 check inter 10000 fall 3 rise 2 maxconn 2000 - - -backend rinkeby - mode http - balance roundrobin - - option external-check - external-check path "/usr/bin:/bin" - external-check command /usr/local/etc/rinkeby-healthcheck.sh - - server %[env(MAINNODE)] %[env(MAINNODE)]:80 check inter 10000 fall 3 rise 2 maxconn 2000 - - -backend ropsten - mode http - balance roundrobin - - option external-check - external-check path "/usr/bin:/bin" - external-check command /usr/local/etc/ropsten-healthcheck.sh - - server %[env(MAINNODE)] %[env(MAINNODE)]:80 check inter 10000 fall 3 rise 2 maxconn 2000 - - -backend avalanche - mode http - balance roundrobin - - option external-check - external-check path "/usr/bin:/bin" - external-check command /usr/local/etc/avalanche-healthcheck.sh - - server %[env(MAINNODE)] %[env(MAINNODE)]:80 check inter 10000 fall 3 rise 2 maxconn 2000 - - -backend geth - mode http - balance roundrobin - - option external-check - external-check path "/usr/bin:/bin" - external-check command /usr/local/etc/geth-healthcheck.sh - - server %[env(MAINNODE)] %[env(MAINNODE)]:80 check inter 10000 fall 3 rise 2 maxconn 2000 - - diff --git a/haproxy/rinkeby-healthcheck.sh b/haproxy/rinkeby-healthcheck.sh deleted file mode 100644 index 36154d02..00000000 --- a/haproxy/rinkeby-healthcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# $1 = Virtual Service IP (VIP) -# $2 = Virtual Service Port (VPT) -# $3 = Real Server IP (RIP) -# $4 = Real Server Port (RPT) -# $5 = Check Source IP - -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -VIP=$1 -VPT=$2 -RIP=$3 -RPT=$4 -# RPT=8545 - -# Run curl with appropriate options -curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' http://$RIP:$RPT/rinkeby 2>/dev/null | jq '.result' -r | grep -q false -exit1=$? - -peers=$(curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' http://$RIP:$RPT/rinkeby 2>/dev/null | jq '.result' -r) - -# If any of the above tests failed, then exit 1. -if [[ "$exit1" -ne 0 ]]; then exit 1; fi -if [[ `printf "%d" $peers` == "0" || `printf "%d" $peers` == "1" ]]; then exit 1; fi -exit 0 diff --git a/haproxy/ropsten-healthcheck.sh b/haproxy/ropsten-healthcheck.sh deleted file mode 100644 index 14f10878..00000000 --- a/haproxy/ropsten-healthcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# $1 = Virtual Service IP (VIP) -# $2 = Virtual Service Port (VPT) -# $3 = Real Server IP (RIP) -# $4 = Real Server Port (RPT) -# $5 = Check Source IP - -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -VIP=$1 -VPT=$2 -RIP=$3 -RPT=$4 -# RPT=8545 - -# Run curl with appropriate options -curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' http://$RIP:$RPT/ropsten 2>/dev/null | jq '.result' -r | grep -q false -exit1=$? - -peers=$(curl -s -X POST -u ${AUTH_HTTP} -H "Content-Type: application/json" -m 2 -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' http://$RIP:$RPT/ropsten 2>/dev/null | jq '.result' -r) - -# If any of the above tests failed, then exit 1. -if [[ "$exit1" -ne 0 ]]; then exit 1; fi -if [[ `printf "%d" $peers` == "0" || `printf "%d" $peers` == "1" ]]; then exit 1; fi -exit 0 diff --git a/pokt/config.json b/pokt/config.json new file mode 100644 index 00000000..2bce6528 --- /dev/null +++ b/pokt/config.json @@ -0,0 +1,156 @@ +{ + "tendermint_config": { + "RootDir": "/home/app/.pocket", + "ProxyApp": "tcp://127.0.0.1:26658", + "Moniker": "stakesquid", + "FastSyncMode": true, + "DBBackend": "goleveldb", + "LevelDBOptions": { + "block_cache_capacity": 83886, + "block_cache_evict_removed": false, + "block_size": 4096, + "disable_buffer_pool": true, + "open_files_cache_capacity": -1, + "write_buffer": 838860 + }, + "DBPath": "data", + "LogLevel": "*:info, *:error", + "LogFormat": "plain", + "Genesis": "config/genesis.json", + "PrivValidatorKey": "priv_val_key.json", + "PrivValidatorState": "priv_val_state.json", + "PrivValidatorListenAddr": "", + "NodeKey": "node_key.json", + "ABCI": "socket", + "ProfListenAddress": "", + "FilterPeers": false, + "RPC": { + "RootDir": "/home/app/.pocket", + "ListenAddress": "tcp://127.0.0.1:26657", + "CORSAllowedOrigins": [], + "CORSAllowedMethods": [ + "HEAD", + "GET", + "POST" + ], + "CORSAllowedHeaders": [ + "Origin", + "Accept", + "Content-Type", + "X-Requested-With", + "X-Server-Time" + ], + "GRPCListenAddress": "", + "GRPCMaxOpenConnections": 2500, + "Unsafe": false, + "MaxOpenConnections": 2500, + "MaxSubscriptionClients": 100, + "MaxSubscriptionsPerClient": 5, + "TimeoutBroadcastTxCommit": 10000000000, + "MaxBodyBytes": 1000000, + "MaxHeaderBytes": 1048576, + "TLSCertFile": "", + "TLSKeyFile": "" + }, + "P2P": { + "RootDir": "/home/app/.pocket", + "ListenAddress": "tcp://0.0.0.0:26656", + "ExternalAddress": "", + "Seeds": "", + "PersistentPeers": "", + "UPNP": false, + "AddrBook": "config/addrbook.json", + "AddrBookStrict": false, + "MaxNumInboundPeers": 14, + "MaxNumOutboundPeers": 7, + "UnconditionalPeerIDs": "", + "PersistentPeersMaxDialPeriod": 0, + "FlushThrottleTimeout": 100000000, + "MaxPacketMsgPayloadSize": 1024, + "SendRate": 5120000, + "RecvRate": 5120000, + "PexReactor": true, + "SeedMode": false, + "PrivatePeerIDs": "", + "AllowDuplicateIP": true, + "HandshakeTimeout": 20000000000, + "DialTimeout": 3000000000, + "TestDialFail": false, + "TestFuzz": false, + "TestFuzzConfig": { + "Mode": 0, + "MaxDelay": 3000000000, + "ProbDropRW": 0.2, + "ProbDropConn": 0, + "ProbSleep": 0 + } + }, + "Mempool": { + "RootDir": "/home/app/.pocket", + "Recheck": true, + "Broadcast": true, + "WalPath": "", + "Size": 9000, + "MaxTxsBytes": 1073741824, + "CacheSize": 9000, + "MaxTxBytes": 1048576 + }, + "FastSync": { + "Version": "v1" + }, + "Consensus": { + "RootDir": "/home/app/.pocket", + "WalPath": "data/cs.wal/wal", + "TimeoutPropose": 120000000000, + "TimeoutProposeDelta": 10000000000, + "TimeoutPrevote": 60000000000, + "TimeoutPrevoteDelta": 10000000000, + "TimeoutPrecommit": 60000000000, + "TimeoutPrecommitDelta": 10000000000, + "TimeoutCommit": 780000000000, + "SkipTimeoutCommit": false, + "CreateEmptyBlocks": true, + "CreateEmptyBlocksInterval": 900000000000, + "PeerGossipSleepDuration": 30000000000, + "PeerQueryMaj23SleepDuration": 20000000000 + }, + "TxIndex": { + "Indexer": "kv", + "IndexKeys": "tx.hash,tx.height,message.sender,transfer.recipient", + "IndexAllKeys": false + }, + "Instrumentation": { + "Prometheus": true, + "PrometheusListenAddr": ":26660", + "MaxOpenConnections": 3, + "Namespace": "tendermint" + } + }, + "pocket_config": { + "data_dir": "/home/app/.pocket", + "genesis_file": "genesis.json", + "chains_name": "chains.json", + "session_db_name": "session", + "evidence_db_name": "pocket_evidence", + "tendermint_uri": "tcp://localhost:26657", + "keybase_name": "pocket-keybase", + "rpc_port": "8081", + "client_block_sync_allowance": 10, + "max_evidence_cache_entries": 500, + "max_session_cache_entries": 500, + "json_sort_relay_responses": true, + "remote_cli_url": "http://localhost:8081", + "user_agent": "", + "validator_cache_size": 10000, + "application_cache_size": 10000, + "rpc_timeout": 30000, + "pocket_prometheus_port": "8083", + "prometheus_max_open_files": 3, + "max_claim_age_for_proof_retry": 32, + "proof_prevalidation": false, + "ctx_cache_size": 20, + "abci_logging": false, + "show_relay_errors": true, + "disable_tx_events": true + } +} \ No newline at end of file