Skip to main content
10 votes
Accepted

Are Tables/DBs stored in RAM and held by multiple block producers?

EOSIO keeps the state in RAM. All the data for the contracts and transactions are held in RAM. All block producers (BP) process the transactions and keep an updated state of the database in RAM. ...
Ami Heines's user avatar
  • 1,686
5 votes

Can a smart contract communicate externally?

"Smart contracts can only read data that is part of the transaction or stored in blockchain state. To pass external data into a contract it will need to be sent via an oracle. If you have an external ...
kkurian's user avatar
  • 695
3 votes

Why use databases in smart contract?

The Database is just a data structure which resides in RAM. You don't have to use it but it has many convenient methods. It is not a standard relational database like MySQL. No matter the data ...
Ami Heines's user avatar
  • 1,686
3 votes

SQL-like database in contract?

EOS is first and foremost blockchain system that supports Database to share data among users. However there are some notes that may change your mind of thinking how that database looks like. This is ...
congnghebitcoin.com's user avatar
3 votes
Accepted

How can I download all ledger blocks as a JSON dump?

The best way I found to download the ledger in a structured format is to use eosio::mongo_db_plugin on latest EOSIO release, run $ nodeos --mongo-uri mongodb://127.0.0.1:27017 --replay-blockchain, and ...
confused00's user avatar
  • 5,554
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 ...
fen chen's user avatar
  • 163
3 votes
Accepted

Storing database information into EOS

Don't store personal information like email-addresses or phone-numbers on a public blockchain !!! The memo-field itself has nothing to do with the type of storage as it's just an action-parameter of ...
cmadh's user avatar
  • 1,929
2 votes

EOS smart contracts and big data

Same situation as in other blockchains: large data should not be stored on the blockchain. Keep in mind that besides block producers, all validation nodes / non-producing full nodes have to be able ...
confused00's user avatar
  • 5,554
2 votes

Why doesn't EOS use other database?

The reason is performance. Reading and writing from RAM is orders of magnitude faster than from disk. If a clock producer node is down, it will be replaced by another block producer according to the ...
Ami Heines's user avatar
  • 1,686
2 votes
Accepted

How to retrieve historical EOS supply?

I think you can listen to the block with the issue event of eosio.token, only the issue action can update the supply.
Jimmy Guo's user avatar
  • 1,066
2 votes

One-to-many relationship in Multi Index Tables

The link below will be really helpful. There are many concepts and relationships between them. https://trybe.one/the-ultimate-end-to-end-eos-dapp-tutorial-part-2/
smarteasy's user avatar
  • 1,015
2 votes

One-to-many relationship in Multi Index Tables

Even if you do not directly support one-to-many, you can set up multiple indexes to: Create a separate player, ticket struct. These become tables. Place a player_id in the ticket and create a ...
smarteasy's user avatar
  • 1,015
2 votes

SQL-like database in contract?

Contracts can't call out to SQL servers or any other server. They can use table storage through multi_index, but it's direct access with no SQL interpreter.
Todd Fleming's user avatar
  • 2,005
2 votes

Are Tables/DBs stored in RAM and held by multiple block producers?

EOS.IO stores indexed state in a custom-written database engine called Chainbase. This database is optimised for high performance when the entire database fits into memory, and it's expected that ...
user1495's user avatar
  • 195
2 votes
Accepted

Can I use MongoDB for storing data locally instead of storing in RAM?

The Mongo_DB_plugin can be configured to listen to actions on chain from a locally hosted node. This can be resource intensive in processing large blocks, you don't have the option to listen through ...
Nat's user avatar
  • 3,425
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

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

What is the most reliable way to sync contact account tables?

You could use the demux-js library to listen to contract actions that affect the table. Demux allows you to integrate with your DB of choice. You establish an API endpoint and demux will ping it ...
Nat's user avatar
  • 3,425
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
bitgenstein's user avatar
1 vote

How do I create a Multi-Index DB secondary index from a String?

As of eosio.cdt v1.5.0, you can not make a secondary index from a string. The types of secondary indices allowed are: uint64_t secondary_1; uint128_t secondary_2; checksum256 ...
Phillip Hamnett - EOS42's user avatar
1 vote
Accepted

How to get/query creation time of account in mongodb?? (inserted data with monogo_db_plugin)

Currently there is no such data in the mongodb directly. You could use the RPC API, which is POST v1/chain/get_account with account_name field. Like this: curl --request POST --url https://api....
Tong Shen's user avatar
  • 475
1 vote

Which BP's offer snapshots for v1.4? --mongodb-wipe?

The EOS Node Tools website provides daily block archives. It works with eosio v1.4.1. https://eosnode.tools/blocks As far as I tested, --mongodb-wipe is not required but recommended. If you did not ...
Tong Shen's user avatar
  • 475
1 vote

eosforumdapp mongodb : unsupported_abi_version_exception: ABI has an unsupported version

Perhaps when you were synching, at that moment in time, eosforumrcpp had an invalid ABI version? Right now, it seems like their versioning is fine: $ cleos get abi eosforumrcpp { ...
confused00's user avatar
  • 5,554
1 vote

Is LevelDB used in EOS?

The way to store block data in EOS is different from that of Ethereum. Ethereum uses Merkle Patricia Trie (MPT) to store all states (balances), and keeps its root hash in block header. When a change ...
conr2d's user avatar
  • 2,320
1 vote

Is LevelDB used in EOS?

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 ...
Mikko Ohtamaa's user avatar
1 vote

Where is the mongodb stored?

One hack is that use --dbpath armament,its the path provided externally.
YashwanthKambala's user avatar
1 vote
Accepted

Where is the mongodb stored?

MongoDB is typically stored at /data/db. If it's not there, check out this question, this question, etc. for advice on finding the location. edit: The database was found at /var/lib/mongodb as ...
sfmiller940's user avatar
1 vote

EOS smart contracts and big data

Storing data on blockchain is extremely expensive. It is also problem for network (data transfer) and other users (storage). Instead you should consider storing data in one of dedicated solutions, ...
Lucjan Żeńczuk's user avatar
1 vote

How do you stream data from an input file when writing contracts on EOS?

This is decentralized application so generally you can't push/pull outside data to/from it. That's also the reason why Oracle service is there to responsible for it.
congnghebitcoin.com's user avatar
1 vote

Are Tables/DBs stored in RAM and held by multiple block producers?

multi-index table data is constructed by actions (like insert row, update row value) and BP has all action logs. Also, all current state is stored in RAM. probably. Yes, by replaying action logs. ...
eval's user avatar
  • 236

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