-
Notifications
You must be signed in to change notification settings - Fork 7
/
g1.sh
executable file
·21 lines (16 loc) · 1.04 KB
/
g1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
mkdir g1points;
rm g1points/*.dat
cd g1points;
echo "Downloading first G1 point of each transcript_0"
if type "jq" > /dev/null; then
TRANSCRIPT_NAMES=$(curl https://aztec-ignition.s3.eu-west-2.amazonaws.com/MAIN+IGNITION/manifest.json | jq ".participants | [ to_entries[] | (if .value.position|tostring|length == 1 then (\"00\" + (.value.position|tostring)) else if .value.position|tostring|length == 2 then (\"0\" + (.value.position|tostring)) else (.value.position|tostring) end end) + \"_\" + .value.address ] ")
echo $TRANSCRIPT_NAMES | tr '[:upper:]' '[:lower:]' | jq " to_entries[] | \"curl https://aztec-ignition.s3.eu-west-2.amazonaws.com/MAIN+IGNITION/\" + (.value) + \"/transcript00.dat -H 'Range: bytes=28-91' > \" + (.value) + \"_g1.dat\" " > keys
# Manual addition of sealed transcript
echo "curl https://aztec-ignition.s3.eu-west-2.amazonaws.com/MAIN+IGNITION/sealed/transcript00.dat -H 'Range: bytes=28-91' > 198_sealed_g1.dat" >> keys
fi
while read p;
do
echo $p
eval $(sed -e 's/^"//' -e 's/"$//' <<< $p)
done < keys;