explorer icon indicating copy to clipboard operation
explorer copied to clipboard

switching from from version 1.6.1 to the 1.7.3

Open emanhu opened this issue 6 years ago • 7 comments

Hi, I have a pretty old version of the Explorer, 1.6.1, which I have a huge blockchain database of over 250 Gb.

I tried to upgrade to version 1.7.3 but there is no explanation on how to do it and what change to be done. Every time I tried the sync.js update reindex and just the update run to error and do not sync with the coind

it work totally fine in vers 1.6.1 but very slow to sync, but Iam unable to move to the newest version.

I also tried to re-start completely the indexing but still get error message when trying to update the index.

Can someone help me? Im on ubuntu, latest version, my coind is on another computer on the same local network,

Here is the error I get when doing command: sudo node scripts/sync.js index update

Error during Stats Update: { CastError: Cast to number failed for value "There was an error. Check your console." at path "connections" at new CastError (/home/emanhu/explorer2/node_modules/mongoose/lib/error/cast.js:29:11) at SchemaNumber.cast (/home/emanhu/explorer2/node_modules/mongoose/lib/schema/number.js:315:11) at SchemaNumber.SchemaType.applySetters (/home/emanhu/explorer2/node_modules/mongoose/lib/schematype.js:969:12) at SchemaNumber.SchemaType._castForQuery (/home/emanhu/explorer2/node_modules/mongoose/lib/schematype.js:1383:15) at SchemaNumber.castForQuery (/home/emanhu/explorer2/node_modules/mongoose/lib/schema/number.js:367:14) at SchemaNumber.SchemaType.castForQueryWrapper (/home/emanhu/explorer2/node_modules/mongoose/lib/schematype.js:1352:15) at castUpdateVal (/home/emanhu/explorer2/node_modules/mongoose/lib/helpers/query/castUpdate.js:463:19) at walkUpdatePath (/home/emanhu/explorer2/node_modules/mongoose/lib/helpers/query/castUpdate.js:290:22) at castUpdate (/home/emanhu/explorer2/node_modules/mongoose/lib/helpers/query/castUpdate.js:81:18) at model.Query._castUpdate (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:4442:10) at castDoc (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:4470:18) at model.Query.Query._findAndModify (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:3448:22) at model.Query. (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:3001:8) at model.Query._wrappedThunk [as _findOneAndUpdate] (/home/emanhu/explorer2/node_modules/mongoose/lib/helpers/query/wrapThunk.js:16:8) at process.nextTick (/home/emanhu/explorer2/node_modules/kareem/index.js:369:33) at process._tickCallback (internal/process/next_tick.js:61:11) message: 'Cast to number failed for value "There was an error. Check your console." at path "connections"', name: 'CastError', stringValue: '"There was an error. Check your console."', kind: 'number', value: 'There was an error. Check your console.', path: 'connections', reason: undefined } events.js:174 throw er; // Unhandled 'error' event ^

TypeError: Cannot read property 'last' of undefined at /home/emanhu/explorer2/lib/database.js:771:31 at /home/emanhu/explorer2/node_modules/mongoose/lib/model.js:4599:16 at model.Query.Query._findAndModify (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:3461:16) at model.Query. (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:3001:8) at model.Query._wrappedThunk [as _findOneAndUpdate] (/home/emanhu/explorer2/node_modules/mongoose/lib/helpers/query/wrapThunk.js:16:8) at process.nextTick (/home/emanhu/explorer2/node_modules/kareem/index.js:369:33) at process._tickCallback (internal/process/next_tick.js:61:11) Emitted 'error' event at: at /home/emanhu/explorer2/node_modules/mongoose/lib/model.js:4601:13 at model.Query.Query._findAndModify (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:3461:16) [... lines matching original stack trace ...] at process._tickCallback (internal/process/next_tick.js:61:11)

emanhu avatar Apr 27 '20 01:04 emanhu

Hi Emanhu,

Does your coin support deamon-cli or deamon-tx ?

Regards, Bayer

BayerTM avatar Apr 27 '20 13:04 BayerTM

it is Bitcoin, do I need to add a specific line in the config file for that? as it worked on the previous Iquidus version(1.6.1)....

emanhu avatar Apr 27 '20 13:04 emanhu

Hi Emanhu,

Bitcoin version old coin or new coin ?

Iquidus version(1.6.1) doesnt need deamon-cli only deamond above version Iquidus 1.62 it needs a client to pull the get info from your blockchain coin.

if i was you turn on rpc connection in settings.json to check if its works you need to restart npm!! But i think its not compatible with your coin its to old. for using iquidus v1.7.3

Regards, Bayer

BayerTM avatar Apr 27 '20 16:04 BayerTM

Im using the latest Bitcoin Core version 0.19.1 from bitcoin.org, do I need to add anything in the config file to make it available? or bitcoin is simply not compatible with Iquidus?

changing the "use_rpc": true, give me this error:


Error: { Error: no auth mechanism defined at Auth.onRequest (/home/emanhu/explorer2/node_modules/request/lib/auth.js:132:32) at Request.auth (/home/emanhu/explorer2/node_modules/request/request.js:1341:14) at Request.init (/home/emanhu/explorer2/node_modules/request/request.js:378:10) at new Request (/home/emanhu/explorer2/node_modules/request/request.js:127:8) at request (/home/emanhu/explorer2/node_modules/request/index.js:53:10) at /home/emanhu/explorer2/node_modules/request/index.js:61:12 at Object.apply (/home/emanhu/explorer2/node_modules/@uphold/request-logger/src/index.js:27:19) at Function.post (/home/emanhu/explorer2/node_modules/request/index.js:100:12) at Function.tryCatcher (/home/emanhu/explorer2/node_modules/bluebird/js/release/util.js:16:23) at Function.ret [as postAsync] (eval at makeNodePromisifiedEval (/home/emanhu/explorer2/node_modules/bluebird/js/release/promisify.js:184:12), :14:23) at _bluebird.default.try (/home/emanhu/explorer2/node_modules/bitcoin-core/dist/src/index.js:182:27) at tryCatcher (/home/emanhu/explorer2/node_modules/bluebird/js/release/util.js:16:23) at Function.Promise.attempt.Promise.try (/home/emanhu/explorer2/node_modules/bluebird/js/release/method.js:39:29) at Client.command (/home/emanhu/explorer2/node_modules/bitcoin-core/dist/src/index.js:181:33) at rpcCommand (/home/emanhu/explorer2/lib/explorer.js:23:10) at Object.get_blockcount (/home/emanhu/explorer2/lib/explorer.js:167:7) at Object.update_db (/home/emanhu/explorer2/lib/database.js:747:9) at /home/emanhu/explorer2/scripts/sync.js:143:18 at /home/emanhu/explorer2/lib/database.js:324:16 at /home/emanhu/explorer2/node_modules/mongoose/lib/model.js:4599:16 at /home/emanhu/explorer2/node_modules/mongoose/lib/query.js:4351:12 at process.nextTick (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:2849:28) cause: Error: no auth mechanism defined at Auth.onRequest (/home/emanhu/explorer2/node_modules/request/lib/auth.js:132:32) at Request.auth (/home/emanhu/explorer2/node_modules/request/request.js:1341:14) at Request.init (/home/emanhu/explorer2/node_modules/request/request.js:378:10) at new Request (/home/emanhu/explorer2/node_modules/request/request.js:127:8) at request (/home/emanhu/explorer2/node_modules/request/index.js:53:10) at /home/emanhu/explorer2/node_modules/request/index.js:61:12 at Object.apply (/home/emanhu/explorer2/node_modules/@uphold/request-logger/src/index.js:27:19) at Function.post (/home/emanhu/explorer2/node_modules/request/index.js:100:12) at Function.tryCatcher (/home/emanhu/explorer2/node_modules/bluebird/js/release/util.js:16:23) at Function.ret [as postAsync] (eval at makeNodePromisifiedEval (/home/emanhu/explorer2/node_modules/bluebird/js/release/promisify.js:184:12), :14:23) at _bluebird.default.try (/home/emanhu/explorer2/node_modules/bitcoin-core/dist/src/index.js:182:27) at tryCatcher (/home/emanhu/explorer2/node_modules/bluebird/js/release/util.js:16:23) at Function.Promise.attempt.Promise.try (/home/emanhu/explorer2/node_modules/bluebird/js/release/method.js:39:29) at Client.command (/home/emanhu/explorer2/node_modules/bitcoin-core/dist/src/index.js:181:33) at rpcCommand (/home/emanhu/explorer2/lib/explorer.js:23:10) at Object.get_blockcount (/home/emanhu/explorer2/lib/explorer.js:167:7) at Object.update_db (/home/emanhu/explorer2/lib/database.js:747:9) at /home/emanhu/explorer2/scripts/sync.js:143:18 at /home/emanhu/explorer2/lib/database.js:324:16 at /home/emanhu/explorer2/node_modules/mongoose/lib/model.js:4599:16 at /home/emanhu/explorer2/node_modules/mongoose/lib/query.js:4351:12 at process.nextTick (/home/emanhu/explorer2/node_modules/mongoose/lib/query.js:2849:28), isOperational: true }

emanhu avatar Apr 27 '20 18:04 emanhu

NPM can not connect to your deamon wallet via bitcoin-cli where is your xxxx-cli file ?

BayerTM avatar Apr 27 '20 21:04 BayerTM

Let assume your coin name is emanhu coin

Then you need to have 4 files of this bitcoin forked wallet

emanhu-qt.exe ------------- GUI wallet for windows emanhud ------------------- Deamon wallet for linux emanhu-cli ----------------- Client for connecting to your deamond wallet emanhu-tx ----------------- TX client for connecting to your deamond wallet

  • You need drop both files emanhud and emanhu-cli in your /bin folder make also both files executable use command sudo chmod +x pathtoyourcoin/coinname
  • Be sure config your (coin name).conf file in the hidden folder .yourcoinname folder

rpcuser=your user name can be anything needs to be same as in the settings.json file rpcpassword=your pass can be anything needs to be same as in settings.json file listen=1 server=1 txindex=1 daemon=1

Regards, Bayer

BayerTM avatar Apr 27 '20 21:04 BayerTM

wipe all your mongo collections and try again.

TheHolyRoger avatar Jul 16 '20 18:07 TheHolyRoger