1

I have someone who wants to put strings onto a private blockchain. He thinks it will be safe for his data. So the idea is to store names and addresses etc on the blockchain (private).

I did some testing and hit a lot of gas limits.

Is there a way to effectively store strings in volume onto a private blockchain and to avoid gas limits?

This is really a design question not a strict cost of storage one.

Edit -

Various people stated this is a duplicate but I already tested now and one aspect is mining time lengthens with a high gas limit. So that is a factor. It is not simply about cost. It is also about usability.

4
  • Massive duplication. But document stores also duplicate data, eg Mongo Commented Mar 31, 2018 at 16:23
  • How much are you trying to store at once? Commented Mar 31, 2018 at 16:25
  • Just test now. He wants to upload Excel spreadsheets. One row has about 10-15 strings. We can use one JSON object for the whole row. Commented Mar 31, 2018 at 16:27
  • I checked the dup question and there is no mention at all about mining time. I did testing and mining is slow with a high limit. Commented Apr 1, 2018 at 5:17

1 Answer 1

0

If it's a private blockchain then you can store as much as your nodes can handle. You can raise your network's gas limit as far as you need to. See the answers linked in the comments for how to calculate how much gas you'll need; If you only need 5x or 10x the gas limit of the current mainnet then this may well be practical. If you need several orders of magnitude more then it may become difficult to provision enough hardware, and you risk being the first person to run into interesting bugs in your node implementation that only show up under very heavy load.

If your blockchain doesn't need to do calculations on the data then a more conventional approach would be to store the strings in IPFS, and just put their hashes on the blockchain. But this does bring some extra complexity, particularly since IPFS doesn't guarantee that anyone has actually kept a copy of the documents you store in it, so you may need to do extra work to ensure that it's actually available.

3
  • I checked the dup question and there is no mention at all about mining time. I did testing and mining is slow with a high limit. Commented Apr 1, 2018 at 5:17
  • If your nodes are fast enough and well enough connected it should make no difference to the time between blocks. Commented Apr 1, 2018 at 9:40
  • I found the mining speed was slow with a high gas limit. Commented Apr 1, 2018 at 10:26

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