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

Make the first stable release forward-compatible with planned state changes #6746

Closed
4 tasks done
Tracked by #6642
teor2345 opened this issue May 23, 2023 · 0 comments · Fixed by #6813
Closed
4 tasks done
Tracked by #6642

Make the first stable release forward-compatible with planned state changes #6746

teor2345 opened this issue May 23, 2023 · 0 comments · Fixed by #6813
Assignees
Labels
A-state Area: State / database changes C-enhancement Category: This is an improvement

Comments

@teor2345
Copy link
Contributor

teor2345 commented May 23, 2023

Motivation

We're going to make some state changes that are backward-compatible as part of the "fast spendability" RPCs in #6642. Later Zebra versions can already open and read earlier states and update them, without changing the major version of the state.

But to make them forward-compatible (earlier versions can read later states), we need to make some minor changes.

Scheduling

Ideally, these changes should be made before the stable release, so we can guarantee that any stable Zebra version can open any stable state.

Compatibility Issues

RocksDB requires all column families to be listed when we open the state read-write:

  • use list_cf() so earlier Zebra versions can open column families added in later state versions

In #4784, we will delete some duplicate sapling and orchard tree states:

  • use zs_prev_key_value_back_from() to look up sapling and orchard note commitment trees
  • sprout already deletes its old note commitment trees when it adds a new one, because historical roots are looked up by their hash

Version tracking:

  • add a minor version 25.1 to the state, and call the previous version 25.0

Testing

I think we should support these changes on a best-effort basis, and just use our existing tests.

@mpguerra mpguerra added this to Zebra May 23, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra May 23, 2023
@teor2345 teor2345 changed the title Make state lookups forward-compatible before the stable release Make state lookups forward-compatible with changes after the stable release May 23, 2023
@teor2345 teor2345 changed the title Make state lookups forward-compatible with changes after the stable release Make the first stable release forward-compatible with planned state changes May 23, 2023
@teor2345 teor2345 self-assigned this May 29, 2023
@teor2345 teor2345 added C-enhancement Category: This is an improvement P-Medium ⚡ A-state Area: State / database changes labels Jun 4, 2023
@mergify mergify bot closed this as completed in #6813 Jun 6, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Zebra Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-state Area: State / database changes C-enhancement Category: This is an improvement
Projects
Archived in project
1 participant