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
95d3ee1c
Commit
95d3ee1c
authored
May 05, 2022
by
Nicolas "Norswap" Laurent
Committed by
norswap
May 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make unicorn a git module
parent
a2020455
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
17 deletions
+23
-17
.gitignore
.gitignore
+0
-2
.gitmodules
.gitmodules
+3
-0
Makefile
Makefile
+9
-4
build_unicorn.sh
build_unicorn.sh
+9
-10
go.mod
mipsevm/go.mod
+1
-1
unicorn
unicorn
+1
-0
No files found.
.gitignore
View file @
95d3ee1c
node_modules
node_modules
artifacts
artifacts
cache
cache
unicorn
unicorn2
.*.swp
.*.swp
venv
venv
.idea
.idea
...
...
.gitmodules
View file @
95d3ee1c
...
@@ -2,3 +2,6 @@
...
@@ -2,3 +2,6 @@
branch = l2minigeth
branch = l2minigeth
path = minigeth
path = minigeth
url = git@github.com:ethereum-optimism/minigeth.git
url = git@github.com:ethereum-optimism/minigeth.git
[submodule "unicorn"]
path = unicorn
url = git@github.com:unicorn-engine/unicorn.git
Makefile
View file @
95d3ee1c
SHELL
:=
/bin/bash
SHELL
:=
/bin/bash
build
:
unicorn submodule
minigeth_mips minigeth_default_arch mipsevm contracts
build
:
submodules unicorn
minigeth_mips minigeth_default_arch mipsevm contracts
unicorn
:
unicorn
:
./build_unicorn.sh
./build_unicorn.sh
submodule
:
submodule
s
:
# CI will checkout submodules on its own
(
and fails on these commands
)
# CI will checkout submodules on its own
(
and fails on these commands
)
if
[[
-z
"
$$
GITHUB_ENV"
]]
;
then
\
if
[[
-z
"
$$
GITHUB_ENV"
]]
;
then
\
git submodule init
;
\
git submodule init
;
\
...
@@ -31,11 +31,16 @@ nodejs:
...
@@ -31,11 +31,16 @@ nodejs:
npm
install
;
\
npm
install
;
\
fi
fi
# Must be a definition and not a rule, otherwise it gets only called once and
# not before each test as we wish.
define
clear_cache
define
clear_cache
rm
-rf
/tmp/cannon
rm
-rf
/tmp/cannon
mkdir
-p
/tmp/cannon
mkdir
-p
/tmp/cannon
endef
endef
clear_cache
:
$
(
call clear_cache
)
test_challenge
:
test_challenge
:
$
(
call clear_cache
)
$
(
call clear_cache
)
# Build preimage cache for block 13284469
# Build preimage cache for block 13284469
...
@@ -82,5 +87,5 @@ mrproper: clean
...
@@ -82,5 +87,5 @@ mrproper: clean
rm
-rf
node_modules
rm
-rf
node_modules
rm
-rf
mipigo/venv
rm
-rf
mipigo/venv
.PHONY
:
build unicorn submodule minigeth_mips minigeth_default_arch mipsevm contracts
\
.PHONY
:
build unicorn submodule
s
minigeth_mips minigeth_default_arch mipsevm contracts
\
nodejs clean mrproper test_challenge test_mipsevm test_minigeth test
nodejs clean mrproper test_challenge test_mipsevm test_minigeth test
clear_cache
build_unicorn.sh
View file @
95d3ee1c
#!/usr/bin/env bash
cd
unicorn
if
[[
!
-d
unicorn2
]]
;
then
mkdir
-p
build
git clone https://github.com/geohot/unicorn.git
-b
dev unicorn2
cd
build
#git clone https://github.com/unicorn-engine/unicorn.git -b dev unicorn2
cmake ..
-DUNICORN_ARCH
=
mips
-DCMAKE_BUILD_TYPE
=
Release
fi
cd
unicorn2
cmake
.
-DUNICORN_ARCH
=
mips
-DCMAKE_BUILD_TYPE
=
Release
#cmake . -DUNICORN_ARCH=mips -DCMAKE_BUILD_TYPE=Debug
make
-j8
make
-j8
# The Go linker / runtime expects these to be there!
cp
libunicorn.so.1 ..
cp
libunicorn.so.2 ..
# export LIBUNICORN_PATH for Github CI
# export LIBUNICORN_PATH for Github CI
# TODO: is this actually needed?
# TODO: is this actually needed?
if
[[
!
-z
"
$GITHUB_ENV
"
]]
;
then
if
[[
!
-z
"
$GITHUB_ENV
"
]]
;
then
echo
"LIBUNICORN_PATH=
$(
pwd
)
/unicorn
2
/"
>>
$GITHUB_ENV
echo
"LIBUNICORN_PATH=
$(
pwd
)
/unicorn/"
>>
$GITHUB_ENV
fi
fi
mipsevm/go.mod
View file @
95d3ee1c
...
@@ -4,7 +4,7 @@ go 1.17
...
@@ -4,7 +4,7 @@ go 1.17
replace github.com/ethereum/go-ethereum => ../minigeth
replace github.com/ethereum/go-ethereum => ../minigeth
replace github.com/unicorn-engine/unicorn => ../unicorn
2
replace github.com/unicorn-engine/unicorn => ../unicorn
require (
require (
github.com/ethereum/go-ethereum v1.10.8
github.com/ethereum/go-ethereum v1.10.8
...
...
unicorn
@
e5e13032
Subproject commit e5e1303243cf1a4e788a981ac7e6dbe945802260
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