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

Duplicated CSR's #2321

Closed
kingalg opened this issue Feb 29, 2024 · 4 comments · May be fixed by #2433
Closed

Duplicated CSR's #2321

kingalg opened this issue Feb 29, 2024 · 4 comments · May be fixed by #2433
Assignees
Labels
2.2.0 bug Something isn't working desktop security

Comments

@kingalg
Copy link
Collaborator

kingalg commented Feb 29, 2024

Version: 2.1.2-alpha.x (there were several alphas to test pipelines that day)
System: all

Issue: too many CSRs (that are duplicates) are generated after fulfilling specific conditions. Below, you can see a peer count of 387 when, in reality, there were under 10 (and it's correctly listed on the frontend).

Screenshot 2024-02-29 at 11 27 11 Screenshot 2024-02-29 at 11 31 42

Steps to recreate:

  • Have a community with minimum 3 users (let's call them one, two and three)
  • With another Quiet try to join as user "one"
  • You will get a popup indicating that this username is already taken - try choosing username "two", app will let you do this (it should also be fixed)
  • Type something as user two, restart the app, you will get popup "username already taken" again - choose username "one"
  • Repete it several times, adding the username "three" as well, and after 5-6 rounds, you will see that the username is not changing anymore when you are typing something in a conversation and that CSR's count is way too high in logs.
@kingalg kingalg added bug Something isn't working desktop labels Feb 29, 2024
@ikoenigsknecht ikoenigsknecht self-assigned this Mar 25, 2024
@ikoenigsknecht
Copy link
Collaborator

This appears to have just been an issue with replication. I added a ton of logging and tried tracing the actions of the CSR store and found that the CSR was being stored correctly on the identity and in the orbitdb store but once it synced with another peer it got into a confused state. This created a weird infinite loop because it kept creating a new CSR, stored it locally, and then got and update from the peer that conflicted with the local state and thought the CSR wasn't stored thus trying again.

The solution was simply to run store.load() on init to get the current state into memory before potentially replicating.

@holmesworcester
Copy link
Contributor

holmesworcester commented Mar 30, 2024

What was the nature of the confused state, and where was that happening?

Also, is this the same problem you saw with duplicate peerid's?

@holmesworcester
Copy link
Contributor

@ikoenigsknecht is this ready to be merged? if so let's merge it!

@kingalg
Copy link
Collaborator Author

kingalg commented Apr 25, 2024

Version: 2.2.0-alpha.2
[email protected] | iOS 371
System: all

Fixed.

@kingalg kingalg closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.2.0 bug Something isn't working desktop security
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants