Skip to content

Conversation

@stubbsta
Copy link
Contributor

@stubbsta stubbsta commented Nov 28, 2025

Description

Bumping waku-rlnv2-contract repo to latest commit. This is to fix the CI tests getting stuck on contract deployment.

Changes

Use waku-rlnv2-contract commit 8a338f354481e8a3f3d64a72e38fad4c62e32dcd
The updated contract emits additional events at registration. The method of retrieving the Membership registered event was updated in the group_manager.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3651

Built from 6a6b065

@stubbsta
Copy link
Contributor Author

stubbsta commented Dec 2, 2025

related issue: #3654

@stubbsta stubbsta force-pushed the chore/bump-wakurlnv2contract-repo-commit branch from 8eef4d5 to 33ebeb9 Compare December 2, 2025 17:47
@stubbsta
Copy link
Contributor Author

stubbsta commented Dec 3, 2025

TODO:

  • Add test to deploy contracts and dump state file - to be used when there are updates to the contract repo
  • Add new runAnvil params to all tests that use it

Copy link
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks so much indeed! 💯 🥳

I'm adding some nitpicks that I hope you find useful.

Also:

  • Kindly link this PR with maintenance issue (see how other are linked.)

  • If possible, it would be interesting to push the tests/waku_rln_relay/anvil_state/state-deployed-contracts-mint-and-approved.json file zipped/compressed so that we keep the repo small when cloning

  • I think is also interesting to reduce the timeout-minutes: 90 to 45 in .github/workflows/ci.yml

Comment on lines +31 to +34
const DEFAULT_ANVIL_STATE_PATH* =
"tests/waku_rln_relay/anvil_state/state-deployed-contracts-mint-and-approved.json"
const TOKEN_ADDRESS* = "0x5FbDB2315678afecb367f032d93F642f64180aa3"
const WAKU_RLNV2_PROXY_ADDRESS* = "0x5fc8d32690cc91d4c39d9d3abcbd16989f875707"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly add a comment describing each item

return

# mint the token from the generated account
discard await sendMintCall(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe aside from PR but, if always discard, maybe we can just make sendMintCall return nothing?

let tokenApprovalResult = await approveTokenAllowanceAndVerify(
web3, acc, privateKey, testTokenAddress, contractAddress, ethToWei(200.u256)
)
assert tokenApprovalResult.isOk, tokenApprovalResult.error()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nitpick sorry, verbs with parenthesis, and noun without :)

Suggested change
assert tokenApprovalResult.isOk, tokenApprovalResult.error()
assert tokenApprovalResult.isOk(), tokenApprovalResult.error

int(await ethRpc.provider.eth_gasPrice()) * 2
let idCommitmentHex = identityCredential.idCommitment.inHex()
info "identityCredential idCommitmentHex", idCommitment = idCommitmentHex
debug "identityCredential idCommitmentHex", idCommitment = idCommitmentHex
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that by default we are using INFO ( not saying this is wrong .)

Comment on lines +274 to +279
if membershipRegisteredLog.isNone():
raise newException(
ValueError, "register: MembershipRegistered event not found in transaction logs"
)

let registrationLog = membershipRegisteredLog.get()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, let's better use valueOr or isOkOr :)

Suggested change
if membershipRegisteredLog.isNone():
raise newException(
ValueError, "register: MembershipRegistered event not found in transaction logs"
)
let registrationLog = membershipRegisteredLog.get()
let registrationLog = membershipRegisteredLog.valueOr:
raise newException(
ValueError, "register: MembershipRegistered event not found in transaction logs"
)

Copy link
Contributor

@fcecin fcecin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants