Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
69cdd192
Commit
69cdd192
authored
Oct 04, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme
parent
4382da4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
README.md
README.md
+7
-0
MIPS.sol
contracts/MIPS.sol
+3
-2
main.go
mipsevm/main.go
+1
-1
No files found.
README.md
View file @
69cdd192
...
...
@@ -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)
...
...
contracts/MIPS.sol
View file @
69cdd192
...
...
@@ -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)
...
...
mipsevm/main.go
View file @
69cdd192
...
...
@@ -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
,
100000000
0
)
}
else
{
debug
=
2
runTest
(
os
.
Args
[
1
],
20
,
interpreter
,
bytecode
,
1000000
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment