Commit Graph

244 Commits

Author SHA1 Message Date
Tanner Shaw
ed2641036a refactor(documentation) refactored all docs to JSDocs 2023-08-24 14:40:19 -05:00
Tanner Shaw
bc3ac887bf feature(documentation) added extra documentation for endpoints and messages 2023-08-24 12:46:49 -05:00
Tanner Shaw
1e90eccc62 feature(documentation) in-line documentation for messages and message collisions 2023-08-24 12:26:12 -05:00
Tanner Shaw
92b5773a88 feature(documentation) express endpoints and helper functions documentation 2023-08-24 12:07:01 -05:00
Tanner Shaw
98d8b3c86e Merge branch 'main' into documentation 2023-08-24 10:31:05 -05:00
Tanner Shaw
9c2dead479 feature(documentation) inline-documentation for express routes 2023-08-24 10:29:35 -05:00
AtHeartEngineer
fa1b349c42 fix(messages) message epochs and message reverse order (#49) 2023-08-23 20:17:31 -04:00
AtHeartEngineer
dde95f7e63 Merge branch 'main' into rate-commitment 2023-08-23 20:16:01 -04:00
Tanner Shaw
19a705fa37 fix(messages) message epochs and message reverse order 2023-08-23 19:15:54 -05:00
AtHeartEngineer
0eab85f909 fix(express) fetching rooms bug (#48) 2023-08-23 20:04:45 -04:00
AtHeartEngineer
6a8ad6d675 Merge branch 'main' into rate-commitment 2023-08-23 20:04:26 -04:00
AtHeartEngineer
a4e9326b6d Refactor endpoint initialization code (#47)
- Refactored code in the `initEndpoints` function to improve readability
and organization.
- Consolidated duplicate code blocks and removed unnecessary setTimeout
calls.
- Updated logging and error handling for better debugging and error
messages.
- Added comments to explain the purpose of certain code blocks.
2023-08-23 20:04:22 -04:00
AtHeartEngineer
43322e3e4c Merge branch 'main' into rate-commitment 2023-08-23 20:04:22 -04:00
Tanner Shaw
97052ea0fc fix(express) fetching rooms bug 2023-08-23 19:04:06 -05:00
AtHeartEngineer
760b4397bd Refactor endpoint initialization code
- Refactored code in the `initEndpoints` function to improve readability and organization.
- Consolidated duplicate code blocks and removed unnecessary setTimeout calls.
- Updated logging and error handling for better debugging and error messages.
- Added comments to explain the purpose of certain code blocks.
2023-08-23 20:03:20 -04:00
AtHeartEngineer
480a95ffbe Added Rate Commitment hasher (#46)
Anywhere we are adding/accessing an identity commitment, we need to
replace it with the hash of the identityCommitment and the
userMessageLimit together.

Here is how to use the hasher I added:
```ts
getRateCommitmentHash(
  BigInt(identityCommitment),
  BigInt(room.userMessageLimit ? room.userMessageLimit : 1)
).toString()
```

We need to add this to `addIdentityToIdentityListRooms` and
`addIdentityToBandadaRooms` when users join.

We also need to add this to the `/rooms/:idc` route, where we have to
hash the idc with every rooms `userMessageLimit` to see what rooms they
are in. (OR we can make another database model to map identity
commitments to rooms, this is probably smarter and would prevent someone
from trying to DDOS our server just by requesting what rooms they are
in, hashing takes a decent bit of CPU when you do it a lot).
2023-08-23 19:53:48 -04:00
AtHeartEngineer
dbf2b9add9 Update src/data/db.ts
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-23 19:53:46 -04:00
Tanner Shaw
d0ec4ec831 refactor(RLN) refactored removing identities to also update rate commitments 2023-08-23 18:52:19 -05:00
Tanner Shaw
39bb7b5559 Merge branch 'rate-commitment' of github.com:Discreetly/server into rate-commitment 2023-08-23 18:35:32 -05:00
Tanner Shaw
1ac00d722b feature(express) added route to create codes for many rooms or all rooms 2023-08-23 18:35:25 -05:00
AtHeartEngineer
a1dcba49a7 Refactor seed.ts to include additional room creations 2023-08-23 17:49:52 -04:00
Tanner Shaw
b4cfdf1ef4 fix(interface) small camelcase error 2023-08-23 14:41:18 -05:00
Tanner Shaw
8ac7d850e2 Merge branch 'rate-commitment' of github.com:Discreetly/server into rate-commitment 2023-08-23 14:39:18 -05:00
Tanner Shaw
290f177938 feature(express) added route to generate new codes for rooms 2023-08-23 14:39:11 -05:00
AtHeartEngineer
71db8c69f5 Update "discreetly-interfaces" to version 0.1.37 and add new message field in room endpoint. 2023-08-23 15:11:03 -04:00
Tanner Shaw
0ba8cee207 chore(identities) turned verifier identities back to identities 2023-08-23 13:07:19 -05:00
Tanner Shaw
968ac66a3d refactor(identities) rooms now have semaphoreIdentities and hashed identities 2023-08-23 12:26:46 -05:00
AtHeartEngineer
ac3b728404 Added Rate Commitment hasher 2023-08-23 08:00:52 -04:00
AtHeartEngineer
b866750828 refactor(messages) making createMessage into a promise to resolve pro… (#45)
…ofing and collision issues
2023-08-22 17:54:00 -04:00
Tanner Shaw
9f2bb5185d refactor(messages) making createMessage into a promise to resolve proofing and collision issues 2023-08-22 16:45:20 -05:00
AtHeartEngineer
15a4270582 chore(cleanup) cleaning up console logs (#43) 2023-08-22 15:50:57 -04:00
AtHeartEngineer
942905f654 Merge branch 'main' into clean-up 2023-08-22 15:50:40 -04:00
Tanner Shaw
8be6d53e09 fix(express) await handling joining identity list rooms 2023-08-22 14:29:41 -05:00
AtHeartEngineer
6e2e5906a7 Fix verifier (#44) 2023-08-22 14:57:05 -04:00
AtHeartEngineer
4a75ce181a Merge branch 'main' into fix-verifier 2023-08-22 14:56:45 -04:00
e25052504e fix not checking group root 2023-08-22 14:56:08 -04:00
bb6dd2e2ef fix bigint format 2023-08-22 14:46:47 -04:00
ce87d6cb04 fix signal hash 2023-08-22 14:46:04 -04:00
Tanner Shaw
d102ee5fe5 chore(cleanup) deleting more console logs 2023-08-22 13:40:22 -05:00
Tanner Shaw
0d2524394b chore(cleanup) cleaning up console logs 2023-08-22 13:37:25 -05:00
AtHeartEngineer
967b9fbca0 fix verifier proof type (#42)
The verifier wasn't recognizing the proof type properly
2023-08-22 14:35:50 -04:00
3310a65b82 fix verifier proof type 2023-08-22 14:34:06 -04:00
AtHeartEngineer
aedd1904b7 fix(RLN) check collision (#41)
If the epoch or its messages didn't exist already, it was throwing an
error, so we made a check for that
2023-08-22 14:20:06 -04:00
AtHeartEngineer
dc49ef1742 Merge branch 'main' into collision-fix 2023-08-22 14:19:28 -04:00
Tanner Shaw
43c48c97a9 fix(RLN) check collision 2023-08-22 13:17:14 -05:00
AtHeartEngineer
07c0e01542 Readme Update (#36) 2023-08-22 14:15:49 -04:00
AtHeartEngineer
72c015666a Merge branch 'main' into readme 2023-08-22 14:15:38 -04:00
AtHeartEngineer
9d1f78cd0e Bandada Integration (#35) 2023-08-22 13:30:35 -04:00
0ce3ceb8f9 fixed verifier 2023-08-22 13:18:34 -04:00
9407b2cd9a fix types and linting 2023-08-22 13:16:08 -04:00