Sort:  

HAF writes blocks straight into PostgreSQL. You have complex data as the blockchain is working with blocks full of transactions and operations; you process them with HAF and PostgreSQL, and then you can define what you want from there and expose it as an API.

I'm just devrel versus a wizard, but a simple overview of how HAF works:

  • hived runs the sql_serializer plugin. As each block is processed, the plugin pushes its transactions, operations and virtual operations into PostgreSQL.
    The plugin also reports irreversible blocks and micro-fork reverts. HAF’s hive_fork_manager then rewinds app tables as needed.
  • HAF apps such as account history, Hivemind and the trackers read from that database. They don’t normally read from hived.
  • block_log is an optional way to fill the node. You can replay a trusted copy, which is faster, or sync from the P2P network.

That's interesting. I feel like there was a service like HIVE SQL to let people run queries which leaves me scratching my head because I always thought that was because the blocks were stored in MongoDB and the service was to allow queries in SQL since MongoDB is a NoSQL setup but now im finding out it was always PostgreSQL the whole time. Now im going to go down a deeper rabbit 🐇 hole 🕳 🤪

Maybe you're thinking of MIRA and Rocksdb? Mira went away in HF25 though, it was an adapter to update the backend from memory mapped files

Possibly , seems EOS and Telos went away from MongoDB a long time ago. I have a lot of various chain information all jumbled in my head.

MongoDB

MongoDB has never been used as any part of the core layer of Hive. It's Hive-Engine (the layer two) that uses it as their DB that stores everything.

I didn't realize that because i never rane a Hive node. EOS and DTube used MongoDB and I always thought HIVE did as well.