Graphite testnet node setup

Requirements

Make sure you have the latest docker installed. Make sure you have opened and not binded with other applications 8575/tcp, 30311/udp ports in order to communicated with node via rpc endpoint(8575) and also node can communicate with other nodes in network via p2p(30311). Websocket modules avialable at 8576 port. Also make sure you dont covered by nat or any other network stuff.

In order to run localy with docker you need to create folder for persist data inside container.

mkdir graphite-data

chown 10001:10001 graphite-data

After creating folder you need to run init task to inject genesis and persist it. You can do it with following command:

docker run -it -v ./graphite-data:/home/geth/data ghcr.io/atgraphite/graphite:v1.3.2-testnet /bin/sh init-genesis.sh

Anonymous entrypoint node setup instructions

Now you can run your node. In order to do it use following command:

docker run -d --name graphite-testnet --network host -v ./graphite-data:/home/geth/data ghcr.io/atgraphite/graphite:v1.3.2-testnet geth --datadir /home/geth/data --config /home/geth/config.toml

Keyed entrypoint node setup instructions

Prepare your public key for inject into entrypoint with flag --epaddr. In example we will be using 0x8D1Ee942A92645136c81271460fD7Ec5375B30cC address. Now you can run your node. In order to do it use following command:

docker run -d --name graphite-testnet --network host -v ./graphite-data:/home/geth/data ghcr.io/atgraphite/graphite:v1.3.2-testnet geth --datadir /home/geth/data --config /home/geth/config.toml --epaddr 0x8D1Ee942A92645136c81271460fD7Ec5375B30cC

Node rpc api is avaialable at http://127.0.0.1:8575

Usefull commands

You can check node sync proggress with following command. If sync is done you will sync done message if not you will see elapsed blocks:

docker exec -it graphite-testnet geth --exec 'eth.syncing.currentBlock == eth.syncing.highestBlock ? console.log("sync done") : console.log("sync in progress. elapse blocks: ", eth.syncing.highestBlock - eth.syncing.currentBlock);' attach /home/geth/data/geth.ipc

To attach node logs:

docker logs graphite-testnet --follow

To interact node with graphite js console use following command:

docker exec -it graphite-testnet geth attach /home/geth/data/geth.ipc

Last updated