Commit 69cdd192 authored by George Hotz's avatar George Hotz

readme

parent 4382da4d
......@@ -6,6 +6,13 @@ The cannon (cannon cannon cannon) is an on chain interactive fraud prover
It's half geth, half of what I think truebit was supposed to be. When it's done, we'll be able to prove L1 blocks aren't fraud
* It's code in Go
* ...running an EVM
* ...emulating a MIPS machine
* ...running an EVM
## Steps
1. Get minigeth to verify a block locally paying attention to oracle (done)
2. Compile embedded minigeth to MIPS (done)
3. Get embedded minigeth to verify a block using the oracle (done)
......
......@@ -39,6 +39,7 @@ contract MIPS {
return m.WriteMemory(stateHash, addr, value);
} else {
assembly {
// TODO: this is actually doing an SLOAD first
sstore(addr, value)
}
}
......@@ -204,8 +205,8 @@ contract MIPS {
if (opcode == 0) {
if (func == 8 || func == 9) {
// jr/jalr (val is already right)
return stepNextPC(stateHash, uint32(nextPC), val | (func == 9 ? STORE_LINK : 0));
// jr/jalr
return stepNextPC(stateHash, uint32(nextPC), rs | (func == 9 ? STORE_LINK : 0));
}
// syscall (can read and write)
......
......@@ -269,7 +269,7 @@ func main() {
debug = 1
/*steps := 1000000
runTest(os.Args[1], steps, interpreter, bytecode, uint64(steps)*10000)*/
RunMinigeth(os.Args[1], interpreter, bytecode, 100000000)
RunMinigeth(os.Args[1], interpreter, bytecode, 1000000000)
} else {
debug = 2
runTest(os.Args[1], 20, interpreter, bytecode, 1000000)
......
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