Coder Social home page Coder Social logo

elftrace's Introduction

Bitcoin Elftrace

Verify RISC-V binary execution in Bitcoin script.

What is this?

Bitcoin Elftrace is a proof of concept tool used to trace the execution of RISCV-32 binaries (ELFs), and and generate Bitcoin script that can be used to verify this execution on-chain.

How do I use it?

See the compilation doc for an example of how to trace a RISC-V binary.

What is this useful for?

Using this you can use your favourite language to write arbitrary programs that can be verified on Bitcoin. Paired with the "optimistic execution" smart contracting paradigm, this opens up the possibility for Bitcoin smart contracts to be arbitrary complex while still keeping the on-chain footprint low.

What is optimistic execution?

The idea is to write your UTXO smart contracts in a way that gives any spender the incentive to act honestly. If someone tries to spend the UTXO with an improper execution of the contract, they can be punished efficiently using a fraud proof.

How can I use elftrace to write Bitcoin smart contracts?

elftrace only (currently) generates the scripts needed to validate the program execution. You will need to wrap the program in a "MATT challenge" style script in order to set up a proper smart contract. See mattlab for an example.

When can I use this on mainnet?

In order to use this on mainnet we would need to deploy a covenant opcode. elftrace is based on the OP_CHECKCONTRACTVERIFY opcode proposed by MATT.

Come join us in getting covenants deployed on Bitcoin! ๐Ÿค 

What does this enable on Bitcoin?

Having a covenant deployed on bitcoin would enable us to use this to create trustless two-way pegs, rollups, ZK verifiers... in general much more flexible ways of handing custody of coins to an on-chain computer program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.