bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

Trying to sync node but Mongo collections still empty.

Open danesposi opened this issue 10 months ago • 2 comments

I'm running my own bitcoin node on my local machine, already built bitcore, started a MongoDB container with the correct port mapping and connected bitcore to my local node via bitcore.config.json.

The logs don't seem to show any error, but after a long time of syncing I try to query the MongoDB collections and get an empty array. Also, I get no data from any block.

MongoDB version: 8.0.8. Node version: 23.11.0.

The only syncing logs I get:

info :: 2025-04-16T17:30:51.124Z :: This worker is now the syncing node for BTC mainnet info :: 2025-04-16T17:30:51.161Z :: 2025-04-16 12:30:51.161 GMT-5 | Syncing 2000 blocks | Chain: BTC | Network: mainnet

I also get the following warning:

(node:19058) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Use node --trace-warnings ...to show where the warning was created) (node:19061) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ...to show where the warning was created) (node:19062) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ...to show where the warning was created) (node:19065) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ...to show where the warning was created) (node:19056) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ...to show where the warning was created) (node:19064) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ...to show where the warning was created) (node:19057) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ...to show where the warning was created) (node:19060) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Usenode --trace-warnings ... to show where the warning was created) (node:19063) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

I greatly appreciate any help.

Thanks in advance.

danesposi avatar Apr 16 '25 17:04 danesposi

I got the same issue

Lulzphantom avatar Apr 17 '25 22:04 Lulzphantom

The warning is happening because bitcore uses an old configuration for Node.js Mongo driver. we need to include useUnifiedTopology option in the Mongo client. I have done this but this introduces some additional errors which might take some time to fix.

LakunleD avatar Jun 08 '25 05:06 LakunleD