[go: up one dir, main page]

Devtools/yes-wallet: fold that actually folds

This simple MR uses the protocol's fold while folding the contracts, instead of listing all the contracts, and then, folding over then. It allows a drastic speedup for the -rich-accounts-over feature, going from ~30 seconds to 1 second while searching for --rich-accounts-over 10,10000

Note that the Obj.magic is necessary to backport this to Rio and Seoul. For Alpha we will expose the fold in the Internal_for_test module to get a proper code. @julien.t will take care of this soon. Btw, thank you @julien.t for encouraging me to use Obj.magic 😅

Manually testing the MR

Run dune exec devtools/yes_wallet/yes_wallet.exe -- create from context ./recent_mainnet in ./tmp-yes-wallet --network mainnet --active-bakers-only --rich-accounts-over 10,10000

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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading