Summa - Bitcoin SPV Utils

Project
bitcoin-spv for CKB

bitcoin-spv is a set of libraries for working with Bitcoin from other chains. It enables cross-chain communication like swaps, relays, and bridges. Currently, it is available in Solidity, Go, Rust, Python, and ES6+. We’d like to add a C-implementation targeted at CKB.

Team
Summa aims to make cross-chain development simple and ubiquitous. We maintain a suite of open-source libraries that support dozens of chains, and work on interoperability projects with Bitcoin, Etherereum, Cosmos, Near, and Celo.

You can find us on Github, Medium, and Twitter.

Specification

  • A minimal C library targeting RISC-V that can:

    • Parse and validate Bitcoin headers
    • Parse, validate, and measure work of Bitcoin header chains
    • Validate Merkle inclusion proofs for transactions
    • Validate pre-parsed Bitcoin transactions
    • Extract information from transaction inputs and outputs
  • Extensive unit-tests to ensure API-compatibility with other versions

  • An example CKB lock-script implementing a Stateless Swap with Bitcoin

    • Allows anyone to sell CKB for BTC in a trust-minimized way
    • Uses Stateless SPVs to verify Bitcoin payment
    • Parses Nervos payment information from the Bitcoin transaction
    • Does not include wallet software or UI capable of making trades
  • A blog post guide to unit testing C using libcheck, and testing CKB Scripts in Rust using the CKB core libraries.

Timeline
We have a significant amount of work done, and expect to have a complete version with tests and documentation by the end of February.

15 Likes

This grant has been approved.

You can read the announcement here.

And the Community Chat with Summa Founder James Prestwich here!

Current C code is here.

There is a PR about to go in for a significant refactor here.

3 Likes