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

bug: RLN flags issues #2763

Open
AlejandroCabeza opened this issue Jun 3, 2024 · 6 comments
Open

bug: RLN flags issues #2763

AlejandroCabeza opened this issue Jun 3, 2024 · 6 comments
Labels
effort/hours Estimated to be completed in a few hours

Comments

@AlejandroCabeza
Copy link
Contributor

Background

According to the "RLN Relay Configuration and Parameters" block in RLN's Test Plan, which are based on the RLN specs, there are some flags that can't be tested.

Details

Here goes a snippet of the aforementioned block that includes a brief description of the issue:

2. **RLN Relay Configuration and Parameters:**
    3. **RLN Relay Membership Index (`rln-relay-membership-index`)**: Confirm the correct usage of the on-chain commitment index.
        - Setting `rlnRelayCredIndex` in `WakuRlnConfig` doesn't fetch the keys in the keystore. Although this might be a symptom, and not the actual issue.
    5. **RLN Relay Identity Key Configuration (`rln-relay-id-key`)**: Validate the correct application of the RLN relay identity secret key from the provided Hex string.
        - `rlnRelayIdKey` flag is not used
    6. **RLN Relay Identity Commitment Key Configuration (`rln-relay-id-commitment-key`)**: Ensure the correct usage of the RLN relay identity commitment key from the Hex string.
        - `rlnRelayIdCommitmentKey` flag is not used
    9. **RLN Relay Ethereum Private Key (`rln-relay-eth-private-key`)**: Validate the use of the private key for broadcasting transactions on the Ethereum network.
        - `rlnRelayIdCommitmentKey` is not passed to `WakuRlnConf`
    10. **RLN Relay Credential Password (`rln-relay-cred-password`)**: Check the encryption of RLN credentials using the specified password.
        - `WakuRlnRelay.init` fails if used. Might be a similar situation to 3: not cause, but "symptom".
    11. **RLN Relay Merkle Tree Path (`rln-relay-tree-path`)**: Verify the correct configuration and usage of the path to the RLN Merkle tree database.
        - `WakuRlnRelay.init` fails if used. Might be a similar situation to 3: not cause, but "symptom".

Acceptance criteria

What's expected out of each of those flags?

@AlejandroCabeza AlejandroCabeza changed the title chore: RLN flags unused chore: RLN flags issues Jun 3, 2024
@AlejandroCabeza AlejandroCabeza changed the title chore: RLN flags issues bug: RLN flags issues Jun 3, 2024
@gabrielmer gabrielmer added the effort/hours Estimated to be completed in a few hours label Jun 4, 2024
@rymnc
Copy link
Contributor

rymnc commented Jun 5, 2024

2,5,6 are deprecated. as i remember, they were to be removed after 2 releases after deprecation

@rymnc
Copy link
Contributor

rymnc commented Jun 5, 2024

9 is used in the keystore generator subcommand for wakunode2

@rymnc
Copy link
Contributor

rymnc commented Jun 5, 2024

10 and 11 work as intended, can you share a trace of the error you get if you use it?

@rymnc
Copy link
Contributor

rymnc commented Jun 5, 2024

3 is interesting, investigating

@rymnc
Copy link
Contributor

rymnc commented Jun 5, 2024

rlnRelayCredIndex

if g.membershipIndex.isSome():
keystoreQuery.treeIndex = MembershipIndex(g.membershipIndex.get())

called from

groupManager = OnchainGroupManager(
ethClientUrl: string(conf.rlnRelayethClientAddress),
ethContractAddress: $conf.rlnRelayEthContractAddress,
rlnInstance: rlnInstance,
registrationHandler: registrationHandler,
keystorePath: rlnRelayCredPath,
keystorePassword: rlnRelayCredPassword,
membershipIndex: conf.rlnRelayCredIndex,
onFatalErrorAction: conf.onFatalErrorAction,
)

called from

let rlnConf = WakuRlnConfig(
rlnRelayDynamic: conf.rlnRelayDynamic,
rlnRelayCredIndex: conf.rlnRelayCredIndex,
rlnRelayEthContractAddress: conf.rlnRelayEthContractAddress,
rlnRelayEthClientAddress: string(conf.rlnRelayethClientAddress),
rlnRelayCredPath: conf.rlnRelayCredPath,
rlnRelayCredPassword: conf.rlnRelayCredPassword,
rlnRelayTreePath: conf.rlnRelayTreePath,
rlnRelayUserMessageLimit: conf.rlnRelayUserMessageLimit,
rlnEpochSizeSec: conf.rlnEpochSizeSec,
onFatalErrorAction: onFatalErrorAction,
)

@AlejandroCabeza
Copy link
Contributor Author

9 is used in the keystore generator subcommand for wakunode2

Well, now I found it. The day of posting I wasn't able to.

10 and 11 work as intended, can you share a trace of the error you get if you use it?

Error: failed to mount WakuRlnRelay: could not initialize the group manager: the commitment does not have a membership
You can reproduce it in branch tests/rln, file tests/node/test_wakunode_relay_rln.nim. Uncomment the last two lines of proc getWakuRlnConfigOnChain, lines 94 and 95, so the WakuRlnConfig contains rlnRelayCredPath and rlnRelayCredPassword.

#2763 (comment)

What do you mean to point out with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to be completed in a few hours
Projects
Status: To Do
Development

No branches or pull requests

3 participants