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

Minor fixes to testnet 78 migration #4596

Merged
merged 2 commits into from
Jun 12, 2024
Merged

Minor fixes to testnet 78 migration #4596

merged 2 commits into from
Jun 12, 2024

Conversation

zbuc
Copy link
Member

@zbuc zbuc commented Jun 12, 2024

Describe your changes

Configure migrations to run testnet 78 migration, add more logging, fix bug with validator migration

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    consensus breaking because it's a migration

@zbuc zbuc added consensus-breaking breaking change to execution of on-chain data state-breaking breaking change to on-chain data labels Jun 12, 2024
@zbuc zbuc requested review from erwanor and conorsch June 12, 2024 16:43
@conorsch
Copy link
Contributor

conorsch commented Jun 12, 2024

Nice, thanks for following up (refs #4567). I'll dig into migration testing for 78 today!

@conorsch
Copy link
Contributor

conorsch commented Jun 12, 2024

Looks like the revised migration applies fine, but the chain cannot restart after the migration is run, because the halt bit is still set to true. A common mistake: I did the exact same thing when writing the Testnet77 migration (#4503) and had to follow up with a narrow fix in #4508.

Unsurprisingly I see that the competing Testnet77 migration in #4564 does not make this same mistake, hat-tip to @erwanor on that. But let's fix it here, so we can proceed with migration testing, and sort out conflicts in #4654 separately.

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.

Needs to reset the halt bit: I'll append a commit and re-review after testing.

@zbuc
Copy link
Member Author

zbuc commented Jun 12, 2024

Oof, good catch. I had refactored the migration code to de-duplicate all the common operations in migrations but then reverted it and forgot to add those steps back to the testnet 78 migration.

@conorsch
Copy link
Contributor

I had refactored the migration code to de-duplicate all the common operations in migrations but then reverted it and forgot to add those steps back to the testnet 78 migration.

Thanks for tackling this, even if it didn't land. I remain in favor of cleaning up the migration tooling (#4294), but don't mind writing more migrations as practice to inform what the shape of that cleanup should be.

@conorsch conorsch merged commit f8d1b9a into main Jun 12, 2024
16 checks passed
@conorsch conorsch deleted the 78_migration_fixes branch June 12, 2024 22:24
let next_proposal_id: u64 = delta.next_proposal_id().await?;

// Range each proposal and truncate the fields.
for proposal_id in 0..next_proposal_id {
tracing::info!("truncating proposal: {}", proposal_id);
Copy link
Member

Choose a reason for hiding this comment

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

@zbuc doesn't this have the same issue of pulling data using stronger rules that existed when it was stored?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, will follow up in a new PR

Copy link
Member Author

Choose a reason for hiding this comment

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

@erwanor erwanor added migration A pull request that contains a migration and removed consensus-breaking breaking change to execution of on-chain data state-breaking breaking change to on-chain data labels Jun 13, 2024
erwanor pushed a commit that referenced this pull request Jun 13, 2024
… in migration (#4606)

## Describe your changes

Don't deserialize proto types to avoid applying new domain validations
to old types in migration 78

## Issue ticket number and link

#4596 (comment)

## Checklist before requesting a review

- [x ] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

> Migration change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration A pull request that contains a migration
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants