Giter Site home page Giter Site logo

tryquiet / quiet Goto Github PK

View Code? Open in Web Editor NEW
1.8K 1.8K 76.0 487.85 MB

A private, p2p alternative to Slack and Discord built on Tor & IPFS

Home Page: https://www.tryquiet.org

License: GNU General Public License v3.0

JavaScript 0.62% TypeScript 27.69% HTML 0.09% Dockerfile 0.04% Shell 0.07% Makefile 0.01% Starlark 0.01% Java 0.04% Kotlin 0.31% Swift 0.08% Ruby 0.01% Objective-C 0.15% Python 0.63% CMake 0.02% C 58.44% C++ 11.68% Objective-C++ 0.08% ASL 0.04%
chat collaboration decentralized discord-alternatives ipfs local-first p2p privacy slack-alternative

quiet's People

Contributors

agiledev24 avatar aleksey28 avatar alexandermoskovkin avatar andreybelym avatar dependabot[bot] avatar dinek007 avatar emim avatar euzebe avatar farfurix avatar holmesworcester avatar ikoenigsknecht avatar jkdev601 avatar josephlacey avatar joshuef avatar kacper-rf avatar kingalg avatar kowalski avatar leblowl avatar miherlosev avatar ndshal avatar norbertbodziony avatar pdurbin avatar rajdip-b avatar richardtorres314 avatar siepra avatar steveetm avatar tylerchilds avatar ulisesgascon avatar vasilystrelyaev avatar vinkabuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quiet's Issues

Cannot click on user modal to initiate DM

Steps to reproduce:

  1. Click on a username in #zbay channel

Expected: can click button in modal to DM.
Actual: it is inactive / grayed out, even though the user is registered

Users should not be able to spam arbitrary edits to DBs (DoS vector)

Right now, any member of the community can add arbitrary entries to any orbitdb, including the user table, the channel list, DM threads that don't belong to them, etc.

We should add orbitdb access control to confirm that users can only edit the databases in ways that are intended, and that all other edits are ignored by other peers.

Examples:

  1. User table should only be writable by owner (this does not require a custom access controller, I don't think)
  2. Only owner should be able to delete channels. Users should be able to add channels but not delete them.
  3. Users should not be able to add invalid data to the channel list.
  4. Only the participants of a DM thread should be able to write messages to that thread. (This might not need custom access control either)
  5. Users should not be able to write invalid messages to any channel.
  6. There should be a size limit on messages.
  7. The owner should not be able to add invalid data to the user table.

Question: are there any other tables I'm forgetting about here?

Release candidate should build and auto-update for all changes to develop

Since we're actively dogfooding an internal testing version, and since we're focusing more on testing right now than QA, let's do automatic updates for every change that gets pushed to the develop branch.

This will also encourage folks to really try to catch any issues with tests before merging.

Libp2p does not handle tor connection problem

We knew that libp2p is trying to reconnect in case of failed connections, but there is at least one tor problem that does not disappear itself.

https://www.reddit.com/r/TOR/comments/a1vyxt/closed_1_streams_for_service_scrubbedonion_for/

waggle:tor Nov 16 10:01:40.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
waggle:tor +15s
waggle:tor Nov 16 10:01:56.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
waggle:tor +16s
waggle:tor Nov 16 10:02:12.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
waggle:tor +17s
waggle:tor Nov 16 10:02:27.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
waggle:tor +15s
waggle:tor Nov 16 10:02:44.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
waggle:tor +16s
waggle:tor Nov 16 10:02:58.000 [notice] Closed 1 streams for service [scrubbed].onion for reason resolve failed. Fetch status: No more HSDir available to query.
waggle:tor +14s

User should be able to see when someone new joins a community

In Zbay we had a notification that a user had been added to a community. In Quiet we should add this back.

Two options (I think #2 is the right choice because it's so simple, but it's not the best)

  1. We could do it the way we did it before, where there was a special kind of message that displayed in the channel (should be #general i think) when we see that a new user has been added. This would appear as coming from a "bot" called "Quiet" with the Quiet logo, and we could use it for other meta level messages.

  2. We could have the owner/registrar send the message "@username joined community-name" to the #general channel after they complete the process of adding that user. We do something like this already for new channel creation.

The second is less good because the owner can spoof that message just by typing it, even when they did not add a user. But it's also really simple. And it reinforces that the owner is the one responsible for adding people.

Community owner should store their root CA offline, sign with an intermediate CA, and be able to restore root CA from paper backup

Right now we're signing certificates with the root CA. Standard practice is to keep the root CA online as little as possible and sign with an intermediate CA. We should do this.

Owner should be able to:

  1. Back up the community CA (which is subsequently forgotten on the device) with a seed phrase.
  2. Restore this backup, revoking their old intermediate CA, and re-signing user certificates one by one, or re-inviting people (How will this work?)
  3. Be the owner of the community again.

User registration should take ~2 seconds or less

Right now user registration can take 20 or 30 seconds or more sometimes.

From Emi:

"I noticed that sometimes user registration takes a long time. I think this is happening because before saving cert to db we iterate over certificates and parse them to check if username exists. Worst case scenario we iterate to the end of log-db. I saw in the logs that this can take a while."

We should figure out what the issue is. It should be almost instantaneous, no?

Determine whether delivering a snapshot to a user speeds up syncing process, relative to latest orbitdb

Right now we suspect that delivering a snapshot to a user speeds up the syncing process, but we don't know if this is true, or by how much.

We should find out how much making a snapshot on request for a new user and delivering it to the user speeds up initial message sync.

to be clear we are measuring snapshot creation time plus time to send and parse snapshot, not just the latter.

It's potentially okay if snapshots are partially working, since if they speed things up while partially working we can assume they speed things up even more when working completely.

We should compare create snapshot + sync from snapshot to regular syncing in the latest (master) orbitdb.

User should see warning if registration server "lies" and gives the same name to two distinct users/keys.

Right now, we trust that the registrar is honest and doesn't impersonate people, or let two users register the same username.

If we ever see two users with the same username, we should:

  1. Show a full-screen warning to the user who sees this. The message should continue to display in some way when the user closes their screen.

  2. Broadcast a message containing the proof of equivocation to all other users to be sure everyone sees the equivocation, e.g. in the case the message was sent in a DM or on a private channel such that it would not be visible to all participants. We should make sure there is a way to do this without sharing message contents.

This behavior should work on desktop and mobile, and it's critical, so at least some of it should be shared code.

(We've talked about breaking out the encryption and identity bits of waggle into a shared library.)

This ticket shouldn't be closed until there's a corresponding ticket created for implementing this in ZbayMobile

Zbay crashes on every restart following initial internal restart for entropy.

The instructions within the application said that it should take a bit less than an hour, and to more securely anchor the installation I should click to restart it and then everything should be optimum.

OS = Win 10/64
Zbay version (unable to check, but installed about two hours ago).

I installed Zbay. I take my time reading and looking over, and noting that it didn't say 'beta' anywhere decided to set it up and give it a try.

I couldn't find anywhere to set it to use TOR by default for private messages, and read where it suggested closing and relaunching to achieve I guess, maximum entropy?

Anyway, when I clicked to let it close and reopen I got errors which it wanted to send to the dev team, and then locked me out. It won't successfully launch at all now, and keeps coming up with the error which I grant access for it to report.

I did not fund it, although I was ready to right after that reboot. At this point it looks like I'll need to uninstall and reinstall but nowhere did I see a place to restore using my private paper recovery phrases.

Enable mentions for inputs in community channels

ChannelInputComponent takes [{ nickname: string }] as 'users' param in order to display mentions by typing in '@'.
There is a need to get list of channel participants, e.g. by combining peerList (community) with certificatesMapping and pass it to the component

add channel saga

channel saga should be shared. This part of store is responsible for keeping information about unread messages, keeps an input value etc

Couldn't send from docker zbay to host zbay

Emi had two Zbays running, one running release candidate in a docker and one running develop branch locally.

The local one could not see messages from the docker one. Other Zbay users could see messages from both.

Theories about why this was happening:

One hypothesis: local was not connected to docker directly and messages aren't propagating correctly across peers who aren't directly connected.

I'm not sure how hard this is to reproduce, but it probably will take a few tries. We might just need to write a lot of tests that vary when peers come on and offline, and who is connected to whom.

User should be able to create a new public channel

Any user should be able to do this. In the future we might limit it to channel owners or add limits on the number of channels someone can add.

Channel names should have the same validation rules as usernames.

@ mentions for notifying someone

steps:

  1. @ mention someone

expected:

  1. user selector appears with autocomplete
  2. name is highlighted for sender
  3. name is highlighted for recipients
  4. user gets a notification of the mention on desktop or mobile
  5. in notification settings you can choose to be notified only of @ mentions and DMs.

Error is thrown sometimes while closing Zbay (IPFS - ''ERR_NOT_STARTED")

NotStartedError: not started
    at Function.use (/home/rf/dev/zbay/waggle/node_modules/ipfs-core/src/utils/service.js:155:15)
    at Service.use (/home/rf/dev/zbay/waggle/node_modules/ipfs-core/src/utils/service.js:201:26)
    at peers (/home/rf/dev/zbay/waggle/node_modules/ipfs-core/src/components/pubsub.js:133:38)
    at Object.peers (/home/rf/dev/zbay/waggle/node_modules/ipfs-core-utils/src/with-timeout-option.js:20:46)
    at checkPeers (/home/rf/dev/zbay/waggle/node_modules/ipfs-pubsub-1on1/src/wait-for-peers.js:5:37)
    at Timeout._onTimeout (/home/rf/dev/zbay/waggle/node_modules/ipfs-pubsub-1on1/src/wait-for-peers.js:17:19)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7) {
  code: 'ERR_NOT_STARTED'
}

Registered usernames that are duplicates or invalid should trigger aggressive warning

We should validate that data written to the user table meets our criteria, and show an aggressive warning if it does not.

  1. All users should validate that username entries are correct, by the same criteria as the registrar frontend (alphanumeric, character limits, etc.)
  2. All users should validate that there are not duplicate username registrations.
  3. Seeing a message from a user with a duplicate registration signed by the admin should trigger a warning, even if there is only one registration in the user table. This does not apply to unregistered users, or an unregistered user having the same name of a registered user. This aggressive warning should only show when we have two messages from registered users signed by different public keys with the same name.
  4. The warning should show on startup or, in the future, whenever someone switches to the community.
  5. The warning should include a "leave community" button.

https://www.figma.com/file/TV9pF84Ob8pLYRLu83gNol/Joining-when-owner-is-offline?type=design&node-id=311-6979&mode=design&t=eS9WDLYpQNod1Acl-4

Image

Libp2p connection problem. Wrong common name

waggle:libp2p:err Could not connect to discovered peer QmV1D4RtapSnCfBbahhkApPwK4WiDqMJS3BcEjXz9GZv7S AggregateError:
Error: Hostname/IP does not match certificate's altnames: Host: dtwy5lwyzf3we6jnjq72nsyqkfw27bibvrfheshxydbcbyy7u6tpf6ad.onion. is not cert's CN: hbq5s7o6omo6raevbhkl6rqlut5dzdzzhohg57veesq2opin4ccoioid.onion
at Array.map ()
at maybeSettle (/home/bart/Code/zbay/nectar/node_modules/p-some/index.js:31:11)
at /home/bart/Code/zbay/nectar/node_modules/p-some/index.js:69:23
at maybeSettle (/home/bart/Code/zbay/nectar/node_modules/p-some/index.js:31:11)
at /home/bart/Code/zbay/nectar/node_modules/p-some/index.js:69:23
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
name: 'AggregateError'
} +0ms

Set timeout for github actions

Look at this build: it consumed 6 hours of CI time, because its the default timeout. Set this to something that makes sense.

Zbay and Tor performance issues in Apple Silicon

A user with Apple Silicon is reporting high CPU usage for both Zbay and Tor.

This is expected, according to Electron folks: https://www.electronjs.org/blog/apple-silicon

We can build an arm64 version of Zbay, and then we can make a universal binary (both versions stuck together) using this: https://github.com/electron/universal

I think we should do this soon given that performance issues are something we really need to stamp out, and given that many users will have recent macs.

It would be great to have performance tests run in CI on Apple M1 hardware.

Also, see: electron/electron#26710 for some possibly helpful information about electron-builder not being the officially supported tool. They recommend electron-forge.

Reaching user registration screen should take ~2 seconds or less

Right now it takes about 23 seconds before a first-time user reaches the registration screen.

This feels too long. In the logs, it looks like the step where the user registration screen displays is:

subscribeForAllConversations: 0.018ms
Sending back 2 certificates
initAllConversations: 19.686ms
Message replicated
Sending back 4 certificates

...so the user is syncing even before the user registration screen displays? Why not display it right away on app startup?

Do we even need to be connected to the network to show the user registration screen? The user can take their time choosing a name, and we can spin up Tor etc while they're doing that.

Then they just need to connect to the registrar via Tor right?

In the model we're moving towards, they won't even know which network they're connecting to when the app starts. They'll paste in an invite link or start their own network. We can still start a Tor hidden service and libp2p though, while we wait for them to decide.

Support CRL (certificate revocation list)

  • owner of root key should control the CRL list
  • CRL should be either a seperate channel or a different kind of message on "user certficate channels" (whichever seems more convenient)
  • CRL should be respected in WebsocketOverTor.
    • if either server or client certificate is on CRL the connection handshake should not succeed
    • mind that CRL can be update after we have started listening (on websocket) and we need to also respect changes made since than
  • certificates should be disregarded from CRL when they are passed their expiration date (NotAfter field)
  • when certificate is added to CRL, each connected peer should actively disconnect from it (check peerId of connections it has and hang up connection if connected to the peer being expelled)

Collection of UX consistency issues around name registration, new channel, channel post.

Hi, just launched Zbay Lite. Great work!

rambling story with UX paper cuts

After launching Zbay Lite for the first time, it asks for a name I'd like to register, and I entered zecnate. So far so good.

The main screen appears and I start exploring it. Then I realize up at the top it says @anon<NNN>, and I think "huh, but I thought I registered a name". I click that, see an option to register, then go to do so. I re-enter the same name, and it mentions I need to add funds.

I go to add funds, I get a zaddr. I can't find the QR Code button for the zaddr. Why isn't there one? (Aside: why is the shielded address second and hidden behind a drop-down?) I use a commandline tool to generate a QR code then send some funds to that address.

It takes Zbay a while to show the pending funds. (This doesn't surprise me, but I figure it would confuse non-blockchain-savvy users.)

However, over the next while, the pop-out over the "add funds" button keeps appearing prompting me to add funds. But I've already done so, I'm just waiting for them to confirm.

After a while I see my name registration appear in the #zbay channel. Yay!

However, now I can't post to that channel. In fact, sometimes I see a text input widget, and sometimes I do not. I've typed text into the widget, but I can't hit enter and there's no send button.

I try creating a new channel and I'm able to do so after a few tries. After that, it looks like my balance is pending again.

Generalization of the Issues

Generally it seems like I need to try actions a few times and the response is inconsistent depending on sync state or confirmation of transfers. Whenever something is pending, I can easily get confused because when I try an action I don't see an immediate response.

Follow up

I apologize for jumbling together multiple issues in a rambling story, just trying to get this all down on paper. If you'd like to suggest specific tests I can run those, and potentially file separate tickets for separate more precise issues.

UX brainstorms

It might be helpful to have a "pending actions" widget that shows a queue. Example:

[cute yet unobtrusive spinner...]
1. registering `@zecnate` - status: waiting for transaction confirmation.
2. create channel `#zcash-dev` - status: waiting for funds.

It might also be nice to have a separate "busy indicator" whenever we're waiting for zecwallet-lite to do some operation.

Keep up the good work! I hope I can ditch slack sooner or later. :-D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.