mirror of https://github.com/waku-org/nwaku.git
feat(rln-relay): use arkzkey variant of zerokit (#2681)
This commit is contained in:
parent
401630ee24
commit
e7b0777d25
2
Makefile
2
Makefile
|
@ -135,7 +135,7 @@ clean: | clean-libbacktrace
|
||||||
|
|
||||||
LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
|
LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
|
||||||
ifeq ($(RLN_V2),true)
|
ifeq ($(RLN_V2),true)
|
||||||
LIBRLN_VERSION := v0.4.3
|
LIBRLN_VERSION := v0.4.4
|
||||||
else
|
else
|
||||||
LIBRLN_VERSION := v0.3.7
|
LIBRLN_VERSION := v0.3.7
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -17,17 +17,28 @@ output_filename=$3
|
||||||
# Get the host triplet
|
# Get the host triplet
|
||||||
host_triplet=$(rustc --version --verbose | awk '/host:/{print $2}')
|
host_triplet=$(rustc --version --verbose | awk '/host:/{print $2}')
|
||||||
|
|
||||||
|
tarball="${host_triplet}"
|
||||||
|
|
||||||
|
# use arkzkey feature for v0.4.4
|
||||||
|
# TODO: update this script in the future when arkzkey is default
|
||||||
|
if [[ "${rln_version}" == "v0.4.4" ]]; then
|
||||||
|
tarball+="-arkzkey-rln.tar.gz"
|
||||||
|
else
|
||||||
|
tarball+="-rln.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Download the prebuilt rln library if it is available
|
# Download the prebuilt rln library if it is available
|
||||||
if curl --silent --fail-with-body -L \
|
if curl --silent --fail-with-body -L \
|
||||||
"https://github.com/vacp2p/zerokit/releases/download/$rln_version/${host_triplet}-rln.tar.gz" \
|
"https://github.com/vacp2p/zerokit/releases/download/$rln_version/$tarball" \
|
||||||
-o "${host_triplet}-rln.tar.gz";
|
-o "${tarball}";
|
||||||
then
|
then
|
||||||
echo "Downloaded ${host_triplet}-rln.tar.gz"
|
echo "Downloaded ${tarball}"
|
||||||
tar -xzf "${host_triplet}-rln.tar.gz"
|
tar -xzf "${tarball}"
|
||||||
mv "release/librln.a" "${output_filename}"
|
mv "release/librln.a" "${output_filename}"
|
||||||
rm -rf "${host_triplet}-rln.tar.gz" release
|
rm -rf "${tarball}" release
|
||||||
else
|
else
|
||||||
echo "Failed to download ${host_triplet}-rln.tar.gz"
|
echo "Failed to download ${tarball}"
|
||||||
# Build rln instead
|
# Build rln instead
|
||||||
# first, check if submodule version = version in Makefile
|
# first, check if submodule version = version in Makefile
|
||||||
cargo metadata --format-version=1 --no-deps --manifest-path "${build_dir}/rln/Cargo.toml"
|
cargo metadata --format-version=1 --no-deps --manifest-path "${build_dir}/rln/Cargo.toml"
|
||||||
|
|
Loading…
Reference in New Issue