Are TCP sockets necessary for contracts ?

TechnologovTechnologov Member Posts: 102 ✭✭
Today, AFAIK, contracts do not support TCP sockets, which is a problem in my opinion.

Assume you want to create a contract that uses Bitstamp BTC price as input data.
No way to update live data from (for example) Bitstamp.
Sure, someone could create a "Bitstamp data" contract, but he/she will be under no obligation and no interest to timely update it. (esp. because it costs fees to do so)

I wanna discuss if raw TCP (and UDP) sockets is really a must-have, or not, what do you think ?

Comments

  • chris613chris613 Member Posts: 93 ✭✭
    Not a must-have. The techinical hurdles are innumerable and in some cases might be theoretically insurmountable. Instead of trying to get every miner to make tcp connections on your behalf, one party can simply publish a signed datafeed into the blockchain and contracts can read that.
  • aatkinaatkin Member Posts: 75 ✭✭
    edited March 2014
    There's a pretty good discussion of how to this in the trusted datafeeds thread. The whitepaper also has an example of the simple way (checking that the ID of the feed sender is the contract author).

    From what I've read it's a security nightmare to have contracts open ports and pull data on their own. You must feed them with transactions or by reading storage from other contracts on the blockchain as @chris613 has said.
Sign In or Register to comment.