Yes Wallet: extract rich account over a given threshold
This MR introduces the --rich-account N,M command line option to the yes wallet so that it can extracts the firs N accounts owning a spendable balance over M and add them to the yes-wallet as rich_i.
This is quite long to run on mainnet (~30s) as iterating over the accounts on the protocol's side is not optimized. We might need to optimize it if needed.
Manually testing the MR
time dune exec devtools/yes_wallet/yes_wallet.exe -- create from context ./tmp/ in ./tmp-yes-wallet --network mainnet --active-bakers-only --rich-accounts-over 10,10000
The public_key_hashs should contains something like this
…
{
"name": "baker_10",
"value": "tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD"
},
{
"name": "rich_0",
"value": "tz1THUNARo58aD5YdNGYPnWNnvd8yHPrMdsF"
},
{
"name": "rich_1",
"value": "tz1VRj54TQDtUGgv6gF4AbGbXMphyDpVkCpf"
},
…
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Victor Allombert