# Optimistic ZK verification using MATT

**URL:** <https://delvingbitcoin.org/t/optimistic-zk-verification-using-matt/1050>\
**Category:** Protocol Design\
**Created:** [July 31, 2024, 12:49pm UTC](https://delvingbitcoin.org/t/optimistic-zk-verification-using-matt/1050 "2024-07-31T12:49:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![halseth](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/halseth/32/198_2.png) [@halseth](https://delvingbitcoin.org/u/halseth)\
**Post date:** [July 31, 2024, 12:49pm UTC](https://delvingbitcoin.org/t/optimistic-zk-verification-using-matt/1050/1 "2024-07-31T12:49:50Z")

</div>

Earlier I posted about [Elftrace](https://github.com/halseth/elftrace), a tool for creating Bitcoin Scripts to verify RISC-V execution: [Verification of RISC-V execution using OP\_CCV](https://delvingbitcoin.org/t/verification-of-risc-v-execution-using-op-ccv/313)

Since then it has had some updates, and I wanted to share that the toolchain has had some additions making it easier to compile Rust without having to write custom assembly for every new program. It now also support doing input/output to the program using standard IO.

With this in place we are able to compile the **Winterfell STARK library** as a dependency, making it possible to _verify-the-verification_ of ZK proofs in Bitcoin Script (this still requires CAT and a covenant).

A more detailed writeup is here, with example code: [elftrace/docs/zk\_verifier.md at 831f537bc1509bd45c350e103f7fc73aa818f7dd · halseth/elftrace · GitHub](https://github.com/halseth/elftrace/blob/831f537bc1509bd45c350e103f7fc73aa818f7dd/docs/zk_verifier.md)

---

_[View the full topic](https://delvingbitcoin.org/t/optimistic-zk-verification-using-matt/1050)._
