- Clone the repo:
$ git clone https://github.com/cybercongress/validators-investigation
- Go to the cloned repo:
$ cd validators-investigation
- Set
NODE_HOST
,NODE_PORT
andTHREADS
in.env
file.
NODE_HOST
is the IP address of cyberd
node. The best option if you run cyberd
node at the same machine. In this case set 127.0.0.1
NODE_PORT
is the RPC port of your node. If you run cyberd
node from docker you can get port from docker ps
command output. By default 26657
THREADS
the number of parallel threads of indexing. Default 4
.
- To run containers, use a command:
$ docker-compose up --build
the pulling and installation may required 10-15 minutes depends on your internet connection
This command will start crawler and prepare the notebook with calculations. To see the table with validators' balances and explanatory calculations, click this link: http://localhost:8888/notebooks/balances.ipynb.
The token will be requested, it can be found in the output of docker-compose command:
[I 00:15:36.448 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
notebook_1 | [C 00:15:36.448 NotebookApp]
notebook_1 |
notebook_1 | Copy/paste this URL into your browser when you connect for the first time,
notebook_1 | to login with a token:
notebook_1 | http://(m-Inspiron-7577 or 127.0.0.1):8888/?token=903b1dd72d8b9c95c839c75162208a1a8147b270e6aa3208
The crawler may index blocks 6-10 hours if cyberd
runs on the localhost.
-
Optionally you can run
jupiter notebook
separately. Go tovalidators-investigation/data/notebook
and runjupyter-notebook
(jupyter-notebook
should be installed) -
Follow steps in the
balances.ipynb