0

I'm curious where to save big data. I don't want to save it in my private db and not in ipfs. I want it to be visible on blockchain. So It's visible on blockchain etherscan If I'd go to store data in logs.

Question 1) Is it the best solution to store huge data in logs ? I don't want somewhere else. it must be visible on blockchain

Question 2) Why would I choose eos smart contract to ethereum's smart contract? I know it's free. but still it has stake, and what if after some time i unstaked it and eos's value went to 0.5$ when I bought it for 5$ each. Then I still lost and it was not free at all

Question 3) do eos logs work the way ethereum's logs work? can I filter them while getting them? or search some kind of data in logs? in ethereum it's easy.

Thank you.

1

The key question here is how much gas you'll be paying to store your data. Searching that would point you to another StackOverflow question, What's cheaper — contract storage | log data | transaction input?, which would tell you that the cheapest option is to put it in event logs. Note that other smart contracts can't access event logs, so we're assuming you only want this data for humans inspecting the chain. In that case, your cost would be:

  • 375 gas for LOG call
  • 375 * 4 = 1500 gas for including four 32-byte topics
  • 8 * (number of bytes) for additional data

This comes out to much less than 20,000 gas per 32 bytes in smart contract storage, but still gets pricey. Your real constraints are how much Ethereum you have and fitting your log into the gas limit. Given a block gas limit of ~8M, your log would max out at

8M gas in transaction / 8 gas per byte = 1MB per block

You would also be filling entire blocks yourself, so you would likely need to pay serious transaction fees. All so that you could save data 1MB at a time.

It might be worth reconsidering blockchain for your usecase, or maybe considering storing some function of the data (like a validation hash), rather than directly storing big data. Blockchain just isn't built for big data applications.

Not an expert on EOS, you'll have to do your own research through their docs/source to see if they changed any of those implementation details.

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.