[go: up one dir, main page]

Use yes_wallet to compute actual total supply from a context

What

This MR improves the yes wallet tool to compute the total supply of tez for a given context.

Why

The goal is to update the estimated total_supply using one computed after oxford activation.

How

This MR improves the yes walle tool by adding :

  • a --level <level> option to chose a level to use to dump information

  • a compute total supply from <base_dir> [in csv_file] command to compute the total supply at a given level (defaulting the head) and dumping information on all read contracts in an optionnal csv_file (this fils can be quit big for large contexts).

Manually testing the MR

dune exec ./devtools/yes_wallet/yes_wallet.exe -- --help should show the introduced command and its usage

dune exec ./devtools/yes_wallet/yes_wallet.exe -- --level 5093354 compute total supply from <mainnet base directory>

should output :

Head block:                 BKwj5H873jW4G1pcBykFLTJGEGDkMKzhvJiCA41caRC9x1ST6aW
Detected protocol:          ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH
Read 4499 commitments
Read 2867078 contracts with 0 failures 

Computed total commitments: ..................   20877171104541
Computed total spendable balance: ............  903173757327346
Computed total unstaked finalizable balance: .                0
----------------------------------------------------------------
Computed circulating supply: .................  924050928431887

Computed total frozen bonds: .................                0
Computed total staked balance: ...............   67139089579236
Computed total unstaked frozen balance: ......     674896268123
----------------------------------------------------------------
Computed frozen supply: ......................   67813985847359

----------------------------------------------------------------
Computed total supply: .......................  991864914279246
Estimated total supply: ......................  975406279367263
----------------------------------------------------------------

Computed - Estimated total supply: ...........   16458634911983

adding in csv_file.csv to the command should create a csv_file of ~160MB with balance information for all contracts.

Edited by Mathias Bourgoin

Merge request reports

Loading