Commit d906e350 authored by Nicolas Laurent's avatar Nicolas Laurent Committed by GitHub

Merge pull request #42 from ethereum-optimism/m/fix-unicorn-py

Fixes to README and build scripts
parents 6420f3bb b53855e7
......@@ -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
......
......@@ -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
......
......@@ -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
......
#!/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
unicorn==1.0.3
pyelftools==0.27
hexdump==3.3
termcolor==1.1.0
......
#!/bin/bash -e
(cd ../ && npx hardhat compile > /dev/null)
go build && ./mipsevm $@
go build && (cd .. && ./mipsevm/mipsevm $@)
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