bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

Database is empty

Open ASHKARAN opened this issue 2 years ago • 6 comments

I'm running bitcore on bitcoin mainnet and testnet why my database collections are empty? when bitcore store it's data in database? My nodes are syncing, could it cause any issues?

ASHKARAN avatar Feb 06 '23 13:02 ASHKARAN

Bitcore will only be able to begin syncing once your mainnet and testnet nodes are done syncing.

escottalexander avatar Feb 06 '23 13:02 escottalexander

I waited for my node to be completely sync, but still my database is empty latest block based on blockchain.info is https://blockchain.info/q/getblockcount 775414 I see the same block number in my mainnet node (latest node log) 2023-02-07T09:22:40Z New outbound peer connected: version: 70015, blocks=775414, peer=438 (outbound-full-relay) but when i call http://127.0.0.1:3000/api/BTC/mainnet/block/tip it returns null and still my database is empty

ASHKARAN avatar Feb 07 '23 09:02 ASHKARAN

Now that your Bitcoin node is finished syncing has Bitcore-node finished syncing? The logs should say $TIMESTAMP | Sync completed | Chain: BTC | Network: mainnet If it is still syncing it will have a similar message but with Syncing... instead of Sync completed.

escottalexander avatar Feb 07 '23 14:02 escottalexander

yes according to the bitcore logs it's synced

{"peer":"127.0.0.1:8342","chain":"BTC","network":"mainnet","count":0,"level":"warn","message":"peerheaders message received"}
{"message":"2023-02-07 17:18:22.697 GMT+3 | Sync completed | Chain: BTC | Network: mainnet","level":"info"}

but my database is empty

ASHKARAN avatar Feb 07 '23 14:02 ASHKARAN

When a new block is mined do you see that Bitcore recognizes it and shows the Syncing... message? I am trying to rule out a connection issue.

escottalexander avatar Feb 07 '23 14:02 escottalexander

here is my bitcoin testnet logs

2023-02-07T14:30:03Z UpdateTip: new best=000000000000ac451feaf2e602b38aebea696fda7603a89e253b3fa33b393d56 height=2419204 version=0x20002004 log2_work=75.148202 tx=64876068 date='2023-02-07T14:29:49Z' progress=1.000000 cache=421.7MiB(3023754txo)
2023-02-07T14:33:53Z UpdateTip: new best=00000000000000250ebfb7626825dc3d240cc47520ef2003aa90b4734bfd6917 height=2419205 version=0x20000000 log2_work=75.148216 tx=64876111 date='2023-02-07T14:33:03Z' progress=1.000000 cache=421.7MiB(3023782txo)
2023-02-07T14:52:11Z UpdateTip: new best=000000000000001b6de5418012cfb45d7ae63d168b3e71d643bbb343d999e7cb height=2419206 version=0x203a6000 log2_work=75.148230 tx=64876213 date='2023-02-07T14:51:55Z' progress=1.000000 cache=421.7MiB(3023851txo)

as you can see i just received block 2419206 but bitcore logs does not show anything

{"message":"2023-02-07 17:48:16.360 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:48:50.777 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}
{"message":"2023-02-07 17:49:20.808 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:49:55.779 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}
{"message":"2023-02-07 17:50:25.809 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:51:00.779 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}
{"message":"2023-02-07 17:51:30.808 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:52:05.780 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}
{"message":"2023-02-07 17:52:35.808 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:53:10.781 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}
{"message":"2023-02-07 17:53:40.808 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:54:15.782 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}
{"message":"2023-02-07 17:54:15.784 GMT+3 | Not connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"warn"}
{"message":"2023-02-07 17:54:50.785 GMT+3 | Connected to peer: 127.0.0.1:8332  | Chain: BTC | Network: testnet","level":"info"}

my bitcoin node is working with this configurations

printtoconsole=1
testnet=1
txindex=1
listen=1
server=1
dnsseed=0
upnp=0
rpcallowip=0.0.0.0/0
rpcuser=xxxxx
rpcpassword=xxxxx

fallbackfee=0.0002

zmqpubhashtx=tpc://*:38330
zmqpubhashblock=tpc://*:38331
zmqpubrawblock=tpc://*:38332
zmqpubrawtx=tpc://*:38333
zmqpubsequence=tpc://*:38334

[test]
port=8332
rpcport=8333
rpcbind=0.0.0.0
 

addnode=testnet-node.bitcoin.com:18333
addnode=btc.petertodd.org:18333
addnode=testnet.hsmiths.com:18333
addnode=tn.not.fyi:18333
addnode=testnet-seed.bluematt.me:18333

any suggestions?

ASHKARAN avatar Feb 07 '23 14:02 ASHKARAN