Skip to content

Instantly share code, notes, and snippets.

@ajsutton
Created August 21, 2024 01:32
Show Gist options
  • Save ajsutton/d9ef96543d68d01751a9f216ce294075 to your computer and use it in GitHub Desktop.
Save ajsutton/d9ef96543d68d01751a9f216ce294075 to your computer and use it in GitHub Desktop.
Build All op-program Releases
#!/bin/bash
set -euo pipefail
SCRIPTS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
STATES_DIR="${SCRIPTS_DIR}/../temp/states"
BIN_DIR="${SCRIPTS_DIR}/../bin/"
mkdir -p "${STATES_DIR}"
cd "${SCRIPTS_DIR}/../../"
VERSIONS=$(git tag | grep 'op-program\/v')
for VERSION in ${VERSIONS}
do
echo "Version: ${VERSION}"
git checkout "${VERSION}"
make reproducible-prestate
HASH=$(cat "${BIN_DIR}/prestate-proof.json" | jq -r .pre)
cp "${BIN_DIR}/prestate.json" "${STATES_DIR}/${HASH}.json"
done
@ajsutton
Copy link
Author

Place this script in the op-program/scripts directory of the monorepo and run it. It will generate the prestate for all op-program release tags (run git fetch first to ensure you have them all) and place them in op-program/temp/states named correctly to work with the --cannon-prestates-url option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment