Skip to content

Commit

Permalink
remove srs from opt-in (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur authored Apr 22, 2024
1 parent 8694b99 commit 5185720
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
6 changes: 0 additions & 6 deletions holesky/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ node_plugin_image="ghcr.io/layr-labs/eigenda/opr-nodeplugin:release-0.6.2"
# To test that try running `docker run --rm --env-file .env busybox /bin/sh -c 'echo $NODE_ECDSA_KEY_PASSWORD'`
# This will output password with single quote. Not sure why this happens.
optIn() {
echo "checking and validating SRS"
../srs_setup.sh
if [ $? -ne 0 ]; then
echo "Error: SRS setup failed. Exiting."
exit 1
fi
echo "using socket: $socket"
docker run --env-file .env \
--rm \
Expand Down
6 changes: 0 additions & 6 deletions mainnet/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ node_plugin_image="ghcr.io/layr-labs/eigenda/opr-nodeplugin:release-0.6.2"
# To test that try running `docker run --rm --env-file .env busybox /bin/sh -c 'echo $NODE_ECDSA_KEY_PASSWORD'`
# This will output password with single quote. Not sure why this happens.
optIn() {
echo "checking and validating SRS"
../srs_setup.sh
if [ $? -ne 0 ]; then
echo "Error: SRS setup failed. Exiting."
exit 1
fi
echo "using socket: $socket"
docker run --env-file .env \
--rm \
Expand Down
14 changes: 9 additions & 5 deletions srs_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@

DOWNLOADED_FILE=false
echo "Downloading srs resources"
if ! [ -f ../resources/g1.point ]; then
if ! [ -f ./resources/g1.point ]; then
echo "g1.point does not exist."
echo "Downloading g1 point. This could take upto 5 minutes"
wget https://srs-mainnet.s3.amazonaws.com/kzg/g1.point --output-document=../resources/g1.point
wget https://srs-mainnet.s3.amazonaws.com/kzg/g1.point --output-document=./resources/g1.point
DOWNLOADED_FILE=true
else
echo "g1.point already exists."
fi

if ! [ -f ../resources/g2.point.powerOf2 ]; then
if ! [ -f ./resources/g2.point.powerOf2 ]; then
echo "g2.point.powerOf2 does not exist."
echo "Downloading g2 point powerOf2. This will take few seconds"
wget https://srs-mainnet.s3.amazonaws.com/kzg/g2.point.powerOf2 --output-document=../resources/g2.point.powerOf2
wget https://srs-mainnet.s3.amazonaws.com/kzg/g2.point.powerOf2 --output-document=./resources/g2.point.powerOf2
DOWNLOADED_FILE=true
else
echo "g2.point.powerOf2 already exists."
fi

# Any time we download the file, validate hashes
if [ "$DOWNLOADED_FILE" = true ]; then
echo "validating hashes of g1 and g2 points This could take upto 5 minutes"
if (cd ../resources && sha256sum -c srssha256sums.txt); then
if (cd ./resources && sha256sum -c srssha256sums.txt); then
echo "Checksums match. Verification successful."
else
echo "Error: Checksums do not match. Exiting."
Expand Down

0 comments on commit 5185720

Please sign in to comment.