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

Update migrations #900

Merged
merged 11 commits into from
Aug 27, 2024
Merged

Update migrations #900

merged 11 commits into from
Aug 27, 2024

Conversation

nodech
Copy link
Contributor

@nodech nodech commented Jul 3, 2024

Update Migrations

Old migrations depend on the methods and states that may be broken by the future updates to the codebase. This PR attempts to fix old migrations to reduce depenencies to the codebase. For example, Change address migration is currently broken, if user were to migrate from earlier non-fixed versions (e.g. v2.1.0)

Migrations are now run against generated data from the original versions of hsd. Generator and generated codes can be found in test/data/migrations, for both the wallet and the chain.

This PR attempts to go over all migrations. Review and fix test cases and migrations:

  • WDB
    • MigrateMigrations
    • MigrateChangeAddress
      • This can be further detached from the actual code, but currently
        still depends on wallet/walletkey, wallet/path and
        wallet/records.MapRecord.
    • MigrateAccountLookahead
    • MigrateTXDBBalances
  • ChainDB
    • MigrateMigrations
    • MigrateChainState
    • MigrateBlockStore
    • MigrateTreeState

@nodech nodech added blockchain part of the codebase migrations part of the codebase wallet-db part of the codebase labels Jul 3, 2024
@coveralls
Copy link

Coverage Status

coverage: 68.551%. remained the same
when pulling 8402cd0 on nodech:update-migrations
into 106fbfa on handshake-org:master.

@coveralls
Copy link

Coverage Status

coverage: 68.579% (+0.03%) from 68.551%
when pulling bc98d66 on nodech:update-migrations
into 106fbfa on handshake-org:master.

@coveralls
Copy link

coveralls commented Jul 11, 2024

Coverage Status

coverage: 69.906% (+0.1%) from 69.802%
when pulling 6cf9817 on nodech:update-migrations
into 9ddb69e on handshake-org:master.

@nodech nodech marked this pull request as ready for review July 23, 2024 13:33
@nodech
Copy link
Contributor Author

nodech commented Jul 23, 2024

Tested migration from v2.1.3 to this branch for spv, full and pruned. All migrated w/o issues.

@nodech nodech force-pushed the update-migrations branch 2 times, most recently from 89ce0ec to 15bedd8 Compare August 26, 2024 14:49
@nodech nodech merged commit ceab2a8 into handshake-org:master Aug 27, 2024
6 checks passed
@nodech nodech deleted the update-migrations branch August 27, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blockchain part of the codebase migrations part of the codebase wallet-db part of the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants