iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
963 stars 575 forks source link

sync error #3653

Closed modnarwolf closed 1 year ago

modnarwolf commented 1 year ago

What happened?

mining was fine in 1.66 but think 1.69/1,70 I get this error on ironfish start right after syncing.

also i ran ironfish migrations and i see only up to 024-unspent-notes but idk if this is relevant or it should be higher

Thank you!

Version

1.70

Debug output

Iron Fish version                  0.1.70 @ 6fb75f4
Iron Fish library                  0.0.47 @ 6fb75f4
Operating system                   Linux x64
CPU model(s)                       12th Gen Intel(R) Core(TM) i9-12900K
CPU threads                        24
RAM total                          62.51 GiB
Heap total                         4.00 GiB
Node version                       v18.13.0
ironfish in PATH                   true
Garbage Collector Exposed          false
Telemetry enabled                  true
Node name                          MW
Block graffiti                     MW
Account 88d1af uuid                88d1afd3-9a5c-4be9-a66a-4084efd2ff8c
Account 88d1af name                MW
Account 88d1af head hash           000000000002c69b1bb33c5db8e1854307dde515ef462ab2bc597fc7def5a4c8
Account 88d1af head in chain       true
Account 88d1af sequence            83528

Relevant log output

Added block seq: 83520, hash: 00000...e4263, txs: 12, progress: 99.92%, time: 40.7ms
Requesting 5 blocks starting at 00000...5a4c8 (83528) from J7Eqv+d (akrimah)
/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/assert.js:18
            throw new Error(message || `Expected value not to be undefined`);
                  ^

Error: Expected value not to be undefined
    at Assert.isNotUndefined (/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/assert.js:18:19)
    at Account.deleteCreatedAssetsFromTransaction (/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/wallet/account.js:474:29)
    at async /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/wallet/account.js:463:13
    at async LevelupDatabase.withTransaction (/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/storage/database/database.js:41:28)
    at async Account.expireTransaction (/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/wallet/account.js:447:9)
    at async Wallet.expireTransactions (/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/wallet/wallet.js:724:17)
    at async Wallet.eventLoop (/home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/@ironfish/sdk/build/src/wallet/wallet.js:188:9)

Node.js v18.13.0

=================================================
=================================================

ironfish migrations
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

Graffiti

MW

dguenther commented 1 year ago

Thanks for reporting! We've merged a fix for this a couple days ago -- it should be coming out in the next release, but we're not planning to push any more fixes to the Phase 3 network at this time.

@hughy This was fixed in #3629, right?

hughy commented 1 year ago

Yeah, #3629 will resolve this issue!

If you continue to run into this issue on v0.1.70 you can run ironfish wallet:rescan --reset

modnarwolf commented 1 year ago

command seemed to get the sync to finsh again... but ran ironfish migration and got this Checking migrations: Checking 014-blockchain... ERROR OpenError: IO error: lock /home/clos/.ironfish/databases/chain/LOCK: Resource temporarily unavailable at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/levelup/lib/levelup.js:119:23 at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/abstract-leveldown/abstract-leveldown.js:38:14 at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/deferred-leveldown/deferred-leveldown.js:31:21 at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/abstract-leveldown/abstract-leveldown.js:38:14 OpenError: IO error: lock /home/clos/.ironfish/databases/chain/LOCK: Resource temporarily unavailable at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/levelup/lib/levelup.js:119:23 at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/abstract-leveldown/abstract-leveldown.js:38:14 at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/deferred-leveldown/deferred-leveldown.js:31:21 at /home/clos/.nvm/versions/node/v18.13.0/lib/node_modules/ironfish/node_modules/abstract-leveldown/abstract-leveldown.js:38:14

thanks you both, and again not sure if this is related at all.

hughy commented 1 year ago

@modnarwolf you might see this error if you run ironfish migration while you have a node running. I'll see if we can improve the error output in this case!

You can stop the node and run ironfish migration again to check the status of migrations.

You can also start the node with ironfish start --upgrade or run ironfish migrations:start to apply migrations

modnarwolf commented 1 year ago

@hughy ohh I see... thanks again 😇