Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 5 commits into from

Conversation

sug0
Copy link
Collaborator

@sug0 sug0 commented Nov 4, 2023

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
  • Git history is in acceptable state

@sug0 sug0 requested review from adrianbrink and cwgoes November 4, 2023 11:42
adrianbrink
adrianbrink previously approved these changes Nov 5, 2023
Copy link
Collaborator

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, but let's split out to review & merge separately:

  • migration checks, abci logic modification
  • add a migration command which does nothing but has all the right boilerplate (can print some instructions)

Let's also keep a standalone set-funds example in some branch.

@cwgoes cwgoes mentioned this pull request Nov 11, 2023
@sug0
Copy link
Collaborator Author

sug0 commented Apr 3, 2024

Superseded by #2835

@sug0 sug0 closed this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants