Skip to content

summa-tx/tbtc-workshop

Repository files navigation

SPV Workshop

This is a brief exercise on validating SPV Proofs using bitcoin-spv. It includes one contract (SPVLogger.sol) that verifies payments made to James.

Your goal is to implement a Bitcoin SPV system. We've provided tests that include a valid proof, and built all the libraries you'll need to evaluate it.

Warning

THIS IS NOT INTENDED FOR PRODUCTION AND THE CODE DOES NOT ACCOMPLISH SECURE SPV COMMUNICATION. IT IS FOR EDUCATIONAL PURPOSES ONLY

How to play :)

Clone this repo and run:

$ npm i -g truffle
$ npm i
$ truffle test

You'll see that the tests do not pass. The SPVLogger contract is not fully implemented! You'll need to go through the file and fill lines around each comment starting with // Goal. They'll have instructions, and always use one or more of BytesLib, BTCUtils, or ValidateSPV.

The answers can be found by switching to the working branch. But that's cheating :)

About

Educational exercise on Bitcoin SPV in Solidity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •