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-relay) chat2 displays zero'd keys #1221

Closed
fryorcraken opened this issue Oct 4, 2022 · 8 comments
Closed

bug: (rln-relay) chat2 displays zero'd keys #1221

fryorcraken opened this issue Oct 4, 2022 · 8 comments
Labels
bug Something isn't working track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications

Comments

@fryorcraken
Copy link
Collaborator

Problem

When starting chat2 with existing RLN credentials, it shows the following message:

 setting up waku-rln-relay in on-chain mode... 
your membership index is: 0
your rln identity key is: 0000000000000000000000000000000000000000000000000000000000000000
your rln identity commitment key is: 0000000000000000000000000000000000000000000000000000000000000000

Instead of the passed RLN Credentials

Impact

Confusion for the user as message sent seem to have a proof attached:

>> hello there
witness generation took: 24.97ms
proof generation took: 99.30ms
--rln epoch: 166486172
<Oct 04, 16:35> nwaku-fr: hello there

To reproduce

./build/chat2 --fleet=none \
    --content-topic=/toy-chat/2/luzhou/proto \
    --ports-shift=1 \
    --rln-relay=true \
    --rln-relay-dynamic=true \
    --rln-relay-eth-contract-address=0x367F3e869cF2E1DD28644E308b42652cb6fcDA72 \
    --staticnode="/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAkyQAiEgZgX899dHFgjdooCUXN2zsQPHcy9D6LbX3SCEXA" \
    --rln-relay-eth-client-address=wss://goerli.infura.io/ws/v3/<use your own token please> \
    --rln-relay-membership-index=53 \
    --rln-relay-id-key=<use your own creds please> \
    --rln-relay-id-commitment-key=40ece25c725b15423b1d1acc299753fe196cdd593434c8025876dcf6de84c62a \
    --rln-relay-eth-account-address:0xC4E45C1423Ebf3Ab780a2DACf687c5Dfb2cC3594

nwaku version/commit hash

7874644

Built with RLNZEROKIT=true

@fryorcraken fryorcraken added bug Something isn't working track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications labels Oct 4, 2022
@staheri14
Copy link
Contributor

staheri14 commented Oct 4, 2022

--rln-relay-membership-index=53
--rln-relay-id-key=
--rln-relay-id-commitment-key=40ece25c725b15423b1d1acc299753fe196cdd593434c8025876dcf6de84c62a

Thanks for reporting the issue! These set of parameters are deprecated, the rln credential is supposed to be re-used using the credential file path --rln-relay-cred-path.

@staheri14
Copy link
Contributor

Can you please check it with the credential path and let me know if there is still any issue? We shall remove those config options to avoid confusion.

@staheri14
Copy link
Contributor

staheri14 commented Oct 4, 2022

The fix would be to remove those config options i.e.,

--rln-relay-membership-index 
--rln-relay-id-key 
--rln-relay-id-commitment-key 

@fryorcraken
Copy link
Collaborator Author

These set of parameters are deprecated

Shall it be removed then?

the rln credential is supposed to be re-used using the credential file path --rln-relay-cred-path.

How do I generate the file? what format does it have?

@staheri14
Copy link
Contributor

staheri14 commented Oct 5, 2022

No need to generate, you only need to pass a path to the file, the code will generate it for you. e.g., --rln-relay-cred-path=. which is the root directory.
Please also see this https://github.com/status-im/nwaku/blob/master/docs/tutorial/onchain-rln-relay-chat2.md#how-to-persist-and-reuse-rln-credential

@staheri14
Copy link
Contributor

Shall it be removed then?

Yes, for sure.

@fryorcraken
Copy link
Collaborator Author

No need to generate, you only need to pass a path to the file, the code will generate it for you. e.g., --rln-relay-cred-path=. which is the root directory. Please also see this master/docs/tutorial/onchain-rln-relay-chat2.md#how-to-persist-and-reuse-rln-credential

Is there an RFC for this format (see vacp2p/rfc#543)?

@rymnc
Copy link
Contributor

rymnc commented Oct 13, 2022

Fixed in #1258

@rymnc rymnc closed this as completed Oct 13, 2022
@rymnc rymnc moved this to Done in Vac Research Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications
Projects
None yet
Development

No branches or pull requests

3 participants