Interaction with Bitcoin blockchain

What is the best practice to interact from an Ethereum contract with the Bitcoin blockchain (e.g. look up a transaction)? Is it possible at all?
Is there a possibility to load data inside a contract from a non-contract source? Or is the only way how Ethereum knows something about the outside world to push those data to a contract and then request those data by other contracts? But then you need to trust that data feed provider and lose the trustless nature of another blockchain. But there is probably no way around that. Using oracles, voting pools or the like might mitigate the problem.

Comments

  • chrisethchriseth Member Posts: 170 ✭✭✭
    I am almost certain that there will be an Ethereum contract that can be used to verify Merkle-proofs of bitcoin transactions.
    So it is not possible to directly look up a transaction, but you can send a transaction together with such a Merkle-proof and the contract can verify the validity of the transaction.
  • androloandrolo Jamtland, SwedenMember Posts: 36 ✭✭
    The more important thing to point out here is this: You will have to rely on outside data sources or your dapp will be limited to doing extremely simple, retarded tasks, and will be quite useless. Frankly all of this "outside world" and theoretical trustlessnes is very contrived. The Ethereum chain isn't going to be the new internet, as some people seem to think. The internet will continue to be hetrogenous, ie made up of many chains (and non-chains for that matter), and any serious application will have to be able to work in that system. Ethereum-only apps will be 0.000000000000000000000000000001% of apps. That number is also a good approximation of how interesting they are outside of the circle-jerk.

    Ethereum to me is a tool for applications - nothing more nothing less. Some think "how can I use Ethereum to make an app" which will ensure that their app is very crappy and Ethereum specific. The better question is "I have an app, how can I use Ethereum in it". At the end of the day - an app is an app. Ethereum is just another component. Just one microservice out of many that modern applications will (or will not) use. Think big.
  • androloandrolo Jamtland, SwedenMember Posts: 36 ✭✭
    take that, strawmen!
  • Ether-LordEther-Lord Member Posts: 7
    Nice. If Ethereum can interact with BTC's chain (and vice-versa) that would be an amazing technological feat.
  • defaceddefaced Member Posts: 7
    This is the sort of thing im mostly interested in.
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    Have a look at BTCRelay (https://github.com/ethereum/btcrelay/), an Ethereum contract for Bitcoin SPV. It's a good start.

    Note that all interactions with elements outside of the Ethereum network are always from the outside in, never from the inside out (the EVM cannot have any randomness, and by definition network connections are random).
  • Manfred_KarrerManfred_Karrer Member Posts: 17
    Thanks for the link. How does the contract gets the btc data? Is there a resource explaining how to interact form outside to Ethereum? Sorry for maybe dumb questions, I am not up-to-date with Ethereum development.
  • meetreksmeetreks Member Posts: 59
    By sending transactions to your contract residing in the EVM, you can interact from outside to ethereum. Mind you - this will cost you some gas.
  • meetreksmeetreks Member Posts: 59
    @StephanTual -- thanks for sharing the link. It is really useful.
  • Manfred_KarrerManfred_Karrer Member Posts: 17
    So its a server/oracle feeding bitcoin blockchain data to an Ethereum contract. Others need to trust the data provider that the data are correct.
    That brings me back to my original question, why to not use then that server for all computation, data storage if the crucial data is coming form it and its not a trustless entity.
    I know there are possibilities to mitigate the trust issue with voting pools...
Sign In or Register to comment.