3

I know Ethereum uses leveldb. When I checked into EOS I could not find that much out. I thought when I tested I did see leveldb.

Can someone confirm how the immutable data is stored?

EDIT

I think people may be misreading my question.

In Ethereum, LevelDB is used to store all the blocks as they are built. This therefore provides a history. If I want to know what were the older values of a variable, I could check in LevelDB.

It seems people have misread my query to be what dbs are supported by EOS?

EOS must be storing data somewhere which would be then open to queries. Hence someone can find out how a variable changed. Otherwise they will just see a variable value. The whole point - in my view - of using a blockchain is that we can see the old values. This is a sort of audit.

Therefore, my question is how would I query a db in EOS to get the old values of the state variables?

0

As the writing of this, EOS supports MongoDB out of the box. Storage is pluggable, so one could add LevelDB if needed.

Why doesn't EOS use other database?

Will EOS Storage support only mongoDB or even mySQL, postgreSQL, Redis etc.?

  • 1
    I will amend the question. I think people have misread it. – Trevor Lee Oakley Oct 15 '18 at 6:30
0

If you are asking how eos store data, contract data stored in ram as multiindex table , EOS USE BOOST MULTIINDEX .this is how you query on data . follow this article

david-grs.github.io/why_boost_multi_index_container-part1

  • My query is only how to confirm history, when I tested in ethereum there is a lot of chaindata which has all the blocks. As state changes we cannot see from the contract the history. I read your multiindex link. I cannot really see from that the underlying datastore. Here is a link about ethereum and leveldb - medium.com/cybermiles/… - see the chaindata directory. – Trevor Lee Oakley Oct 17 '18 at 9:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.