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

Small package of fixes for migration process #14558

Merged
merged 7 commits into from
Dec 20, 2023

Conversation

dkijania
Copy link
Member

@dkijania dkijania commented Nov 14, 2023

Archive Migration tooling consist of two applications:

During testing I found a couple of improvements/ small fixes which are necessary for testing and correct run:

  • extract parameters from berkeley_migration:
    a) bucket location
    b) number of batches for precomputed block fetch
    c) corner case when there are no precomputed blocks to fetch

Closes #14551

@dkijania dkijania self-assigned this Nov 14, 2023
@dkijania
Copy link
Member Author

ci-build-me!

@psteckler
Copy link
Member

Did you see my message about writing the migrated transaction hashes?

When migrated, the old transaction hashes will be written as new transaction hashes. In my message, I explained how to avoid that.

You might want to add a check that the migrated transaction hashes are syntactically the same as the old ones.

@dkijania dkijania force-pushed the dkijania/migration_app_enh branch from 3e5a7a3 to 388d097 Compare November 22, 2023 19:50
@@ -142,7 +143,7 @@ let user_commands_from_block_id ~mainnet_pool block_id =
~f:mainnet_transaction_failure_of_string
in
let hash =
Mina_transaction.Transaction_hash.of_base58_check_exn user_cmd.hash
Mina_transaction.Transaction_hash.of_base58_check_exn_v1 user_cmd.hash
Copy link
Contributor

@ghost-not-in-the-shell ghost-not-in-the-shell Dec 7, 2023

Choose a reason for hiding this comment

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

I think you should also change in archive_lib.user_commands.add_extensional_if_doesn't_exist function. Otherwise the hash you writen to the migrated database would be changed:

; hash = user_cmd.hash |> Transaction_hash.to_base58_check

Copy link
Member

Choose a reason for hiding this comment

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

I sent an email to Deepthi with a suggested way to handle this issue. You'd add an optional boolean flag to add_extensional_if_doesn't_exist that would indicate whether to use the V1 hash.

@ghost-not-in-the-shell
Copy link
Contributor

I agree with paul that you want to add some check that checks the migrated transaction hash is syntactically the same as before.

@dkijania dkijania force-pushed the dkijania/migration_app_enh branch from 7e1d946 to 75222cb Compare December 15, 2023 12:53
@dkijania
Copy link
Member Author

!ci-build-me

@dkijania dkijania marked this pull request as ready for review December 15, 2023 20:55
@dkijania dkijania requested review from a team as code owners December 15, 2023 20:56
@@ -34,6 +34,13 @@ let applied_str = "applied"

let failed_str = "failed"

let to_base58_check ?(v1_transaction_hash = false) hash =
match v1_transaction_hash with
Copy link
Member

Choose a reason for hiding this comment

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

if ... then ... else might be simpler than match here

@ghost-not-in-the-shell
Copy link
Contributor

!ci-build-me

@ghost-not-in-the-shell
Copy link
Contributor

!ci-nightly-me

@coveralls
Copy link

coveralls commented Dec 19, 2023

Coverage Status

coverage: 61.517% (+0.002%) from 61.515%
when pulling 5552936 on dkijania/migration_app_enh
into d3642cb on berkeley.

@deepthiskumar
Copy link
Member

!approved-for-mainnet

Copy link
Member

@dannywillems dannywillems left a comment

Choose a reason for hiding this comment

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

Bumping protocol team approval.

@ghost-not-in-the-shell ghost-not-in-the-shell merged commit d0b47a4 into berkeley Dec 20, 2023
@ghost-not-in-the-shell ghost-not-in-the-shell deleted the dkijania/migration_app_enh branch December 20, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants