Bitcoin blockchain in mongodb

0

How bad would it be to use MongoDB as a Bitcoin database instead of LevelDB? I know that LevelDB is faster but I've also read that MongoDB is better for doing queries.

It seems cleaner to store the information in JSON. And also easier to query.

Any reason why LevelDB was chosen?

Vladislav Zhdanov

Posted 2018-01-25T19:10:25.057

Reputation: 45

Answers

1

On the subject of why LevelDB is used, core developer Greg Maxwell stated the following to the ref:

I think people are falling into a trap of thinking "It's a <database>, I know a <black box> for that!"; but the application and needs are very specialized here. . . It just so happens that on the back of the very bitcoin specific cryptographic consensus algorithim there was a slot where a pre-existing high performance key-value store fit; and so we're using one and saving ourselves some effort...

Зелёный

Posted 2018-01-25T19:10:25.057

Reputation: 871