This is a modified go-ethereum client that logs messages sent/received, active peer information as well as information about the maintained peer table.
Identify a location where you want to store your logging information. Create this directory and make sure to specify it's path in the docker-compose.yaml
file as explained in the next section.
The easiest way to use our modified go-ethereum client is by adapting the docker-compose.yaml
file.
geth:
build: ./
volumes:
- /data-ssd/ethData/:/data
- /data-ssd/ethereum/:/jwt
- /data-ssd/logs/:/logs_path
network_mode: host
ports:
- "8545:8545"
- "8546:8546"
- "30303:30303"
- "30303/udp:30303/udp"
restart: unless-stopped
- Replace
/data-ssd/ethData/
with the path of the directory where you want the data directory to reside. - Replace
/data-ssd/ethereum/
with the path to the jwt.hex file that contains the token generated by the execution client. - Replace
/data-ssd/logs/
with the path of the directory where you want all logging information to be stored. - The
--network
parameter should be modified accordingly so that the execution and beacon nodes are on the same network. Otherwise communication will be impaired. - Ports usually don't have to be changed.
Given a properly configured docker-compose.yaml
file it can be started with docker-compose up -d
and stopped with docker-compose down
, it is possible to see the execution results of a running container by using the docker ps
command to get the id of the container and then attaching to the logging functionality with the command docker logs -f image-id
To build the client, run make geth
.
To run the client, firstly ensure a jwt secret has been generated and then run ./geth --config config.yaml
. The flags are set in the config file.
Secondly, make sure that the LOG_BASEPATH
is also changed accordingly inside go-ethereum/loggy/logger.go
.