Ethereum 2.0 Weak Subjectivity Data Server
This repo contains a simple Eth2 weak subjectivity provider server.
docker-compose build
eth2_api
and ws_server_graffiti
parameters in config.yml
docker-compose up
.80
. This may be changed by editing the port mapping for eth2_ws_server
in docker-compose.yml
.uwsgi
Python server. For advanced settings of uwsgi
, load the desired configuration (such as number of processes & threads) in the uwsgi
section of config.yml
If your beacon node is running inside a Docker container on the same machine, you will have to connect to it by routing through the Docker network. The eth2_api
parameter in config.yml
is fed into the Python application running inside a docker container. You need to ensure that the beacon node’s docker container is accessible from this container, and appropriately fill in eth2_api
.
The Eth2 WS server will serve the following data in JSON format:
current_epoch
: The current epoch number of the Eth2 networkis_safe
: A boolean value representing whether the Eth2 API endpoint used was operating under safe WS conditions, i.e., if the current epoch is within the safe WS period of the WS checkpoint that is provided in this responsews_checkpoint
: The WS checkpoint in block_root:epoch_number
formatws_period
: The WS period as calculated for the state at the WS checkpoint that is provided in this responsegraffiti
: Optional graffiti set by the server operatorExample:
{
"current_epoch":16552,
"is_safe":true,
"ws_checkpoint":"0xe8e4b0170c4b9bfb09e477c754db0f5a02756859ccf1e834a39dbafbe9292f3c:15601",
"ws_period":1188,
"graffiti": "This is an Eth2 weak subjectivity data server"
}