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
f46bea7b
Unverified
Commit
f46bea7b
authored
Sep 10, 2024
by
Adrian Sutton
Committed by
GitHub
Sep 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-program: Add a script to build cannon prestates for all tagged op-program releases. (#11559)
parent
dc2490bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
build-prestates.sh
op-program/scripts/build-prestates.sh
+39
-0
No files found.
op-program/scripts/build-prestates.sh
0 → 100755
View file @
f46bea7b
#!/bin/bash
set
-euo
pipefail
SCRIPTS_DIR
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
TMP_DIR
=
$(
mktemp
-d
)
function
cleanup
()
{
rm
-rf
"
${
TMP_DIR
}
"
}
trap
cleanup EXIT
echo
"Using temp dir:
${
TMP_DIR
}
"
cd
"
${
TMP_DIR
}
"
# Need to check out a fresh copy of the monorepo so we can switch to specific tags without it also affecting the
# contents of this script (which is checked into the repo).
git clone https://github.com/ethereum-optimism/optimism
--recurse-submodules
STATES_DIR
=
"
${
SCRIPTS_DIR
}
/../temp/states"
LOGS_DIR
=
"
${
SCRIPTS_DIR
}
/../temp/logs"
REPO_DIR
=
"
${
TMP_DIR
}
/optimism"
BIN_DIR
=
"
${
REPO_DIR
}
/op-program/bin/"
mkdir
-p
"
${
STATES_DIR
}
"
"
${
LOGS_DIR
}
"
cd
"
${
REPO_DIR
}
"
VERSIONS
=
$(
git tag |
grep
'op-program\/v'
)
for
VERSION
in
${
VERSIONS
}
do
LOG_FILE
=
"
${
LOGS_DIR
}
/build-
$(
echo
"
${
VERSION
}
"
|
cut
-c
12-
)
.txt"
echo
"Building Version:
${
VERSION
}
Logs:
${
LOG_FILE
}
"
git checkout
"
${
VERSION
}
"
>
"
${
LOG_FILE
}
"
2>&1
make reproducible-prestate
>>
"
${
LOG_FILE
}
"
2>&1
HASH
=
$(
cat
"
${
BIN_DIR
}
/prestate-proof.json"
| jq
-r
.pre
)
cp
"
${
BIN_DIR
}
/prestate.json"
"
${
STATES_DIR
}
/
${
HASH
}
.json"
echo
"Built
${
VERSION
}
:
${
HASH
}
"
done
echo
"All prestates successfully built and available in
${
STATES_DIR
}
"
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