10

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. This is why the RAM is one of the most valuable resources in the EOSIO blockchain and has it's own mechanism for reserving and pricing it. You should seek ways to ...


5

"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 application, such as a social media app, it can observe transactions and receive callbacks. You can either register a native plugin or you can poll eosiod. ...


3

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 type string which doesn't say anything about the type of storage used. Please follow the Data Persistence , Address-Book-Tutorial. It will also teach you the ...


3

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 structure you choose, you have to allocate RAM for it. Who will pay for the RAM is a separate question, you can have the users pay or you can pay for it. It really ...


3

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 in-memory database which means to be accessed by dapp. Note that EOS blocktime is 0.5 second so that executed time would be fast. It's permanently stored in ...


3

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 then query using mongo or something like pymongo. $ mongo ... connecting to: mongodb://127.0.0.1:27017 ... > use EOS switched to db EOS > show ...


3

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 address { uint64_t account_name; string first_name; string last_name; string street; string city; string ...


2

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 download the chain if they want, so hosting large data is not encouraged. Consequently, the costs for doing this are equally prohibitive. If you want to store ...


2

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 votes. If you're referring to a witness node for a specific dApp, then you wouldn't want a single point of failure. A serious dApp which relies on a witness ...


2

I think you can listen to the block with the issue event of eosio.token, only the issue action can update the supply.


2

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/


2

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 secondary index using player_id. You can search for the player's tickets by using both the player_id and the ticket id. The following links can help. https://...


2

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.


2

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 block producers will have enough physical memory to accomodate this (as they risk missing their block production windows otherwise). However, it will degrade ...


2

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 an API, and the options for storing data are limited to 5 options: --mongodb-store-blocks Enables storing blocks in mongodb. ...


1

There is no "Drive"-Ressource and no public blockchain is intended to store personal data like address, phone, email etc.


1

Other than the error of the duplicate key I would get a deadlock detected error, if I ever ran the demux after previously running it, or I would get current transaction is aborted, commands ignored until end of transaction block. I solved this issue, by commenting out the check functions in throwIfNotSetup() function in MigrationRunner.js (line 150 as of ...


1

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 based on a set frequency (say 2 times per block or 250ms). For the best reliability you would want to run your own node, but the next best thing would probably be ...


1

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

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 secondary_3; double secondary_4; long double secondary_5; In principle, you could encode your string as a eosio::name and store it in a uint64_t, but ...


1

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.eosbean.com/v1/chain/get_account --data '{"account_name":"eosbeaneosbp"}' If you really want to retrieve that data from mongodb, you could query the action_traces ...


1

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 previous history_plugin and history_api_plugin, and is for data access / analysis / reporting purpose only. It is more like a peripheral module attached to the ...


1

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 wipe the db, duplicate documents will be inserted.


1

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 { "version": "eosio::abi/1.0", ... } This should pass the check in abi_serializer.cpp: EOS_ASSERT(starts_with(abi.version, "eosio::abi/1."), ...


1

One hack is that use --dbpath armament,its the path provided externally.


1

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 explained in the comments below.


1

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, centralized (AWS, Google...) or decentralized (IPFS, Sia...) and store on blockchain only information where to find data and signature to guarantee it's ...


1

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.


1

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. White paper mentions "A blockchain maintains a log of all Actions and this log is ultimately stored and downloaded by all full nodes. With the log of Actions, it is ...


1

The OCI video shows exactly how to do select and update queries using the eosio::multi_index: https://youtu.be/E3Tx2DseLGE?t=48m39s


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