namada icon indicating copy to clipboard operation
namada copied to clipboard

[draft] Modify the funds of an account in-place

Open sug0 opened this issue 2 years ago • 0 comments

Describe your changes

Implement a hard-forking util to modify the funds of a given account in-place (i.e. directly writing to RocksDB).

The current flow is something like:

  1. Stop the ledger at height $H$.
  2. Run the set-funds CLI util.
  3. Start the ledger with the env var NAMADA_INITIAL_HEIGHT set to $H+1$.
  4. To confirm that the hard-fork worked as expected, kill the ledger, unset NAMADA_INITIAL_HEIGHT and run the ledger once more.

TODO

  1. Write e2e test to test this flow with a full node also doing the hard-fork.
  2. Open PR replacingset-funds with a migrate subcmd that does nothing, except printing instructions on how to hard-fork. Must still keep the migrations specific logic though (e.g. InitChain and Info hacks).

Indicate on which release or other PRs this topic is based on

v0.24.1

Checklist before merging to draft

  • [ ] I have added a changelog
  • [x] Git history is in acceptable state

sug0 avatar Nov 04 '23 11:11 sug0