feat(rln-relay): use precompiled resources w/ rln (#1578)

* feat(rln-relay): use precompiled resources w/ rln

* chore: remove resource cp stage from Dockerfile

* chore(makefile): remove DOCKER_IMAGE_STAGE from makefile

* chore: bump submodule, rev branch
This commit is contained in:
Aaryamann Challani 2023-03-13 12:03:21 +05:30 committed by GitHub
parent 075815b072
commit 6584b58593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 18 deletions

View File

@ -54,11 +54,3 @@ RUN ln -sv /usr/local/bin/$MAKE_TARGET /usr/bin/wakunode
ENTRYPOINT ["/usr/bin/wakunode"]
# By default just show help if called without arguments
CMD ["--help"]
# EXPERIMENTAL IMAGE -----------------------------------------------------------
FROM prod AS experimental
# If RLN enabled, copy RLN resources (WASM ZK circuit, proving and verification keys) used by tests
COPY --from=nim-build /app/vendor/zerokit/rln/resources/ vendor/zerokit/rln/resources/

View File

@ -120,7 +120,7 @@ $(LIBRLN_BUILDDIR)/$(LIBRLN_FILE):
ifneq ($(RLN), true)
librln: ; # noop
else
EXPERIMENTAL_PARAMS += -d:rln --dynlibOverride:rln --passL:$(LIBRLN_BUILDDIR)/$(LIBRLN_FILE) --passL:-lm
EXPERIMENTAL_PARAMS += -d:rln --passL:$(LIBRLN_BUILDDIR)/$(LIBRLN_FILE) --passL:-lm
librln: $(LIBRLN_BUILDDIR)/$(LIBRLN_FILE)
endif
@ -228,11 +228,6 @@ docs: | build deps
# -d:insecure - Necessary to enable Prometheus HTTP endpoint for metrics
# -d:chronicles_colors:none - Necessary to disable colors in logs for Docker
DOCKER_IMAGE_NIMFLAGS ?= -d:chronicles_colors:none -d:insecure
DOCKER_IMAGE_STAGE ?= prod
ifeq ($(EXPERIMENTAL), true)
DOCKER_IMAGE_STAGE := experimental
endif
# build a docker image for the fleet
docker-image: MAKE_TARGET ?= wakunode2
@ -244,7 +239,6 @@ docker-image:
--build-arg="NIMFLAGS=$(DOCKER_IMAGE_NIMFLAGS)" \
--build-arg="EXPERIMENTAL=$(EXPERIMENTAL)" \
--label="commit=$(GIT_VERSION)" \
--target $(DOCKER_IMAGE_STAGE) \
--tag $(DOCKER_IMAGE_NAME) .
docker-push:

2
vendor/zerokit vendored

@ -1 +1 @@
Subproject commit a6145ab2012a1e9b6bdd08963d6e1db09f06c88d
Subproject commit c319f32a1e4a3471554006523c90856a943b366e

View File

@ -28,7 +28,7 @@ const
const
# The relative folder where the circuit, proving and verification key for RLN can be found
# Note that resources has to be compiled with respect to the above MerkleTreeDepth
RlnResourceFolder* = "vendor/zerokit/rln/resources/tree_height_" & $MerkleTreeDepth & "/"
RlnResourceFolder* = "tree_height_" & $MerkleTreeDepth & "/"
# temporary variables to test waku-rln-relay performance in the static group mode
const
@ -53,5 +53,5 @@ const MaxClockGapSeconds* = 20.0 # the maximum clock difference between peers in
const MaxEpochGap* = uint64(MaxClockGapSeconds/EpochUnitSeconds)
# RLN Keystore defaults
const
const
RLNAppInfo* = AppInfo(application: "nwaku-rln-relay", appIdentifier: "01234567890abcdef", version: "0.1")