3 votes
Accepted

What is the ChainBase database used for?

1.What is chainbase used for? we can find the answer in : about chainbase 2.when we add a new object (i.e., row) to the table by Multi-Index such as class addressbook: contract { struct ...
  • 163
3 votes

When to use RocksDB compared to Chainbase?

RocksDB intended use is to perform better than Chainbase with data sets that have larger (64KiB+) data associated with the average row in the database and data access patterns that favor fewer highly ...
3 votes

Where is the fork database?

The still reversible blocks are stored in blocks/reversible. The reversible state is kept in RAM, and keeps track of inserts, deletes, and updates in their undo / redo forms, so they can be applied ...
  • 550
2 votes

Can we use mongodb store state?

Well, it depends. But you've already got the right path to reduce RAM usage. The first thing is whether the user state you mention is intend to be stored on the blockchain or not, fully or partly? ...
  • 174
1 vote
Accepted

Nodeos replaying from snapshot and what it means for the full transaction history

The chain state is correct since every block is built on the previous block. However, you don't have the transactions prior to block 3 so you can't figure out when/how the state was changed. But the ...
1 vote

chainbase::database error

I found the solution. The reference code is followed by boost manual. (https://www.boost.org/doc/libs/1_73_0/libs/multi_index/example/ip_allocator.cpp) Boost.MultiIndex supports special allocators ...
1 vote

Why I didn't initialize database?

Add struct by_keyBox; before using declaration: struct by_keyBox; using setw_multi_index = chainbase::shared_multi_index_container< s_object, indexed_by< ordered_unique&...
  • 2,280
1 vote
Accepted

How is memory aligned in the EOSIO smart contract consensus memory?

Yes, you will save 6 bytes per record if you go with the first solution compared to the second one. Records are stored in the chainbase and each record consumes the amount of memory used for the ...
  • 1,909
1 vote

How to read data at certain block number on EOS?

Reading a table at a certain block number isn't so easy since a block only records change in state, not the full state. I think your best way forward is learning to use dfuse: https://www.dfuse.io
1 vote

What is mongodb_plugin used for?

chain_plugin is actually the core part that manages the blockchain data structure in nodeos. Most of time it is enabled automatically. mongo_db_plugin is an add-on plugin that aims to replace the ...
  • 475
1 vote

Can the contract data not exist in the chainbase but in an external system such as MongoDB, MySQL

Yes, you can save parts of the data you need in MongoDB or MySQL. The library to enable that is called demux-js. There is a template and demo explaining how to use that library here. One important ...
  • 1,686

Only top scored, non community-wiki answers of a minimum length are eligible