Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/summa-tx/tbtc-workshop
Educational exercise on Bitcoin SPV in Solidity
https://github.com/summa-tx/tbtc-workshop
Last synced: 2 months ago
JSON representation
Educational exercise on Bitcoin SPV in Solidity
- Host: GitHub
- URL: https://github.com/summa-tx/tbtc-workshop
- Owner: summa-tx
- License: other
- Created: 2019-10-30T21:58:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T01:14:38.000Z (almost 3 years ago)
- Last Synced: 2023-03-02T19:15:43.320Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE2.md
Awesome Lists containing this project
README
### 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:
```bash
$ 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](https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/BytesLib.sol),
[BTCUtils](https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/BTCUtils.sol),
or [ValidateSPV](https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/ValidateSPV.sol).The answers can be found by switching to the `working` branch.
But that's cheating :)