2022-01-03 14:10:18 +01:00
2021-12-28 14:40:24 +01:00
2021-12-21 17:18:00 +01:00
2022-01-03 11:17:07 +01:00
2021-12-30 03:32:24 +01:00
2021-12-29 19:09:19 +01:00
2021-12-29 19:01:16 +01:00
2022-01-03 12:32:00 +01:00
2021-12-29 20:49:41 +01:00
2022-01-03 13:08:49 +01:00
2021-12-27 10:37:16 +01:00
2022-01-03 12:07:44 +01:00

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

Usage

git clone https://github.com/cventastic/POKT_DOKT.git
cd POKT_DOKT
git reset --hard origin/main && git pull && ./util/prepare.sh

This compose file needs the following env-vars for example in a .env file inside the repo root-folder:

# Private Key for Pocket-Account mainnet can be generated here (https://wallet.pokt.network/)
POCKET_CORE_KEY=
POCKET_CORE_PASSPHRASE=
# Private Key for Pocket-Account testnet can be generated here (https://wallet.testnet.pokt.network/)
POCKET_CORE_KEY_TEST=
POCKET_CORE_PASSPHRASE_TEST=
# POCKET SEEDS (https://docs.pokt.network/home/resources/references/seeds)
POCKET_MAIN_SEEDS=
POCKET_TEST_SEEDS=
# SNAPSHOT (https://github.com/pokt-network/pocket-snapshots)
POCKET_SNAPSHOT=""
# LETSENCRYPT
DOMAIN=
MAIL=
SERVERPORT=
PUID=
PGID=
# IP WHITELIST FOR TRAFFIC
WHITELIST=

!!! I added a simple test-script (util/test_relay.sh) to see if the (geth)chains are synced. Dont try to relay before they are.
To test if relaying chains works, pokt-testnet-service and pokt-mainnet service have to be provided with the following command parameters:

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

EXAMPLES

POKT QUERY im 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":"0002","payload":{"data":"{}","method":"POST","path":"v1/query/height","headers":{}}}' http://localhost:8081/v1/client/sim

GETH QUERY (von gewhitelisteten servern e.g pokt-test) im 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

POKT QUERY im staked mode:

curl -X POST  https://$RELAYDOMAIN/v1/query/nodes
curl -X POST  https://$RLEAYDOMAIN/v1/query/state

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 !!!!

General Monitoring
LOGFILES
Open-File Limits?
Bootstrapping from Snapshots
Link-Timezone into containers.

AVALANCHE:

Description
No description provided
Readme 33 MiB
Languages
Shell 55.6%
JavaScript 16.3%
Dockerfile 15%
Python 10.8%
Go 2.1%
Other 0.2%