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

[ironfish migrations] Error applying 025-backfill-wallet-nullifier-to-transaction-hash #3796

Closed
4mi1amai opened this issue Apr 17, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@4mi1amai
Copy link

What happened?

Failed to start ironfish after upgrade 0.1.70 ->0.1.76

sudo npm install -g ironfish
ironfish reset

You are about to destroy your local copy of the blockchain. The following directories and files will be deleted:

Blockchain: /home/iron/.ironfish/databases/chain
Hosts: /home/iron/.ironfish/hosts.json
Your wallet, accounts, and keys will NOT be deleted.

The network ID will stay unchanged as 0

Are you sure? (Y)es / (N)o: y
Deleting databases...... Databases deleted successfully

 ironfish wallet:transactions
Error applying 025-backfill-wallet-nullifier-to-transaction-hash
Error: InvalidAssetIdentifier
    at /usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/primitives/transaction.js:58:47
    at Function.from (<anonymous>)
    at new Transaction (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/primitives/transaction.js:55:28)
    at TransactionValueEncoding.deserialize (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/migrations/data/025-backfill-wallet-nullifier-to-transaction-hash/old/transactionValue.js:38:29)
    at LevelupStore.getAllIter (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/storage/levelup/store.js:93:64)
    at async LevelupStore.getAllValuesIter (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/storage/levelup/store.js:106:34)
    at async Migration025.forward (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/migrations/data/025-backfill-wallet-nullifier-to-transaction-hash.js:37:55)
    at async Migrator.migrate (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/migrations/migrator.js:118:17)
    at async IronfishNode.openDB (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/node.js:199:13)
    at async Object.waitForOpen (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/utils/node.js:16:13)
ironfish migration
 ›   Warning: migration is not a ironfish command.
Did you mean migrations? [y/n]: y
Checking migrations:
  Checking 014-blockchain...                       APPLIED
  Checking 015-wallet...                           APPLIED
  Checking 016-sequence-to-tx...                   APPLIED
  Checking 017-sequence-encoding...                APPLIED
  Checking 018-backfill-wallet-assets...           APPLIED
  Checking 019-backfill-wallet-assets-from-cha...  APPLIED
  Checking 020-backfill-null-asset-supplies...     APPLIED
  Checking 021-add-version-to-accounts...          APPLIED
  Checking 022-add-view-key-account...             APPLIED
  Checking 023-wallet-optional-spending-key...     APPLIED
  Checking 024-unspent-notes...                    APPLIED
  Checking 025-backfill-wallet-nullifier-to-tr...  WAITING
  Checking 026-timestamp-to-transactions...        WAITING
  Checking 027-account-created-at-block...         WAITING

You have 3 unapplied migrations.
ironfish wallet:transactions
Your database needs to be upgraded (v24 vs v27).
Run "ironfish migrations:start" or "ironfish start --upgrade"

 ironfish start --upgrade


::::::::::          :::::::::::::::::
::::::::::::       :::::::::::::::::::
:::::::::::::     :::::::::::::::::::::
::::::::::::::   ::::::::::::::::::::::::
 ::::::::::::: ::::::::::        :::::::::
   :::::::::::::::::::::          ::::::::::
   :::::::::::::::::::::          :::::::::
 ::::::::::::: ::::::::::        :::::::::
::::::::::::::   ::::::::::::::::::::::::
:::::::::::::     :::::::::::::::::::::
::::::::::::       :::::::::::::::::::
::::::::::           ::::::::::::::::

Version       0.1.76 @ 6e6508d
Node Name     ir2
Graffiti      ir2
Peer Identity 
Peer Agent    ironfish/0.1.76/6e6508d
Peer Port     9033
Bootstrap     1.test.bn.ironfish.network,2.test.bn.ironfish.network

Applying 3 migrations:
  025-backfill-wallet-nullifier-to-transaction-hash
  026-timestamp-to-transactions
  027-account-created-at-block

Running 025-backfill-wallet-nullifier-to-transaction-hash...
Backfilling nullifier to transaction hashes for 3 accounts

  Backfilling nullifier to transaction hashes for account Savings
Error applying 025-backfill-wallet-nullifier-to-transaction-hash
Error: InvalidAssetIdentifier
    at /usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/primitives/transaction.js:58:47
    at Function.from (<anonymous>)
    at new Transaction (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/primitives/transaction.js:55:28)
    at TransactionValueEncoding.deserialize (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/migrations/data/025-backfill-wallet-nullifier-to-transaction-hash/old/transactionValue.js:38:29)
    at LevelupStore.getAllIter (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/storage/levelup/store.js:93:64)
    at async LevelupStore.getAllValuesIter (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/storage/levelup/store.js:106:34)
    at async Migration025.forward (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/migrations/data/025-backfill-wallet-nullifier-to-transaction-hash.js:37:55)
    at async Migrator.migrate (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/migrations/migrator.js:118:17)
    at async IronfishNode.openDB (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/node.js:199:13)
    at async Object.waitForOpen (/usr/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/utils/node.js:16:13)


Version

0.1.76

Debug output

No response

Relevant log output

No response

Graffiti

ir2

@4mi1amai 4mi1amai added the bug Something isn't working label Apr 17, 2023
@breathshoria
Copy link
Contributor

breathshoria commented Apr 17, 2023

Team aware of this, fix is on the way
#3791

@hughy
Copy link
Contributor

hughy commented Apr 19, 2023

This will be resolved by #3797 , which will be a part of the mainnet release.

In the meantime, if you have already backed up your account with ironfish wallet:export, then you can delete your ironfish data directory (/home/iron/.ironfish), start a new node, and import your account with ironfish wallet:import

@hughy hughy closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants