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

upgrades: write a migration script for #4084 #4108

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

erwanor
Copy link
Member

@erwanor erwanor commented Mar 26, 2024

This implements a migration for #4084 and makes it the default command in pd migrate.

@erwanor
Copy link
Member Author

erwanor commented Mar 26, 2024

Something to note is that in this case, we can get away with using a prefix query because we're not trying to capture a range, but in the future we might to run more complex migrations that operate over a specific block window. We could do prefix+filtering but this might end up being much more expensive than a range query still.

I am running a test on a private chain, if it works we can leave it as is. Otherwise, we'll fallback on the SimpleMigration strategy when we do the next pd release (in addition to incrementing the TOTAL_HALT_COUNTER).

@erwanor erwanor self-assigned this Mar 26, 2024
@erwanor erwanor added this to the Sprint 3 milestone Mar 26, 2024
@erwanor erwanor added A-upgrades Area: Relates to chain upgrades migration A pull request that contains a migration labels Mar 26, 2024
@erwanor erwanor marked this pull request as draft March 27, 2024 15:43
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

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

LGTM. Intentionally not merging so that we can coordinate timing carefully.

@@ -13,7 +13,7 @@ use cnidarium::{StateDelta, Storage};
use metrics_exporter_prometheus::PrometheusBuilder;
use pd::{
cli::{Opt, RootCommand, TestnetCommand},
migrate::Migration::SimpleMigration,
migrate::Migration::Testnet70,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: should this be Testnet71? That would make it clearer that we expect it to ship with v0.71.0. It's not exposed to operators, so we just need to keep the terminology straight ourselves.

Copy link
Member Author

Choose a reason for hiding this comment

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

SG, my reasoning was 70 -> 71, but the other way around works too

@conorsch conorsch marked this pull request as ready for review March 28, 2024 17:38
@conorsch conorsch mentioned this pull request Mar 28, 2024
1 task
@conorsch conorsch merged commit ccc8280 into main Mar 28, 2024
7 checks passed
@conorsch conorsch deleted the erwan/dex_migration_4084 branch March 28, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-upgrades Area: Relates to chain upgrades migration A pull request that contains a migration
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants