Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rln-relay): use arkzkey variant of zerokit #2681

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ clean: | clean-libbacktrace

LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
ifeq ($(RLN_V2),true)
LIBRLN_VERSION := v0.4.3
LIBRLN_VERSION := v0.4.4
else
LIBRLN_VERSION := v0.3.7
endif
Expand Down
23 changes: 17 additions & 6 deletions scripts/build_rln.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,28 @@ output_filename=$3
# Get the host triplet
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
if curl --silent --fail-with-body -L \
"https://github.com/vacp2p/zerokit/releases/download/$rln_version/${host_triplet}-rln.tar.gz" \
-o "${host_triplet}-rln.tar.gz";
"https://github.com/vacp2p/zerokit/releases/download/$rln_version/$tarball" \
-o "${tarball}";
then
echo "Downloaded ${host_triplet}-rln.tar.gz"
tar -xzf "${host_triplet}-rln.tar.gz"
echo "Downloaded ${tarball}"
tar -xzf "${tarball}"
mv "release/librln.a" "${output_filename}"
rm -rf "${host_triplet}-rln.tar.gz" release
rm -rf "${tarball}" release
else
echo "Failed to download ${host_triplet}-rln.tar.gz"
echo "Failed to download ${tarball}"
# Build rln instead
# first, check if submodule version = version in Makefile
cargo metadata --format-version=1 --no-deps --manifest-path "${build_dir}/rln/Cargo.toml"
Expand Down
Loading