Commit 087cbf6f authored by protolambda's avatar protolambda

readme,makefile: update readme and build instructions

parent da766628
SHELL := /bin/bash SHELL := /bin/bash
build: submodules libunicorn mipsevm contracts build: submodules libunicorn contracts
.PHONY: build .PHONY: build
submodules: submodules:
...@@ -38,11 +38,6 @@ libunicorn_rebuild: ...@@ -38,11 +38,6 @@ libunicorn_rebuild:
make libunicorn make libunicorn
.PHONY: libunicorn_rebuild .PHONY: libunicorn_rebuild
mipsevm:
cd mipsevm && go build
.PHONY: mipsevm
# Must be a definition and not a rule, otherwise it gets only called once and # Must be a definition and not a rule, otherwise it gets only called once and
# not before each test as we wish. # not before each test as we wish.
define clear_cache define clear_cache
...@@ -61,3 +56,7 @@ clean: ...@@ -61,3 +56,7 @@ clean:
contracts: contracts:
cd contracts && forge build cd contracts && forge build
.PHONY: contracts .PHONY: contracts
test: libunicorn
cd mipsevm && go test -v ./...
.PHONY: test
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
--- ---
The cannon (cannon cannon cannon) is an on chain interactive dispute engine implementing EVM-equivalent fault proofs. Cannon *(cannon cannon cannon)* is an onchain MIPS instruction emulator.
Cannon supports EVM-equivalent fault proofs by enabling Geth to run onchain,
It's half geth, half MIPS, and whole awesome. one instruction at a time, as part of an interactive dispute game.
* It's Go code * It's Go code
* ...that runs an EVM * ...that runs an EVM
...@@ -15,9 +15,6 @@ It's half geth, half MIPS, and whole awesome. ...@@ -15,9 +15,6 @@ It's half geth, half MIPS, and whole awesome.
* ...running compiled Go code * ...running compiled Go code
* ...that runs an EVM * ...that runs an EVM
For more information on Cannon's inner workings, check [this overview][overview].
[overview]: https://github.com/ethereum-optimism/optimistic-specs/wiki/Cannon-Overview
## Directory Layout ## Directory Layout
...@@ -31,17 +28,36 @@ unicorn -- Sub-module, used by mipsevm for offchain MIPS emulation. ...@@ -31,17 +28,36 @@ unicorn -- Sub-module, used by mipsevm for offchain MIPS emulation.
## Building ## Building
Pre-requisites: Go, Node.js, Make, and CMake. ### `unicorn`
To build unicorn from source (git sub-module), run:
```
make libunicorn
```
### `contracts`
The contracts are compiled with [`forge`](https://github.com/foundry-rs/foundry).
``` ```
make build make contracts
make test # verify everything works correctly
``` ```
### `mipsevm`
This requires `unicorn` to be built, as well as the `contracts` for testing.
To test:
```
make test
```
Also see notes in `mipsevm/go.mod` about the Unicorn dependency, if you wish to use Cannon as a Go library.
## License ## License
MIT, see [`LICENSE`](./LICENSE) file. MIT, see [`LICENSE`](./LICENSE) file.
Note: This code is unaudited. It in NO WAY should be used to secure any money until a lot more **Note: This code is unaudited.**
testing and auditing are done. I have deployed this nowhere, have advised against deploying it, and In NO WAY should it be used to secure any monetary value before testing and auditing.
make no guarantees of security of ANY KIND. This is experimental software, and should be treated as such.
The authors of this project make no guarantees of security of ANY KIND.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment