From 52b685d9d8abd4da004f0f8230590c0549019ab0 Mon Sep 17 00:00:00 2001 From: Tanya S <120410716+stubbsta@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:22:11 +0200 Subject: [PATCH] Add specific RLN-contract repo commit version (#95) * Add specific RLN-contract repo commit version * Verify git commit checkout and use known default commit * remove commit hash check in deploy_rln_contract * verify that RLN_CONTRACT_REPO_COMMIT is not empty --- deploy_rln_contract.sh | 6 ++++++ docker-compose.yml | 1 + wakusim.env | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/deploy_rln_contract.sh b/deploy_rln_contract.sh index c92c7e6..d199af7 100644 --- a/deploy_rln_contract.sh +++ b/deploy_rln_contract.sh @@ -13,7 +13,13 @@ if [ ! -d "waku-rlnv2-contract" ]; then git clone https://github.com/waku-org/waku-rlnv2-contract.git fi +if [ -z "$RLN_CONTRACT_REPO_COMMIT" ]; then + echo "RLN_CONTRACT_REPO_COMMIT is not set" + exit 1 +fi + cd /waku-rlnv2-contract +git checkout $RLN_CONTRACT_REPO_COMMIT #3. Replace the hardcoded MAX_MESSAGE_LIMIT sed -i "s/\b100\b/${MAX_MESSAGE_LIMIT}/g" script/Deploy.s.sol diff --git a/docker-compose.yml b/docker-compose.yml index fbed018..6592794 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,7 @@ services: labels: com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}' environment: + - RLN_CONTRACT_REPO_COMMIT=${RLN_CONTRACT_REPO_COMMIT:-64df4593c6a14e43b8b0e9b396d2f4772bb08b34} - PRIVATE_KEY=${PRIVATE_KEY} - RPC_URL=${RPC_URL:-http://foundry:8545} - ETH_FROM=${ETH_FROM} diff --git a/wakusim.env b/wakusim.env index 5e13924..eabffd3 100644 --- a/wakusim.env +++ b/wakusim.env @@ -15,4 +15,5 @@ ETH_FROM=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 MAX_MESSAGE_LIMIT=100 # RLNv2 limits RLN_RELAY_MSG_LIMIT=100 -RLN_RELAY_EPOCH_SEC=600 \ No newline at end of file +RLN_RELAY_EPOCH_SEC=600 +RLN_CONTRACT_REPO_COMMIT=64df4593c6a14e43b8b0e9b396d2f4772bb08b34 \ No newline at end of file