-
Notifications
You must be signed in to change notification settings - Fork 551
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
Conversation
ci-build-me! |
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. |
3e5a7a3
to
388d097
Compare
@@ -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 |
There was a problem hiding this comment.
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:
mina/src/app/archive/lib/processor.ml
Line 1882 in 79c6253
; hash = user_cmd.hash |> Transaction_hash.to_base58_check |
There was a problem hiding this comment.
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.
I agree with paul that you want to add some check that checks the migrated transaction hash is syntactically the same as before. |
7e1d946
to
75222cb
Compare
!ci-build-me |
src/app/archive/lib/processor.ml
Outdated
@@ -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 |
There was a problem hiding this comment.
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
!ci-build-me |
!ci-nightly-me |
!approved-for-mainnet |
There was a problem hiding this 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.
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:
a) bucket location
b) number of batches for precomputed block fetch
c) corner case when there are no precomputed blocks to fetch
Closes #14551