-
Notifications
You must be signed in to change notification settings - Fork 56
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
Complete Scrappy Turkify #13
base: main
Are you sure you want to change the base?
Conversation
…to worker to confirm
@me-imfhd you can create a single server and can spawn threads with new server instance this will use single port but load will be divided |
@Airbornharsh can you clarify which server you are talking about, the main backend or the sk-distribution servers? |
@me-imfhd sk-distribution-server |
@Airbornharsh thats not for load, its just a mock to show case how it needs to be done in production, we need to have multiple servers across multiple cloud providers which have shares of private key which is fetched by the main backend to derive the original private key, so that no single developer has access to it, its shamir's secret sharing, you can read about it |
@me-imfhd ok got it |
Implements Shamirs Secret Sharing for storing pk among 5 distributed servers.
Fixes prisma schema bug where payout should reference worker instead of user.
Fixes hydration errors.
Manages .env nicely.
Adds docker to spin up postgres and redis databases.
Implements long running payouts with redis queues, (locks amount instantly and makes a queue to handle sol transfer and creates a payouts on success and clears the lock amount in a single prisma transaction).
Prevents double spending with the help Sequential isolation in prisma transactions.
Add more zod validations, does error handling.
Sooner toast notifications.
Logins only when connects wallet, clears token on disconnect.
Adds get all tasks page for users to see all there tasks,
Adds payout page for workers to see all their payouts. (including making apis for that in the backend)
Using docker to start all 5 distributed server which are responsible for sending the private key shares to your main backend (especially to the queue)
NOTE: Have tested in all scenarios mostly everything works fine if the backed does not go down, (even if the backend goes down when it comes back up the failed queues with start the transaction again and clear the locked amount)
Need to set cors properly for sk-distirbution-servers so that only your main backend can access it in prod (right now everything can access it).