Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Samybutor on January 11, 2020, 02:15:16 PM



Title: Beginner questions about Smart Contracts (saving the hash)
Post by: Samybutor on January 11, 2020, 02:15:16 PM
Hello everyone,

I am new here and to Blockchain technology, so I have some tricky questions for you :).

If I want to save data, for example transactions between two, on the Blockchain.

1.  Is it possible to save only the hash on the blockchain and the rest on a cloud?
2. If I save the hash of the data on the Blockchain, is the data still as save as saving all the data on the Blockchain?
3. What else than saving storage is the difference between saving only the hash and saving all the data on the Blockchain?

I also got some questions concerning smart contracts. For the case that I want a fully automated documentation of transactions between two.

4. Is it possible to create the smart contract on a cloud and save the hash on the blockchain?
5. Does this have any disadvantage? Will the transactions still be recorded as save as on the blockchain?


I would be very glad, if you could answer my questions :)

Best
Samy


Title: Re: Beginner questions about Smart Contracts (saving the hash)
Post by: Abdussamad on January 12, 2020, 07:51:41 AM
you can't do complicated smart contracts with bitcoin. it's not ethereum. it's rather limited. this may change in the future with taproot.

if you want to timestamp documents then there's an efficient solution for that:

https://opentimestamps.org/


Title: Re: Beginner questions about Smart Contracts (saving the hash)
Post by: Abdussamad on January 13, 2020, 04:12:44 AM
It's possible as long as you don't use Bitcoin blockchain. But in this case, you might want to use IPFS protocol instead.

you can't do complicated smart contracts with bitcoin. it's not ethereum. it's rather limited. this may change in the future with taproot.

Taproot focuses to enhance privacy and reduce script size. I never hear about adding more complex Opcodes altogether with taproot deployment, CMIIW.

It lets you add more branches to your contract without it taking up a lot of blockchain space. So in that sense it allows you to make more complex scripts.


Title: Re: Beginner questions about Smart Contracts (saving the hash)
Post by: HeRetiK on January 14, 2020, 09:09:07 AM
1.  Is it possible to save only the hash on the blockchain and the rest on a cloud?

Yes, see opentimestamps.org as posted by Abdussamad for an example of how this can work.


2. If I save the hash of the data on the Blockchain, is the data still as save as saving all the data on the Blockchain?

Assuming you have been using a secure hashing algorithm to create a hash of the data, you have reasonable proof that the data you stored off-chain has not been modified.

However the data itself is only as save as your off-chain storage (ie. if the server or cloud service goes down that hosts the data, the data disappears as well).


3. What else than saving storage is the difference between saving only the hash and saving all the data on the Blockchain?

See above.