0

I want to record certain events on chain, so there is later no dispute that party X indeed logged events E1, E2 etc at times T1, T2 etc. Most of these events will essentially be hashes of certain off-chain content.

Examples:

  • Poet X just completed his grand cyber poem No. 12, and wants to record that without publishing the poem yet. (So the payload is the hash of the poem text file)
  • Company X has just adopted a new privacy policy, and wants to record that.

Things like that.

I could create a smart contract that has a mapping from content hash to key, or maybe from content hash to a struct of key and timestamp. The downside seems to be that this smart contract would ever only grow in size, and become unaffordable sooner or later.

Is there some better way of doing this? Maybe only temporarily putting the entry into the mapping, and for efficiently keeping a "browsing index" off-chain?

1 Answer 1

1

it will grow in size, but the price of storing more data is relative to gas price not the amount of data. it could be 8000 gwei for gas and no entries, making it very costly, or 2 gwei and a million entries. of course it's best to avoid cluttering the blockchain, so deleting entries or redesigning or possibly storing information off-chain is recommended.

Your Answer

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

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