What is stored where? Regarding IPFS, Databases, MongoDB

teeattackteeattack Posts: 2 Brand New

Hello together,

I got the following questions regarding memory and storage:

1) I am running a node. I am not a block producer. What is stored in my filesystem and what kind of database or system is used?

2) When I compile a smart contract and push it, is the code stored in a transaction and therefore in a block?

3) When I use a database or table inside my contract, is it stored in RAM of a block producer? Where does the database go when this producer shuts down?

4) Where are accounts stored?

5) How does IPFS come into play? What is stored there? Where is the mongoDB and what is inside?

Hopefully this questions are easy to understand. Could you also provide a resource of your answer (some post or documentation page).

Thanks
Max

Answers

  • tbflemingtbfleming Posts: 12 Jr. Member - 1/5 EOS Tokens
    edited April 23

    1: the blocks database, the shared_mem database, plus other options if you need them (e.g. wallet, MongoDB)

    2: Yes, plus the shared_mem database until the contract is replaced

    3: Yes. The ram database is a memory-maped file named shared_mem/shared_memory.*. All block producers have everything in this database.

    4: shared_mem

    5: IPFS won't be in the June release. I don't use the mongoDB, and haven't looked what's in it

  • teeattackteeattack Posts: 2 Brand New

    Thanks a lot!

    Regarding point 3) What happens to the in-memory db, if a block producer shuts down or gets voted out? Will the new node taking its place reconstruct the in-memory db based on the transactions?

  • tbflemingtbfleming Posts: 12 Jr. Member - 1/5 EOS Tokens

    Short term: every full node constructs it by replaying the chain. Full nodes can become producers. Long term: I don't know.

Sign In or Register to comment.