1

I want to create my own private Eos chain for my own specific use case which is very RAM hungry. Imagine that I have a network of nodes having, for example, 32GB of ram. But I have two contracts with very long arrays, each having 20GB. Are both contracts in the memory so nodes needs to have 2*20GB of memory? Or how this works? Thanks, T

0

Each node has a complete copy of the RAM of the blockchain. You need enough RAM on all nodes to keep the data there.

If you're starting a private chain, you don't need 21 nodes. Your chain can have less nodes.

Are you sure you need all this data in RAM? Have you looked into demux? This might allow you to keep parts of the data in a regular database while still being recorded on chain.

| improve this answer | |
  • My use case is visual search engine. I am storing ipfs hashes (32 chars) in contract ( one contract storing all data in one long array) , so I can load one by one and make the index from it. If I would have 1B pictures to retrive, it will need 32GB for data. Do you see some easy way how not to store everything in the RAM? I will take a look at the demux for sure. Thanks! – Tomas Batrla Jan 31 '19 at 16:47
  • Why do you think you need to store the ipfs hashes in RAM? I'm not sure I understand the use case. But if you do need that amount of data in RAM, go ahead and build this using a private chain. Good luck! – Ami Heines Jan 31 '19 at 19:29
  • I can try to explain the case little more ... I need to store huge amount of data in some data structure, in my case, array or list. The data entry looks like this ["QmQm2oM4dpo4p93mfBDuNCknk9EBz56e7jSSAoC8aZ49v7", "QmX2Gh5cY9bKduMmUtjA9DT2JtChhkKFDS7wQwT2ufY7H7"] . I need to store a few million, later even billion of such entries. Then clients would connect to the node and download all entries one by one to build a searchable index. – Tomas Batrla Jan 31 '19 at 21:50
  • I thought that the whole array needs to be in the ram to be able to serve clients all data they need. I could split it to many contracts with smaller arrays but overall, the amount of stored data will be the same. Is it possible for nodes to not have all contracts in ram and download them from hdd in case they need it? – Tomas Batrla Jan 31 '19 at 21:50
  • Why do you need this type of data in a blockchain contract? – Ami Heines Feb 1 '19 at 4:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.