Skip to content

Commit

Permalink
📝 README
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Sep 22, 2023
1 parent 7d136ce commit 75d90bc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
<img align="right" width="150" height="150" top="100" src="./assets/logo.png">

# `cannon-rs`[![ci](https://github.com/clabby/cannon-rs/actions/workflows/ci.yaml/badge.svg?label=ci)](https://github.com/clabby/cannon-rs/actions/workflows/ci.yaml) ![license](https://img.shields.io/badge/License-MIT-green.svg?label=license)

`cannon-rs` is an alternative implementation of [Cannon][cannon] in Rust.

<h1 align="center">
<br>
<img src="./assets/banner.png" alt="Markdownify" height="350">
<br>
<code>cannon-rs</code>
<br>
</h1>

<h4 align="center">
An alternative implementation of the OP Stack's <a href="https://github.com/ethereum-optimism/optimism/tree/develop/cannon">Cannon</a> in Rust.
</h4>

<p align="center">
<a href="https://github.com/clabby/cannon-rs/actions/workflows/ci.yaml">
<img src="https://github.com/clabby/cannon-rs/actions/workflows/ci.yaml/badge.svg?label=ci" alt="Ci">
</a>
<img src="https://img.shields.io/badge/License-MIT-green.svg?label=license" alt="License">
<a href="https://github.com/ethereum-optimism/monorepo"><img src="https://img.shields.io/badge/OP%20Stack-monorepo-red" alt="OP Stack"></a>
</p>

<p align="center">
<a href="#whats-a-cannon">What's a Cannon?</a> •
<a href="#credits">Credits</a> •
<a href="#usage">Usage</a> •
<a href="#contributing">Contributing</a> •
<a href="#documentation">Documentation</a> •
<a href="#docker">Docker</a>
</p>

## What's a Cannon?

Cannon is a single MIPS thread context emulator that runs on the EVM. It's used primarily to run the [op-program][op-program], or the fault proof program,
which is Go code modeling a stripped-down version of `op-geth`'s state transition code as well as the derivation pipeline, that is then compiled to MIPS.
Cannon also features a native implementation of the MIPS thread context that is identical to the on-chain implementation, and this library is used by the
[op-challenger][op-challenger] to generate state hashes while participating in the interactive dispute protocol.

*TL;DR:*
* It's Rust code
* ...that was originally Go code
* ...that was [originally Go code][cannon]
* ...that runs an EVM
* ...emulating a MIPS machine
* ...running compiled Go code
* ...running [compiled Go code][op-program]
* ...that runs an EVM

## Credits
Expand Down Expand Up @@ -57,6 +88,8 @@ Rustdocs are available by running `cargo doc --open` after cloning the repo.
[geohot]: https://github.com/geohot
[op-labs]: https://oplabs.co
[cannon]: https://github.com/ethereum-optimism/optimism/tree/develop/cannon
[op-program]: https://github.com/ethereum-optimism/optimism/tree/develop/op-program
[op-challenger]: https://github.com/ethereum-optimism/optimism/tree/develop/op-challenger
[rustup]: https://rustup.rs/
[golang]: https://go.dev/doc/install
[binutils]: https://www.gnu.org/software/binutils/
Expand Down
Binary file added assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/logo.png
Binary file not shown.

0 comments on commit 75d90bc

Please sign in to comment.