We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Do I understand correctly the migration mechanism:
In that case, we already have some data in the contract. For example, we register the current_account_id and owner_id and change accounts_counter https://github.com/aurora-is-near/aurora-eth-connector/blob/master/eth-connector/src/lib.rs#L197
current_account_id
owner_id
accounts_counter
After migration, we don't delete the current_account_id and owner_id from the accounts list, but rewrite account_counter, as a result, it can become incorrect. https://github.com/aurora-is-near/aurora-eth-connector/blob/master/eth-connector/src/lib.rs#L625
account_counter
Moreover, we don't check at the end of the migration that the data is consistent:
And we don't migrate metadata
metadata
I propose checking before migration that all the data is empty and don't register anything in new function.
new
Or presenting more clear guarantee for the migration. For example, merge the data instead of rewriting it.
The text was updated successfully, but these errors were encountered:
I think it's one major mistake here. Data should be the same as migrated data from the Engine. It means:
eth-connector
But about account_counter field. May be good idea just recalculate it, yes.
Other data look consistent, and checked with method check_migration_correctness
check_migration_correctness
Sorry, something went wrong.
We shouldn't migrate metadata. It's constant data, and it's initialized with contract.
Refactored at #56
mrLSD
No branches or pull requests
Do I understand correctly the migration mechanism:
In that case, we already have some data in the contract. For example, we register the
current_account_id
andowner_id
and changeaccounts_counter
https://github.com/aurora-is-near/aurora-eth-connector/blob/master/eth-connector/src/lib.rs#L197After migration, we don't delete the current_account_id and owner_id from the accounts list, but rewrite
account_counter
, as a result, it can become incorrect. https://github.com/aurora-is-near/aurora-eth-connector/blob/master/eth-connector/src/lib.rs#L625Moreover, we don't check at the end of the migration that the data is consistent:
And we don't migrate
metadata
I propose checking before migration that all the data is empty and don't register anything in
new
function.Or presenting more clear guarantee for the migration. For example, merge the data instead of rewriting it.
The text was updated successfully, but these errors were encountered: