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.
...
7
votes
How the persistent database is saved on the blockchain
There are two separate concepts: the blockchain and the database. The blockchain is an immutable log of transactions, e.g. transfer 5.0000 EOS from usera to userb. The database holds mutable state ...
6
votes
Accepted
How to store contract state as singleton?
If there is only one instance to be created, I agree you should use a singleton for your case instead of a table directly, as this is what singletons are used for.
For API, you can check the eosio/...
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 ...
1
vote
Standards for handling private user-data in the persistence API?
When storing and accessing sensitive user-data, using the Multi-Index DB API, what considerations should be made to respect the user's privacy?
This is not doable as by the definition all data in a ...
1
vote
Standards for handling private user-data in the persistence API?
To run logic against data in a Smart Contract it's going to have to be in a visible state so achieving Privacy would fail.
I'd further question why sensitive or private data would go to chain in the ...
1
vote
How to store contract state as singleton?
Yes, as you're saying, it should simply be a single table with a single row that contains your data as a struct with the 3 fields.
You would need to define your struct and table as something like ...
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. ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
persistence-api × 5smart-contract × 2
multi-index × 2
c++ × 1
database × 1
persistence × 1
singleton × 1
standards × 1
anonymity × 1