Even if you could force the external entity to declare the full lineage of the input data (i.e. 100% dependently typed), that would require that the scripting can't be programmable, i.e. the external I/O capability would be eliminated. If you don't understand why, please go learn about the typing systems Coq and Epigram.
I just came again across this initiative
http://www.idni.org/like much of the discussion in this thread,
it occupies the higher stratosphere of crypto-related theory,
but as much as I'm able to make out of it, it endeavors to steer
clear of many pitfalls that have been explored here by employing
purely functional language "that contains a blockchain support built-in"
They are trying to apply 100% dependent typing to a distributed database by limiting the universe within which a script resides to a family of rules:
http://tauchain.org/tauchain.pdfThis means the programmability of that universe ("locally, not the network" meaning they also can't control external I/O) is limited to the permutations of the rules (which must not be unbounded, else it is Turing complete and thus no longer dependently typed). These universes won't be able to talk to each other unless by intepreter universe which speaks both families perhaps.
Some where the programmer will bump into a limitation that can't work. This is why Haskell MUST have the UnsafeIO class.
The fundamental issue will not be ameliorated by any design. I am not that worried about external failure, for as long as the external failure can be attributed to using a certain set of external logic (and thus not kill the block chain system's perceived value and thus not kill the Nash equilibrium). We need to think about how externalities will integrate with the programmable block chain.
I am really not ready to research that. I have other more important things to work on first.
The point is that scriptable block chains are something that won't mature and become a real adoption market until after many years from now (perhaps decades). The wild price rise of ETH is much too premature and purely hype.