1

The task.

Develop distributed registry on blockchain network that can store public data of the certain objects.

For example:

{
  "id": 123456789012345,
  "title": "Big black box (not more than 100 characters)",
  "description": "not more than 255 characters",
  "serial_number": "SN4567RT12",
  "type": 4,
  "size": 50,
  "date_of_manufacture": 1531230018,
  "owner_local_id": 99856
}

Information could be supplemented in future by data like this:

{
  "id": 123456789012345,
  "arrived_to": "not more than 255 characters",
  "date": 1531230018
}

Initial data and next additionals should formulate common object profile with history of all actions.

Adding new object or supplementing existed object must cost some fee.

I have private network with Clique PoA on few VPS. I write data into inputData transaction field in JSON. For searching i wrote indexer that collect data from transaction to local mysql db.

Is this normal or there are better ways storing data and manipulate it?

How i can set fee for adding new object, by smart-contract or integrate into transaction algorithm?

Estimation of quantity of objects in production is about 10-50M per year

1 Answer 1

1

I feel that using the Blockchain to store such huge amounts of data doesn't really make sense. The cost would be prohibitively expensive! Plus the blockchain isn't really meant to be used like a database.

Hence it might be better to use IPFS/Swarm to store the data, and add the IPFS hash to the smart contract as a record-keeper.

Here's a great guide to help you understand how to leverage IPFS to amplify the power of the blockchain for storage.

3
  • Just FYI, Maximum payload a transaction can have is 32KB
    – Subhod I
    Jul 10, 2018 at 16:19
  • 2
    Thanks for your answer! I thought about use IPFS for storage but if use single file for each object eventually we will have huge amount of small files, which must be indexed for searching by parameters. I think it can be problem in future, right? May be it make sense to use OrbitDB which buil on IPFS or something looks like? What do you think? Very important not only store data but also have possibility for using that data.
    – Mukomol
    Jul 11, 2018 at 12:04
  • Yes, OrbitDB does look promising. But I haven't used it yet. :) Jul 11, 2018 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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