How can the BTC Relay contract verify that relayers are providing valid blocks from the Bitcoin blockchain?

1 Answer 1


The BTC Relay implements an SPV Client on the Ethereum blockchain.

Essentially, the contract keeps track of the longest chain of block headers, under the assumption that it would be difficult to forge a fake chain fast enough to keep up with the real chain. The contract does not validate that each transaction is valid, but does check that the block header itself is valid.

This presents some issues, especially since the provided relay software derives its block headers from http://Blockr.io instead of from a local Bitcoin full node, since if blockr is taken down or starts forging headers, there may not be other validators to compete.

  • How did The BTC Relay implement SPV in a contract? How can you get Bitcoin block headers from outside of Ethereum? May 11, 2016 at 16:22
  • The contract relies on "relayers" to supply the block headers. The relayers can set a fee to access the block, so they are incentivized to relay May 11, 2016 at 16:27
  • What kind of people (or computers?) are "relayers"? Can anybody be a relayer to send the block headers? How do they work? May 11, 2016 at 16:35
  • Anyone can be a relayer. Consensys makes a relay client that automatically fetches block headers from blockr.io and sends them to the relay via a locally running Ethereum node. May 11, 2016 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.