-
Notifications
You must be signed in to change notification settings - Fork 53
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
chore(rln-relay-v2): use rln-v2 contract code #2381
Conversation
You can find the image built from this PR at
Built from 4ec1d8f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for it! 💯
I just added a question and a nitpick comment ;P
debug "Initial account balance: ", balance | ||
|
||
# deploy registry contract with its constructor inputs | ||
let receipt = await web3.deployContract(RegistryContractCode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only difference between the two branches of the when defined(rln_v2)
. Thereafter, I think is better to perform the when
validation in a narrower scope instead of duplicating so much code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will make that change 👍
wanted to make it easier to transition from v1 to v2 by deleting whole functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in b05815e
let contractAddress = receipt.contractAddress.get() | ||
debug "Address of the deployed registry contract: ", contractAddress | ||
# deploy registry contract with its constructor inputs | ||
let receipt = await web3.deployContract(RegistryContractCode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following my previous comment, this is the only diff (and its parameters.) Let's reduce the when
scope if possible :)
@@ -134,6 +138,10 @@ $(LIBRLN_FILE): | |||
|
|||
librln: | $(LIBRLN_FILE) | |||
$(eval NIM_PARAMS += --passL:$(LIBRLN_FILE) --passL:-lm) | |||
ifeq ($(RLN_V2),true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the impression that we won't test this in our CI. Shall we switch it manually in the future? To elaborate a bit more, I think we'd need to adapt the following somehow in the future:
nwaku/.github/workflows/ci.yml
Line 121 in bb58a63
make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 POSTGRES=1 test testwakunode2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, at the moment rln-v2 is unstable in nwaku. when it's at a better state I'll add the flag similar to how we had it for experimental builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
This PR adds rln-v2 contract code into the waku_rln_relay/contract.nim file
This PR also feature flags it with
rln_v2
and updates the Makefile entry for conditional compilation as well.Changes
rln_v2
rln_v2
in tests and contract.nimIssue
closes #2375