-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Exception at a specific block height during sync. #464
Comments
Approximately which block is it failing on? Also, which coin are you trying to sync? My guess is that block is using some kind of non-standard blockchain feature which isn't supported by iquidus, but difficult to say exactly what's going on until we can see the raw block data. |
the coin is oasis, and it has been running on another explorer for years now. https://oasis.ccore.online. The exact block it's failing on is 6070 (i.e after 6069 loads the error is triggered) A little bit more data: 6068: 03803a98b630f02823730efc33b0a8583baeb72623ea265fff2df942d75e7711 TypeError: Cannot read property '0' of undefined |
Thanks for the sample block data and existing explorer link, that really helped to diagnose the problem quickly. The issue is that the 3rd transaction in block 6069 is using a zerocoin privacy feature which is not supported in iquidus at this time: https://oasis.ccore.online/transaction/7d38b3e2ce68b4956420c3a232cff60fd026d31c2d1d2d4d7e26faf5879b1781 Unfortunately, if you want to use iquidus as a block explorer for this coin you will either need to add your own implementation for handling zerocoin transactions or else maybe you can get lucky and find another custom iquidus explorer floating around online that has already done this, but I don't know of one to recommend. |
I see. The main reason I wanted to use Iquidus is because I'd like to query the blockchain to get all addresses with a positive balance. Is there another approach I can use to achieve same? |
Found a fix for the exception. changing the following line in explorer.js: if (vout[i].scriptPubKey.type != 'nonstandard' && vout[i].scriptPubKey.type != 'nulldata' && vout[i].scriptPubKey.hasOwnProperty("addresses")) { Hopefully it helps someone else. |
That's probably the best workaround for your situation where you simply skip over the obfuscated addresses during syncing like you have demonstrated. Please note that the private data is being discarded in this case and not being handled properly, so I want to be clear that this is NOT a proper fix for zerocoin. It will work for your use-case however since you wouldn't be able to figure out the private balances anyway and so discarding that data shouldn't matter for your purpose. I hope that makes sense. |
I think I get your point. |
Another exception encountered after block height 334604 is loaded. explorer/node_modules/bluebird/js/release/async.js:49 TypeError: Cannot read property 'length' of undefined |
Fix from a comment in the same link posted earlier: |
Am hitting the exception below consistently at a specific block height as sync.js runs. I have tried it about 10 times and consistently hit the exception, and always at that height.
Tracing the code on the line explorer.js:503:74 it appears it's relating to an address in the blockchain? But not sure which address and whether it is fetching it from setting.json.
Please advise.
TypeError: Cannot read property '0' of undefined
at explorer/lib/explorer.js:503:74
at Object.next (explorer/lib/explorer.js:360:18)
at Object.syncLoop (explorer/lib/explorer.js:376:10)
at Object.prepare_vout (explorer/lib/explorer.js:497:20)
at explorer/lib/database.js:117:13
at explorer/lib/explorer.js:605:14
at Object.next (explorer/lib/explorer.js:365:24)
at explorer/lib/explorer.js:596:22
at Object.convert_to_satoshi (explorer/lib/explorer.js:40:12)
at explorer/lib/explorer.js:594:30
at explorer/lib/explorer.js:476:14
at Object.next (explorer/lib/explorer.js:348:19)
at explorer/lib/explorer.js:471:14
at Object.next (explorer/lib/explorer.js:360:18)
at Object.syncLoop (explorer/lib/explorer.js:376:10)
at Object.is_unique (explorer/lib/explorer.js:465:20)
at explorer/lib/explorer.js:587:26
at explorer/lib/explorer.js:571:20
at Object.next (explorer/lib/explorer.js:348:19)
at explorer/lib/explorer.js:565:22
at Object.next (explorer/lib/explorer.js:360:18)
at explorer/lib/explorer.js:568:20
The text was updated successfully, but these errors were encountered: