Early validators have supported and stimulated euler-4 testnet. It deserves to reward and our great thanks. The main idea of rewarding was migrating balances between testnets. Unfortunately, there was no consensus about validators faucet tokens quantity. Also, we've faced on with withdrawing rewards bug, so our validators lose so many tokens between migrating.
The question is how to distribute mainnet supply percent between validators fairly?
Invaluable validators help is network support. And every block this help became more valuable. We decide to assess validators work as linearity of block height and participating value.
The part of reward per each validator if precommit was
This way we can calculate shares between validators by their precommits with weight depends on block height.
You need nodeJS, python3, pip3 and jupyter installed. Synced cyberd node strongly recommended
- Clone repo
git clone https://github.com/SaveTheAles/val-lifetime-distr
- Run
jupyter
:
jupyter notebook
It should open at localhost:8888
- Find in
jupyter
ui project repo and openparser.ipynb
Type Shift + Enter
or Run
button to execute parts of code.
Probably you need to install some libraries. The best way to do that is
pip3 install <library_name>
- Set node
url
. Normally to get data from localhost. But if you have just remote connection it's OK. Long but OK. Also, set start block and end block for parser.
-
With alocal connection, getting data should be 1.5 - 2 hours. Another way it depends on your connection. Normally 8-20 hours. It should return you large
.csv
file with blocks and validators participated in that blocks. -
Go to
balances.ipynb
and exec it step-by-step. You should get a beautiful plot of all validators lifetime andbalance.json
file with CYB balance calculation per each validator in mainnet. -
Go to cyberd rpc endpoint
/staking/vlidators
and save that json asvalidators_list.json
. -
Run:
node ./index.js
It should return json file with validators in bech32 and balances in CYB