1

We are uploading balances to a parachain. And there are some errors, so we would like to overwrite all ~20k balances. Is setBalance safe enough to overwrite, or is there a cleaner way such as reaping all the balances in question, and then setBalance thereafter?

Secondly, does setBalance to zero remove the leaves from the trie, or does 0.000 remain in the trie?

3
  • Of course balances that are zero will be reaped, if the chain has reaping set up. Aug 21, 2022 at 19:45
  • What are you doing exactly? What errors do you get? This is not enough info to really help you. The cleanest solution is a storage migration since its atomic and cannot be interfered with. Otherwise a batch call could work, but maybe not with 20k at once. Aug 22, 2022 at 10:19
  • batch call wont do it, were uploading balances to an already launched chain, we created a custom scheduler to upload 20k balance distribution, which unvests at a relayblocknumber which can be changed by root. Just checking if theres ever been weird behaviour that setBalance didnt overwrite. But i think its all good. thanks Aug 22, 2022 at 15:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.