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

Historic Sync failing during initial sync [testnet] #110

Closed
iancoleman opened this issue Jun 1, 2014 · 3 comments
Closed

Historic Sync failing during initial sync [testnet] #110

iancoleman opened this issue Jun 1, 2014 · 3 comments

Comments

@iancoleman
Copy link
Contributor

I'm trying to sync the insight database for a testnet instance and the sync process crashes at about 80% through.

I've tried util/sync.js -D and it always crashes at the same point in the sync.

It seems like this is happening in a multisig transaction (from the stacktrace below):
bitcore/lib/Address.js:122
Almost certainly this one
http://test.insight.is/tx/2c63aa814701cef5dbd4bbaddab3fea9117028f2434dddcdab8339141e9b14d1

I'm afraid that's as far as I could get debugging this issue.

The stack trace from the error is:

insight server listening on port 3001 in production mode
info: Resuming sync from block: 00000000a0dff26bb4a33874a8ddcbb06b4ab8fce787e6bd7319e05ede36ab55 #204625
info: Seeking file to:00000000a0dff26bb4a33874a8ddcbb06b4ab8fce787e6bd7319e05ede36ab55
Reading Blockfile /home/ubuntu/.bitcoin/testnet3/blocks/blk00003.dat [127 MB]
... [some p2p_sync messages] ...
        FOUND Starting Block!
info: Got 204625 blocks in current DB, out of 258500 block at bitcoind
info: bitcoind dataDir configured...importing blocks from .dat files
info: First file index: 3
info: Starting from:  00000000a0dff26bb4a33874a8ddcbb06b4ab8fce787e6bd7319e05ede36ab55
info: status: [79.159%]

crypto.js:209
  this._binding.update(data, encoding);
                ^
TypeError: Not a string or buffer
    at Hash.update (crypto.js:209:17)
    at exports.sha256 (/home/ubuntu/insight-api/node_modules/bitcore/util/util.js:14:49)
    at Object.exports.sha256ripe160 (/home/ubuntu/insight-api/node_modules/bitcore/util/util.js:55:18)
    at new Address.fromScriptPubKey (/home/ubuntu/insight-api/node_modules/bitcore/lib/Address.js:122:33)
    at /home/ubuntu/insight-api/lib/TransactionDb.js:509:19
    at Array.map (native)
    at TransactionDb.getStandardizedTx (/home/ubuntu/insight-api/lib/TransactionDb.js:505:21)
    at /home/ubuntu/insight-api/lib/HistoricSync.js:139:30
    at Array.map (native)
    at HistoricSync.getStandardizedBlock (/home/ubuntu/insight-api/lib/HistoricSync.js:138:20)
    at /home/ubuntu/insight-api/lib/HistoricSync.js:154:22
@matiu
Copy link
Collaborator

matiu commented Jun 1, 2014

Sorry, this a
Due to a already fixed problem on bitcore. Can you use the github version
of bitcore? Will update the package soon. You can continue the sync after
updating bitcore (run without -D)

On Sunday, June 1, 2014, thedawnrider notifications@github.com wrote:

I'm trying to sync the insight database for a testnet instance and the
sync process crashes at about 80% through.

I've tried util/sync.js -D and it always crashes at the same point in the
sync.

It seems like this is happening in a multisig transaction (from the
stacktrace below):
bitcore/lib/Address.js:122
Almost certainly this one

http://test.insight.is/tx/2c63aa814701cef5dbd4bbaddab3fea9117028f2434dddcdab8339141e9b14d1

I'm afraid that's as far as I could get debugging this issue.

The stack trace from the error is:

insight server listening on port 3001 in production mode
info: Resuming sync from block: 00000000a0dff26bb4a33874a8ddcbb06b4ab8fce787e6bd7319e05ede36ab55 #204625
info: Seeking file to:00000000a0dff26bb4a33874a8ddcbb06b4ab8fce787e6bd7319e05ede36ab55
Reading Blockfile /home/ubuntu/.bitcoin/testnet3/blocks/blk00003.dat [127 MB]
... [some p2p_sync messages] ...
FOUND Starting Block!
info: Got 204625 blocks in current DB, out of 258500 block at bitcoind
info: bitcoind dataDir configured...importing blocks from .dat files
info: First file index: 3
info: Starting from: 00000000a0dff26bb4a33874a8ddcbb06b4ab8fce787e6bd7319e05ede36ab55
info: status: [79.159%]

crypto.js:209
this._binding.update(data, encoding);
^
TypeError: Not a string or buffer
at Hash.update (crypto.js:209:17)
at exports.sha256 (/home/ubuntu/insight-api/node_modules/bitcore/util/util.js:14:49)
at Object.exports.sha256ripe160 (/home/ubuntu/insight-api/node_modules/bitcore/util/util.js:55:18)
at new Address.fromScriptPubKey (/home/ubuntu/insight-api/node_modules/bitcore/lib/Address.js:122:33)
at /home/ubuntu/insight-api/lib/TransactionDb.js:509:19
at Array.map (native)
at TransactionDb.getStandardizedTx (/home/ubuntu/insight-api/lib/TransactionDb.js:505:21)
at /home/ubuntu/insight-api/lib/HistoricSync.js:139:30
at Array.map (native)
at HistoricSync.getStandardizedBlock (/home/ubuntu/insight-api/lib/HistoricSync.js:138:20)
at /home/ubuntu/insight-api/lib/HistoricSync.js:154:22


Reply to this email directly or view it on GitHub
#110.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

@matiu
Copy link
Collaborator

matiu commented Jun 1, 2014

fixed on 3968327

@iancoleman
Copy link
Contributor Author

Thanks a lot, all good now, I'll close this issue.

jcvernaleo pushed a commit to decred/insight-api that referenced this issue Feb 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants