Skip to main content
Share Your Experience: Take the 2024 Developer Survey
3 votes

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 ...
fen chen's user avatar
  • 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 ...
Sergey Metelin's user avatar
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 ...
abourget's user avatar
  • 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? ...
twksos's user avatar
  • 174
1 vote

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 ...
Matthew Darwin's user avatar
1 vote

chainbase::database error

I found the solution. The reference code is followed by boost manual. ( Boost.MultiIndex supports special allocators ...
iambaeba1's user avatar
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&...
conr2d's user avatar
  • 2,320
1 vote

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 ...
cmadh's user avatar
  • 1,929
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:
bitgenstein's user avatar
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 ...
Tong Shen's user avatar
  • 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 ...
Ami Heines's user avatar
  • 1,686

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