I could see this being an important part of the programming language. What if a specific contract requires integration with a 3rd party system as part of its operation (i.e. checking a USPS tracking number's status for delivery etc...) to verify a state outside of its own system.
0 ·
Comments
https://github.com/ethereum/wiki/wiki/[English]-Layers#wiki-networking-daemon
There was a discussion about trusted data feeds in the white paper as well as on a different forum thread[1] but I can't seem to find further details on it. So I'm starting a new thread in hopes that it gets some attention from the core team. There is going to be a concern on whether or not a miner/node should be made to access an external site due to obvious security reasons but we also need some kind of flexibility for contracts to be truly useful. For example what if the contract requires that an item needs to be shipped so we need to verify through the shipping provider the status of the tracking number and the way we would do that is to use the shipping provider's API to see the status.
[1] http://forum.ethereum.org/index.php?p=/discussion/31/what-would-a-trusted-data-feed-look-like
If a contract needs to know whether a package is delivered, either the package itself must have a hardware component that is connected to the blockchain (ideal), or an external server must constantly check the status of the package, and send the information on to the blockchain once it arrives (which is likely going to be the case until we get our ether-enabled hardware). Pipe dreams aside, it won't be anywhere near as hard to get trusted data to contracts as people are making it out to be, albeit it may be slightly less "decentralized" than everyone seems to imagine. At least for the time being.
@tym4t? AFAIK there are no plans for this sort of external call inside contract code. One reason is that if the target API ever goes away then the consequences of the contract can never be checked or replayed to validate the blockchain. Likewise if the API returns different values to different clients (for whatever reason) they will disagree on the outcomes. The most glaring problem is that the target API will face a deluge of traffic from ethereum nodes, and it would likely be possible to use contracts as a DDOS, scanning, or exploit tool. Like I said though, I don't think there are plans for this in ethereum; so far the blockchain itself, including contracts, is self-contained and deterministic, with no way for contracts to read or write outside the confines of the VM.