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
d906e350
Unverified
Commit
d906e350
authored
Jan 27, 2022
by
Nicolas Laurent
Committed by
GitHub
Jan 27, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #42 from ethereum-optimism/m/fix-unicorn-py
Fixes to README and build scripts
parents
6420f3bb
b53855e7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
13 deletions
+21
-13
test_challenge.yml
.github/workflows/test_challenge.yml
+1
-0
test_mipsevm.yml
.github/workflows/test_mipsevm.yml
+1
-0
README.md
README.md
+7
-8
build_unicorn.sh
build_unicorn.sh
+11
-3
requirements.txt
mipigo/requirements.txt
+0
-1
evm.sh
mipsevm/evm.sh
+1
-1
No files found.
.github/workflows/test_challenge.yml
View file @
d906e350
...
...
@@ -16,6 +16,7 @@ jobs:
-
name
:
Install unicorn
run
:
|
./build_unicorn.sh
echo "LIBUNICORN_PATH=$(pwd)/unicorn2/" >> $GITHUB_ENV
-
name
:
Install yarn
run
:
|
npm install --global yarn
...
...
.github/workflows/test_mipsevm.yml
View file @
d906e350
...
...
@@ -16,6 +16,7 @@ jobs:
-
name
:
Install unicorn
run
:
|
./build_unicorn.sh
echo "LIBUNICORN_PATH=$(pwd)/unicorn2/" >> $GITHUB_ENV
-
name
:
Install yarn
run
:
|
npm install --global yarn
...
...
README.md
View file @
d906e350
...
...
@@ -23,23 +23,22 @@ contracts -- A Merkleized MIPS processor on chain + the challenge logic
```
## Usage
The following commands should be run from the root directory unless otherwise specified:
```
# build unicorn
./build_unicorn.sh
export LIBUNICORN_PATH=$(pwd)/unicorn2/
# build minigeth for MIPS
(cd mipigo && pip3 install -r requirements.txt && ./build.sh)
# build minigeth for PC
(cd minigeth/ && go build)
mkdir -p /tmp/cannon
(cd mipigo && ./build.sh)
# compute the transition from 13284469 -> 13284470 on PC
mkdir -p /tmp/cannon
minigeth/go-ethereum 13284469
# write out the golden MIPS minigeth start state
mipsevm/mipsevm
yarn
(cd mipsevm && ./evm.sh)
# generate MIPS checkpoints for 13284469 -> 13284470
mipsevm/mipsevm 13284469
...
...
build_unicorn.sh
View file @
d906e350
#!/bin/bash
git clone https://github.com/geohot/unicorn.git
-b
dev unicorn2
#git clone https://github.com/unicorn-engine/unicorn.git -b dev unicorn2
if
[[
!
-d
unicorn2
]]
;
then
git clone https://github.com/geohot/unicorn.git
-b
dev unicorn2
#git clone https://github.com/unicorn-engine/unicorn.git -b dev unicorn2
fi
cd
unicorn2
#cmake . -DUNICORN_ARCH=mips -DCMAKE_BUILD_TYPE=Debug
cmake
.
-DUNICORN_ARCH
=
mips
-DCMAKE_BUILD_TYPE
=
Release
#cmake . -DUNICORN_ARCH=mips -DCMAKE_BUILD_TYPE=Debug
make
-j8
# setting this avoids re-building unicorn in setup.py
export
LIBUNICORN_PATH
=
$(
pwd
)
cd
bindings/python
sudo
python3 setup.py
install
mipigo/requirements.txt
View file @
d906e350
unicorn==1.0.3
pyelftools==0.27
hexdump==3.3
termcolor==1.1.0
...
...
mipsevm/evm.sh
View file @
d906e350
#!/bin/bash -e
(
cd
../
&&
npx hardhat compile
>
/dev/null
)
go build
&&
./mipsevm
$@
go build
&&
(
cd
..
&&
./mipsevm/mipsevm
$@
)
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