diff --git a/README.md b/README.md index 9938a2b2..3d657d53 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,4 @@ -Tested on Ubuntu 20.04.3 LTS +### Docs -#### Prerequisites: -docker
-docker-compose
-DNS A-Record pointing to your server
-Wireguard-Server: Paste wireguard wg0.conf from wireguard-server to wireguard/config/wg0.conf
-.env File inside POKT-DOKT with secrets
- -#### Usage - -``` -git clone https://github.com/cventastic/POKT_DOKT.git -cd POKT_DOKT -git reset --hard origin/main && git pull && ./util/prepare.sh -``` - -# EXAMPLES - -Start POKT in relay mode: -``` -command: pocket start --simulateRelay -``` -If you want to activly relay. You also have to Stake!
-Testnet-Faucet: (https://faucet.pokt.network/)
-How to stake: https://docs.pokt.network/home/paths/node-runner#stake-the-validator
- -POKT QUERY for simulate-relay mode: -``` -Pockt-Testnet: -curl -X POST --data '{"relay_network_id":"0002","payload":{"data":"{}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8082/v1/client/sim -Pocket-Mainnet: -curl -X POST --data '{"relay_network_id":"0001","payload":{"data":"{}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8081/v1/client/sim -``` - -GETH QUERY (from whitelisted servers e.g pokt-test) for simulate-relay mode: -``` -Pocket-Testnet: -curl -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x1a8c807a6E4F624fCab01FEBf76a541d31B8345A\", \"latest\"],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8082/v1/client/sim -curl -v -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8082/v1/client/sim -Pocket-Mainnet: -curl -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x1a8c807a6E4F624fCab01FEBf76a541d31B8345A\", \"latest\"],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8081/v1/client/sim -curl -v -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8081/v1/client/sim -``` - -STANDARD GETH QUERY (from whitelistet server) -``` -curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' https://$RPCNODE/goerli -``` - -HARMONY QUERY -``` -curl --location --request POST 'https://$RPCNODE/' --header 'Content-Type: application/json' --data-raw '{"jsonrpc": "2.0", "method": "hmy_latestHeader", "params": [], "id": 1}' -``` - -# SSL -I you want to test SSL comment in: -``` -# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" -``` -Check if there is a file here /traefic/letsencrypt/acme.json if yes, you have to delete it.
-Otherwise traefik will not issue the certificate for an existing domain.
- -#### TODO !!!! -Bootstrapping from Snapshots
-Link-Timezone into containers. - -AVALANCHE: -- Archive? -- Monitoring https://docs.avax.network/build/tools/dashboards/README - -### Notes -#### Monitoring -Telegram get group ids the bot is in: -```curl -X POST https://api.telegram.org/bot$TELEGRAM_API_TOKEN/getUpdates``` - -### neue NODE -.env -rpc-timeout -whitelist \ No newline at end of file +[Pocket Validator](README_POKT.md)
+[Harmony Validator](README_HARMONY.md) \ No newline at end of file diff --git a/README_HARMONY.md b/README_HARMONY.md new file mode 100644 index 00000000..78322006 --- /dev/null +++ b/README_HARMONY.md @@ -0,0 +1,17 @@ +Place validator.key and validator.pass into ./keyfiles +``` +docker-compose up -d +``` +Check if Bootstrap is working. +``` +docker logs -f pokt_dokt_harmony-mainnet_1 +``` +Logs are at: +``` +harmony/log +``` + +HARMONY QUERY +``` +curl --location --request POST 'https://$DOMAIN/' --header 'Content-Type: application/json' --data-raw '{"jsonrpc": "2.0", "method": "hmy_latestHeader", "params": [], "id": 1}' +``` \ No newline at end of file diff --git a/README_POKT.md b/README_POKT.md new file mode 100644 index 00000000..2e2c04de --- /dev/null +++ b/README_POKT.md @@ -0,0 +1,75 @@ +Tested on Ubuntu 20.04.3 LTS + +#### Prerequisites: +docker
+docker-compose
+DNS A-Record pointing to your server
+Wireguard-Server: Paste wireguard wg0.conf from wireguard-server to wireguard/config/wg0.conf
+.env File inside POKT-DOKT with secrets
+ +#### Usage + +``` +git clone https://github.com/cventastic/POKT_DOKT.git +cd POKT_DOKT +git reset --hard origin/main && git pull && ./util/prepare.sh +``` + +# EXAMPLES + +Start POKT in relay mode: +``` +command: pocket start --simulateRelay +``` +If you want to activly relay. You also have to Stake!
+Testnet-Faucet: (https://faucet.pokt.network/)
+How to stake: https://docs.pokt.network/home/paths/node-runner#stake-the-validator
+ +POKT QUERY for simulate-relay mode: +``` +Pockt-Testnet: +curl -X POST --data '{"relay_network_id":"0002","payload":{"data":"{}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8082/v1/client/sim +Pocket-Mainnet: +curl -X POST --data '{"relay_network_id":"0001","payload":{"data":"{}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8081/v1/client/sim +``` + +GETH QUERY (from whitelisted servers e.g pokt-test) for simulate-relay mode: +``` +Pocket-Testnet: +curl -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x1a8c807a6E4F624fCab01FEBf76a541d31B8345A\", \"latest\"],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8082/v1/client/sim +curl -v -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8082/v1/client/sim +Pocket-Mainnet: +curl -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x1a8c807a6E4F624fCab01FEBf76a541d31B8345A\", \"latest\"],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8081/v1/client/sim +curl -v -X POST --data '{"relay_network_id":"0020","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8081/v1/client/sim +``` + +STANDARD GETH QUERY (from whitelistet server) +``` +curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' https://$RPCNODE/goerli +``` + +# SSL +I you want to test SSL comment in: +``` +# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" +``` +Check if there is a file here /traefic/letsencrypt/acme.json if yes, you have to delete it.
+Otherwise traefik will not issue the certificate for an existing domain.
+ +#### TODO !!!! +Bootstrapping from Snapshots
+Link-Timezone into containers. + +AVALANCHE: +- Archive? +- Monitoring https://docs.avax.network/build/tools/dashboards/README + +### Notes +#### Monitoring +Telegram get group ids the bot is in: +```curl -X POST https://api.telegram.org/bot$TELEGRAM_API_TOKEN/getUpdates``` + +### neue NODE +.env +rpc-timeout +whitelist \ No newline at end of file diff --git a/docker-compose.harmony.yml b/docker-compose.harmony.yml index 20ff2ec7..b97e3887 100644 --- a/docker-compose.harmony.yml +++ b/docker-compose.harmony.yml @@ -3,7 +3,7 @@ version: '3.1' services: harmony-mainnet: build: ./harmony/build - command: /binary --log.dir /harmony/log --run.shard 1 --dns.zone t.hmny.io --http.ip 0.0.0.0 --datadir /harmony + command: /harmony.sh && /binary --log.dir /harmony/log --run.shard 1 --dns.zone t.hmny.io --http.ip 0.0.0.0 --datadir /harmony sysctls: net.core.somaxconn: 1024 # net.core.netdev_max_backlog: 65536 @@ -25,6 +25,7 @@ services: - harmony_data:/harmony/ - ./harmony/keyfiles:/.hmy/blskeys - ./harmony/log:/harmony/log + - ./bootstrap_skript/harmony.sh:/harmony.sh restart: unless-stopped ### WIREGUARD diff --git a/harmony/build/Dockerfile b/harmony/build/Dockerfile index ae08e096..9d966aec 100644 --- a/harmony/build/Dockerfile +++ b/harmony/build/Dockerfile @@ -1,6 +1,6 @@ FROM alpine -RUN apk add --no-cache bash libstdc++ gmp-dev libc6-compat bind-tools jq curl && ln -s libcrypto.so.1.1 /lib/libcrypto.so.10 +RUN apk add --no-cache bash libstdc++ gmp-dev libc6-compat bind-tools jq curl rclone bash && ln -s libcrypto.so.1.1 /lib/libcrypto.so.10 EXPOSE 9000/tcp 9500/tcp 9800/tcp 6000/tcp @@ -8,4 +8,4 @@ VOLUME ["/harmony/harmony_db_0","/harmony/harmony_db_1","/harmony/harmony_db_2", RUN curl -LO https://harmony.one/binary && chmod +x binary -CMD /binary --log.dir /harmony/log --run explorer --run.shard 0 --bootnodes /ip4/100.26.90.187/tcp/9874/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv,/ip4/54.213.43.194/tcp/9874/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9,/ip4/13.113.101.219/tcp/12019/p2p/QmQayinFSgMMw5cSpDUiD9pQ2WeP6WNmGxpZ6ou3mdVFJX,/ip4/99.81.170.167/tcp/12019/p2p/QmRVbTpEYup8dSaURZfF6ByrMTSKa4UyUzJhSjahFzRqNj --dns.zone t.hmny.io --http.ip 0.0.0.0 --datadir /harmony +CMD /binary --log.dir /harmony/log --run explorer --run.shard 0 --dns.zone t.hmny.io --http.ip 0.0.0.0 --datadir /harmony \ No newline at end of file diff --git a/harmony/keyfiles/README b/harmony/keyfiles/README deleted file mode 100644 index ddfe727c..00000000 --- a/harmony/keyfiles/README +++ /dev/null @@ -1 +0,0 @@ -place a file named "validator-key" in this folder