Commit Graph

925 Commits

Author SHA1 Message Date
Bryan Stitt c456432cc3 cargo upgrade 2023-06-12 11:44:51 -07:00
Bryan Stitt c3a7d1646c lint 2023-06-12 11:41:10 -07:00
Bryan Stitt 70d5c09d3e clean up redirect url 2023-06-12 11:38:34 -07:00
Bryan Stitt f1176685dd pause time on more tests 2023-06-12 11:08:33 -07:00
David 093ca19454
added subuser RPC keys into key access control, as well as fetching RPC keys (#115) 2023-06-12 08:59:23 -07:00
David 0cc4557e8d
Use rpc id instead of key (#118)
* added logic to check e-mails thru SMPT server, very basic, no validation e-mails etc.

* Revert "added logic to check e-mails thru SMPT server, very basic, no validation e-mails etc."

This reverts commit 022a13cfd9ca24aad9e05f75489396936f14784a.

* mixed up branches
2023-06-11 19:14:02 -07:00
David 81aa4788b4
David/60 add basic email verification (#119)
* added logic to check e-mails thru SMPT server, very basic, no validation e-mails etc.

* added rpc key logic to use db numbers instead of UUIDs

* Revert "added rpc key logic to use db numbers instead of UUIDs"

This reverts commit 056771d02725f90ed5f1745b0372e13e630a19ac.
2023-06-11 19:10:10 -07:00
yenicelik 0b26ae3bad made modify-subuser post 2023-06-11 18:59:27 +02:00
yenicelik 2333b8bbb6 influx query is not 20-40% faster 2023-06-11 17:57:02 +02:00
Bryan Stitt 4a9c1a0ce6 move user registration into a dedicated function 2023-06-09 18:31:47 -07:00
Bryan Stitt 71d3d63524 put ip rate limiting back 2023-06-09 16:35:44 -07:00
Bryan Stitt 41950c886c improvements for web3-this-then-that 2023-06-09 16:35:14 -07:00
Bryan Stitt bcf4f33543 add payment_factory_address to /status 2023-06-09 14:02:29 -07:00
Bryan Stitt bb900c61a5 todo 2023-06-09 13:31:46 -07:00
Bryan Stitt 8bf0ee473d loud log on rollback 2023-06-09 13:30:00 -07:00
Bryan Stitt bd87fcb13c move sort and shuffle for loadbalancing into proper functions 2023-06-09 13:09:58 -07:00
Bryan Stitt 1f3040f6c7 automated tiers 2023-06-09 12:21:55 -07:00
Bryan Stitt b6ff14210d cargo upgrade 2023-06-08 22:35:14 -07:00
David d91713e09e
this brings back balance back to the stats request (#112)
* removed bloom filter temporarily, added some fixes with decimals in payment.rs

* balance is inside the influx query again

* fixed aggregate
2023-06-08 15:57:53 -07:00
Bryan Stitt 68f73ec0b1 more things should be BadRequest instead of 500 2023-06-08 13:42:45 -07:00
Bryan Stitt 50ec653557 lower log level 2023-06-08 11:46:38 -07:00
Bryan Stitt 74280bc329 lint 2023-06-08 11:33:16 -07:00
Bryan Stitt 334b1c21b3 improve logs 2023-06-08 11:30:48 -07:00
Bryan Stitt 1d05bc5e89 lower log levels 2023-06-08 11:26:09 -07:00
David 3f76b08364
Test balance and referral accounting (#111)
* removed bloom filter temporarily, added some fixes with decimals in payment.rs

* balance accounting for a single user (paid and free tier) seems to be ok

* fixed some balance accounting

* compute_cost reduced back to 0
2023-06-08 10:08:29 -07:00
Bryan Stitt c37b320286 add cache names and actually serialize 2023-06-07 17:55:34 -07:00
Bryan Stitt 5744b459ee lint 2023-06-07 17:43:10 -07:00
Bryan Stitt 6cf738261b fix test 2023-06-07 17:42:34 -07:00
Bryan Stitt bfaff81626 cargo upgrade 2023-06-07 17:31:29 -07:00
Bryan Stitt 5c1569f9c2 clippy lint 2023-06-07 17:31:15 -07:00
Bryan Stitt 40bee30730 back to moka 2023-06-07 17:30:05 -07:00
David de7d8919d3
Change balance to record total spend and total deposits (#109)
* lets test total deposit and total spent

* removed referrer from cache for performance reasons
2023-06-07 14:45:57 -07:00
Bryan Stitt 4f7144abc6 Arc instead of Box for better caching 2023-06-07 13:57:38 -07:00
Bryan Stitt c2a3a4a0a9 Merge remote-tracking branch 'origin/main' into devel 2023-06-07 13:29:12 -07:00
Bryan Stitt 91d288315f add queue lengths to status page 2023-06-07 13:05:15 -07:00
Bryan Stitt b50579ea3a add block caches to web3rpcs serializer 2023-06-07 12:04:39 -07:00
Bryan Stitt 8249b0aefe cache isnt on main yet 2023-06-07 11:18:36 -07:00
Bryan Stitt aa57dd2fcf serialize the caches on /status 2023-06-07 10:58:30 -07:00
Bryan Stitt f0a9f03076 smaller caches 2023-06-07 10:57:43 -07:00
Bryan Stitt c4b2ce5266 smaller caches 2023-06-07 10:57:01 -07:00
Bryan Stitt fb97ef5180 cargo clippy lints 2023-06-07 10:55:07 -07:00
Bryan Stitt f6b2b0deab cargo upgrade 2023-06-07 10:50:34 -07:00
Bryan Stitt 2b814e7a4d serialize the caches on /status 2023-06-07 10:48:55 -07:00
David 63499c1564
David/66 downgrade balance logic (#89)
* tried to make the balance_entry atomic, asking for feedback

* added locked select everywhere and inside the txn, it should be atomic now

* forgot about overwrite (referee vs sender entities were the same, overwriting each other), fixed it

* will now trigger refreshing cache when balance thresholds are met

* will also invalidate cache if balance gets too low (to out of funds)

* added separate balance cache with shorter TTL. need to know if i should modify it (rn its not atomic), or if low TTL is good enough, and we just fetch the value every now and then from the Database

* removed UserTier struct bcs duplicate with database

* removed subuser premium requirement (which would have lead to a merge conflict later on)

* removed user_tier artefact

* replaced cache to use AtomicF64

* a bunch of small changes

* some changes

* will merge with devel

* changed AtomicF64 to RwLock<Decimal>

* changed AtomicF64 to RwLock<Decimal>

* downgrading user when at 0.1$ or if sum_credits_used is very low

* changed caches to be more aggressive in being non-empty

* replaced Arc::clone() by reference
2023-06-07 09:39:30 -07:00
David fd69e6acdd
added stats page for referrals (shared, and received) (#95)
* added stats page for referrals (shared, and received)

* removed referrals address, and return ok response if no referrals used

* merged from devel

* changed unwrap for context

* changes from PR
2023-06-07 09:38:19 -07:00
Bryan Stitt 172baabb4e even more fields onto popularity contest 2023-06-05 16:40:49 -07:00
Bryan Stitt 640bcd1378 update popularity_contest script to match new status page 2023-06-05 16:40:49 -07:00
David f66edd961b
Making Balance Changes Atomic (Read and Write) (#84)
* tried to make the balance_entry atomic, asking for feedback

* added locked select everywhere and inside the txn, it should be atomic now

* forgot about overwrite (referee vs sender entities were the same, overwriting each other), fixed it

* will now trigger refreshing cache when balance thresholds are met

* Revert "will now trigger refreshing cache when balance thresholds are met"

This reverts commit b1215ddc43a1358f6086bddbd106996165431165.

* will not modify userTier in database anymore

* made payment atomic

* made updates mostly atomic, locking only the referral table (bcs more complex logic)

* latest changes
2023-06-04 09:32:53 -07:00
Bryan Stitt 79e52f4cdb Merge remote-tracking branch 'origin/main' into devel 2023-05-31 17:12:59 -07:00
Bryan Stitt 633bf1f53b need a decimal 0 2023-05-31 17:12:32 -07:00