Data storage proxy smart contract

alfacoder

Member
Сообщения
58
Реакции
11
Data storage proxy smart contract is an infrastructural contract that allows secure storage of data, versatile access capabilities and an interesting security model. It has lots of possible applications and great extendability. Some example applications include programmatic infrastructural storage, message templating service, arbitrary data server (such as hash tables, PKI trees or domain lists) and (with tiny improvement) hybrid DNS contract.

Data is stored into separate boxes with many features for each one


Box ownership control: each box can have its own owner
  • An owner can be a person (wallet) or some complex smart contract
  • Complex smart contract can programmatically change box contents
  • Box can even be protected from contract owner, if neccessary
  • If box is not protected contract owner can manipulate it too
Programmatic access control with different options
  • Data can be accessed manually with a free getter method by some client
  • Inside the blockchain data can be returned as a response to specific message
  • Last, but not least, data can be injected into a proxied (forwarded) message
  • Each of those options can be allowed or forbidden per each specific box
It is possible to willingly protect the box from contract owner
  • This provides some safety guarantees and autonomy for the box owner
  • Contract owner would not be able to impair box options or alter contents
  • It is possible to forcefully unlock the box if its owner disappears for long time
Box can be frozen to prevent any accidental modification
  • It is not possible to do absolutely anything with box when it is frozen
  • The only allowed operation is explicitly thawing the box
  • This action is similar to chattr +i in linux world.
Box can have some quota restrictions (cells and bits)
  • This prevents box users from inadequately using contract resources
  • When box is protected decreasing limits is not possible
  • The limit affects any future changes but not current data of the box
Good code base and extensibility
  • The code is well written and can be easily read and extended
  • Extending the code can provide more features, for example
  • Adding a dnsresolve function will turn this into hybrid DNS resolver


Video



Github: https://github.com/Skydev0h/ton-freestyle/blob/master/doc/Project2.md
Website: https://skydev0h.github.io/ton-freestyle-2/dspsc.html
 
Сверху