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 precompiled resources w/ rln #1578

Merged
merged 5 commits into from
Mar 13, 2023
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
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions waku/v2/protocol/waku_rln_relay/constants.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")