* 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
* 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
* 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
* will push it for feedback loop
* filtering also to only show rpc keys that the user is an owner of
* revert logs also returning rpc keys
* merged with devel
* wip
* AsRef finally works like i wanted
* actually return the block
* start adding async trait
* remove stale import
* include id in the error response when possible
* remove stale comments
* Revert "remove cache on /status and /health for now"
This reverts commit 166b0d810cd25b895560d50d00383a57e1269ad4.
* Revert "remove cache on backups needed, too"
This reverts commit 4597967def2f1daa71a277ec6731db4739ead640.
* add tests
* add max_item_weight
* comment
* add some helper functions, max weights, and tests
* added admin balance increase, and also test
* slightly hacky, but does do an update expression
* added note column to entities
* removed redundant printlns
* flattened items
* removed user tier logic from admin increase balance completely. admin will have to manually increase the user tier
* quick cache and allocate less
* improve /status cache
* prepare to cache raw transaction hashes so we dont dos our backends
* simple benchmark for /health and /status
* mut not needed with atomics
* DRY all the status pages
* use u64 instead of bytes for subscriptions
* fix setting earliest_retry_at and improve logs
* Revert "use kanal instead of flume or tokio channels (#68)"
This reverts commit 510612d343fc51338a8a4282dcc229b50097835b.
* fix automatic retries
* put relaxed back
* convert error message time to seconds
* assert instead of debug_assert while we debug
* ns instead of seconds
* disable peak_latency for now
* null is the default
* cargo fmt
* comments
* remove request caching for now
* log on exit
* unit weigher for now
* make cache smaller. we need a weigher for prod. just debugging
* oops. we need async
* add todo
* no need for to_string on a RawValue
* add minor todo
* BadRequest instead of web3_context
* more bad request error codes
* use tokio-uring for the tcp listener
* clear block instead of panic
* clone earlier
* more watch channels instead of rwlocks
* drop uring for now (its single threaded) and combine get/post/put routes
* clean up iter vs into_iter and unnecessary collect
* arcswap instead of rwlock for Web3Rpcs.by_name
* cargo upgrade
* uuid fast-rng and alphabetize
* if protected rpcs, only use protected rpcs
* listenfd
* make connectinfo optional
* try_get_with_by_ref instead of try_get_with
* anyhow ensure. and try_get_with_as_ref isn't actually needed
* fix feature flags
* more refs and less clone
* automatic retry for eth_getTransactionReceipt and eth_getTransactionByHash
thanks for the report Lefteris @ Rotki
* ArcSwap for provider
* set archive_request to true on transaction retrying
* merge durable stats
* Revert "ArcSwap for provider"
This reverts commit 166d77f204cde9fa7722c0cefecbb27008749d47.
* comments
* less clones
* more refs
* fix test
* add optional mimalloc feature
* remove stale dependency
* sort
* cargo upgrade
* lint constants
* add todo
* another todo
* lint
* anyhow::ensure instead of panic
* allow rpc_accounting_v2 entries for requests without an rpc key