Update contract + rlnKeystore.json

This commit is contained in:
alrevuelta 2023-08-22 09:52:47 +02:00
parent 70f45e31ed
commit b0bb8ed189
No known key found for this signature in database
GPG Key ID: F345C9F3CCDB886E
3 changed files with 11 additions and 22 deletions

View File

@ -1,35 +1,24 @@
#!/bin/bash
# Ensure you have wakunode2 built with RLN
# make wakunode2 EXPERIMENTAL=true
echo "Generating rln memberships into a single keystore"
# clean old keystore
rm rlnKeystore.json
#rm rlnKeystore.json
# seems we dont populate the chain id, so infura considers it as replayable and rejects it.
#ws://linux-01.ih-eu-mda1.nimbus.sepolia.wg:9557
for i in {0..20}
for i in {0..5}
do
echo "Generating membership at index $i"
./build/wakunode2 \
--rln-relay=true \
--rln-relay-dynamic=true \
--rln-relay-eth-account-private-key=d9f61e035e233e7baabb7ca806f7e9800cfa68397df2d844bf197c3a728cdcef \
--rln-relay-membership-index=$i \
--rln-relay-eth-contract-address=0x39558059411112732d73997712b75a865a697330 \
--rln-relay-eth-client-address=wss://sepolia.infura.io/ws/v3/4576482c0f474483ac709755f2663b20 &
last_pid=$!
echo "pid of process is: "
echo $last_pid
echo "Generating membership $i"
./build/waku generate-rln-credentials \
--eth-account-private-key=d9f61e035e233e7baabb7ca806f7e9800cfa68397df2d844bf197c3a728cdcef \
--eth-contract-address=0x2992c7bFD42729991b614e95F4C2C78619f49c50 \
--eth-client-address=wss://sepolia.infura.io/ws/v3/4576482c0f474483ac709755f2663b20 \
--cred-path=rlnKeystore.json
# this has to be enough to sync the tree and create the keystore. not very efficient
sleep 120
echo "killing $last_pid and generating next membership"
kill -KILL $last_pid
done
# TODO: add this. run at the end. ensures the size of the keystore matches
# TODO: add this. run at the end. ensures the size of the keystore matches
# grep -o salt rlnKeystore.json | wc -l

File diff suppressed because one or more lines are too long

View File

@ -38,5 +38,5 @@ exec /usr/bin/wakunode\
--rln-relay-cred-password=password \
--rln-relay-cred-path=/rlnKeystore.json \
--rln-relay-membership-index=$REPLICA \
--rln-relay-eth-contract-address=0x39558059411112732d73997712b75a865a697330 \
--rln-relay-eth-contract-address=0x2992c7bFD42729991b614e95F4C2C78619f49c50 \
--rln-relay-eth-client-address=ws://linux-01.ih-eu-mda1.nimbus.sepolia.wg:9557