0

Is there a way to give access of an external storage mechanism only to a smart contract? So that only the smart contract can upload files

Lay González
  • 193
  • 1
  • 6

2 Answers2

1

Found this discussion: look at Rockchain.org since it is creating a decentralized file system, identifying nodes as ethereum addresses, and the access conntrol policy are on the ethereum blockchain (if you didn't find any other solutions already)

Alpha Dino
  • 11
  • 2
1

Smart contract can not access an external environment or other's contract storage. However if you want to interact with the external world you should use an Oracle service like Oraclize.it

Badr Bellaj
  • 18,780
  • 4
  • 58
  • 75
  • 1
    You could think of the question as: "Is there a way to give access of an external storage mechanism only to a smart contract through oraclize.it?" Furthermore, I'm only interested in pushing data to the storage, not reading it. – Lay González Nov 04 '16 at 20:09
  • could you give me a more elaborated example of external storage and what do you mean by Only (is it an access control)? – Badr Bellaj Nov 04 '16 at 20:11
  • Think of storj.io but that uploading can be done only by identifying "yourself" as an ethereum account (through their private key probably). storj.io gives you decentralized storage, so it would go well with the blockchain's properties. – Lay González Nov 04 '16 at 20:15
  • identification could be done on the storage side based on the ethereum smart contract address. you could define an access control policy based on the address which is issued form a pubkey. Or you could setup a token-based system which allow access only if the token is valid – Badr Bellaj Nov 04 '16 at 20:19
  • Yeah, that's what I'm looking, but also I'm looking for a decentralized solution, so that I can assure everybody that no manipulation is possible. That's why I referenced storj.io Or, are you implying that it could be done with storj.io, somebody said that it could be done on top of storj.io: http://docs.storj.io/v1.0/discuss/5819272731a42219002c78e8 – Lay González Nov 04 '16 at 20:23
  • but while you are using an oracle you break this decentralization isn't it? – Badr Bellaj Nov 04 '16 at 20:25
  • The oracle would only be the medium to communicate with storj.io... and they claim that you can trust them because "There is no need to open additional trustlines as our good behaviour is enforced by cryptographic proofs." – Lay González Nov 04 '16 at 20:26