Bryan Stitt
d9c6da74c2
fix case on currency check
2023-07-03 13:30:37 -07:00
Bryan Stitt
8c8080e01d
less async-stripe features
2023-07-03 13:12:12 -07:00
Bryan Stitt
d8512d50de
just pass the whole string through
...
based on this test (which i think async-stripe forked): https://docs.rs/stripe-rust/0.12.3/src/stripe/resources/event.rs.html#355
and then based on the struct that they deserialize into: https://docs.rs/async-stripe/latest/src/stripe/resources/generated/event.rs.html#16
2023-07-03 12:57:52 -07:00
Bryan Stitt
64505953ee
cargo upgrade
2023-07-03 12:28:07 -07:00
Bryan Stitt
b13e5b2440
move more logs to tracing and possible stripe payment fix
...
maybe RawValue does need to_string instead of just get
2023-07-03 12:17:30 -07:00
Bryan Stitt
832432e9d4
cargo upgrade
2023-07-02 16:21:10 -07:00
yenicelik
6cf7e4d621
problem executing the last bit
2023-07-01 15:38:56 -04:00
yenicelik
458f7d6514
could call subcommand
2023-07-01 15:26:42 -04:00
Bryan Stitt
377cd8bcf3
one more stripe option
...
need to check if case matters
2023-07-01 09:12:50 -07:00
Bryan Stitt
7044edc63c
check multiple posible stripe headers
2023-07-01 09:10:53 -07:00
yenicelik
17c42243d0
wont shutdown
2023-06-30 22:24:48 -04:00
Bryan Stitt
ee626bfa61
lint
2023-06-30 13:52:09 -07:00
Bryan Stitt
501ec21442
drop workspace-hack for now
...
it doesn't work well with features and so we were installing things like kafka even if the feature was off
2023-06-30 13:18:37 -07:00
Bryan Stitt
c26d57fe5e
test log in and out
2023-06-30 12:53:21 -07:00
Bryan Stitt
645fa7328b
cargo upgrade tokio
2023-06-29 23:16:31 -07:00
Bryan Stitt
4a03d2e331
loop until it works
2023-06-29 23:15:57 -07:00
Bryan Stitt
5da334fcb7
start adding tests that need docker for mysql management
2023-06-29 22:38:35 -07:00
Bryan Stitt
31c611f4ff
add todo about siwe
2023-06-29 14:42:01 -07:00
Bryan Stitt
581af0d596
stripe integration first mvp (replaces #140 ) ( #154 )
...
* stripe integration first mvp
* addressing some points from #140
* stripe endpoint needs testing
* addressed some comments
* added Json(payload)
* update toolchain
* lint (well, most of it)
---------
Co-authored-by: yenicelik <david.yenicelik@gmail.com>
2023-06-29 14:32:05 -07:00
Bryan Stitt
f6c8172a13
always do connectinfo for now
2023-06-29 13:12:35 -07:00
Bryan Stitt
ffc5a46dc4
add some stub tests
2023-06-29 12:41:21 -07:00
Bryan Stitt
294acbd712
sqlite::memory: doesn't work. investigate later
2023-06-29 12:30:03 -07:00
Bryan Stitt
c0a658c6b4
move subcommands so integration tests are easier to write
2023-06-29 12:24:36 -07:00
Bryan Stitt
b4f02b24f3
pricing for ots_
2023-06-29 10:24:05 -07:00
Bryan Stitt
da13542789
lower sample rate
2023-06-29 10:18:32 -07:00
Bryan Stitt
335480cec9
more tracing logs
2023-06-29 10:15:12 -07:00
Bryan Stitt
357701bccc
no need to check the caches, we have latest block
2023-06-29 00:06:58 -07:00
Bryan Stitt
bfc663d678
fix eth_blockNumber formatting
2023-06-28 23:00:48 -07:00
Bryan Stitt
280e2075d3
Fix Issue 65 Pt. 2 ( #153 )
...
* change subuser balance logic and add message to access denied errors
* clearer import
* comments
* comments
2023-06-28 23:00:34 -07:00
Bryan Stitt
ebceb0d7d6
descriptive text on NotImplemented errors
2023-06-28 21:47:06 -07:00
Bryan Stitt
d0e77237fa
raise log level
2023-06-28 21:38:57 -07:00
Bryan Stitt
0c389e43b4
don't dedupe rpc
2023-06-28 21:34:51 -07:00
Bryan Stitt
fba41b9bc2
lots of tracing improvements
2023-06-28 21:30:00 -07:00
Bryan Stitt
25b04db3b5
lower log level and optional to
2023-06-28 21:08:43 -07:00
Bryan Stitt
342adb528d
add sentry tag for env and chain_id
2023-06-28 20:38:33 -07:00
Bryan Stitt
2a714acc30
deref
2023-06-28 19:19:36 -07:00
Bryan Stitt
c6930dcb4c
saturating sub
2023-06-28 19:19:14 -07:00
Bryan Stitt
d11d6c1f8a
more logs
2023-06-28 18:44:54 -07:00
Bryan Stitt
e8d992168c
more logs and retries
2023-06-28 18:36:17 -07:00
Bryan Stitt
3cfbc5baa4
improve cache keys and allow failures while parsing params
2023-06-28 17:42:49 -07:00
Bryan Stitt
df865292a7
add another layer of retries
2023-06-28 15:12:16 -07:00
Bryan Stitt
eab3aa7943
that simpler param doesn't work everywhere
2023-06-27 17:39:37 -07:00
Bryan Stitt
ec7c8f0434
todo
2023-06-27 17:08:49 -07:00
Bryan Stitt
cdea61cb6b
one list for ranked rpcs
2023-06-27 15:55:29 -07:00
Bryan Stitt
272f7ce800
add cargo hakari and chef to build process
2023-06-27 11:59:49 -07:00
Bryan Stitt
46ee5bf277
that loop waits forever
2023-06-27 11:02:12 -07:00
Bryan Stitt
25e5caaab8
simple sleep for now. will fix with better waits later
2023-06-27 10:50:15 -07:00
Bryan Stitt
86f9560fc3
less serde features
...
if we don't use them its just wasted compile time
2023-06-27 10:18:32 -07:00
Bryan Stitt
8e98eabebe
lower error log when starting
2023-06-27 10:05:07 -07:00
Bryan Stitt
1cf18b78a9
cargo upgrade
2023-06-27 10:04:48 -07:00
Bryan Stitt
b35ad330c9
save last provider error
2023-06-26 23:04:56 -07:00
Bryan Stitt
917dfc914f
handle more jsonrpc errors as HTTP 200
2023-06-26 22:40:00 -07:00
Bryan Stitt
009fdbe2cf
make references compile
2023-06-26 21:38:41 -07:00
Bryan Stitt
469b55fa9a
sort and 0 cost test method
2023-06-26 21:38:08 -07:00
Bryan Stitt
0d1e629567
more tracing and error handling
2023-06-26 21:11:43 -07:00
Bryan Stitt
6f7783d260
add block stats to top of status data
2023-06-26 21:11:16 -07:00
Bryan Stitt
1a7d4c9cbb
handle subscriptions and unimplemented
...
this also means we handle new methods that haven't been added to our list as only 2 cu
2023-06-26 21:10:32 -07:00
Bryan Stitt
8cb57e2f88
add EXTRA_RUST_LOG helper
2023-06-26 21:08:48 -07:00
Bryan Stitt
f68964f63d
add 3 tries
2023-06-26 21:08:32 -07:00
Bryan Stitt
54107a390b
cargo upgrade
2023-06-26 21:07:25 -07:00
Bryan Stitt
8815b5c8cd
lint
2023-06-25 21:26:28 -07:00
yenicelik
627c359645
mixed up directions
2023-06-25 21:19:13 -04:00
yenicelik
bbdff1d916
some code got lost in all the commits, deploying again
2023-06-25 21:02:07 -04:00
David
0f4d12e2a5
Merge pull request #149 from yenicelik/devel
...
Devel
2023-06-25 17:55:55 -04:00
Bryan Stitt
0aa94d9c87
don't escape newlines
2023-06-25 14:34:19 -07:00
Bryan Stitt
fb76fd2d1c
remove unused ewma crate now that we have our own
2023-06-25 14:32:45 -07:00
yenicelik
88617dc72b
added more tracing for balance
2023-06-25 17:25:35 -04:00
yenicelik
32156e981d
adding balances
2023-06-25 17:19:31 -04:00
yenicelik
992860a46d
forgot to allow aggregate global stats
2023-06-25 16:18:09 -04:00
yenicelik
4c157cfcf7
made paymentrequired error code instead of introducing a new one
2023-06-25 15:05:27 -04:00
yenicelik
935681fde7
stats subuser + premium access logic
2023-06-25 14:29:54 -04:00
Bryan Stitt
fee1a423a1
simpler type when no args
2023-06-24 22:30:57 -07:00
Bryan Stitt
83123f5cdd
wait up to a second for it to sync
2023-06-24 21:51:58 -07:00
Bryan Stitt
e7baeb1ba4
rearrange so maybe time works better
2023-06-24 21:41:18 -07:00
Bryan Stitt
c2917f1093
try sleeping
2023-06-24 21:35:36 -07:00
Bryan Stitt
ba702c7647
tests pass local, but jenkins isn't as fast
2023-06-24 21:27:11 -07:00
Bryan Stitt
b5ae11b7f7
lint
2023-06-24 21:21:51 -07:00
Bryan Stitt
a440d51377
test fixture
2023-06-24 21:17:08 -07:00
Bryan Stitt
8cfbbfe1b3
use default derive helpers
2023-06-24 20:39:46 -07:00
Bryan Stitt
efe1e30791
better handling of 0 port and fix test port
2023-06-24 20:38:06 -07:00
Bryan Stitt
ab3d4a91a8
json body instead of params
2023-06-24 18:17:51 -07:00
Bryan Stitt
0c10994835
why wont that import?
2023-06-24 16:45:07 -07:00
Bryan Stitt
94d0a25aaf
test logs
2023-06-24 16:43:11 -07:00
Bryan Stitt
38b266156a
consistent route name
2023-06-24 15:49:26 -07:00
Bryan Stitt
1d6e1ef9af
polish error logs
2023-06-24 15:24:46 -07:00
Bryan Stitt
fef03f089f
less verbose db_conn and db_replica helpers
2023-06-24 11:11:07 -07:00
Bryan Stitt
9115419ec0
handle addresses consistently
2023-06-24 10:20:24 -07:00
Bryan Stitt
39a505c0ff
POST instead of GET and use more txs
2023-06-24 09:59:08 -07:00
Bryan Stitt
8f76d9320d
support EIP1271 login
2023-06-24 09:48:31 -07:00
Bryan Stitt
91cbce6ce8
start adding stat for CU
2023-06-24 00:48:56 -07:00
Bryan Stitt
4e6a80caa2
cargo upgrade
2023-06-24 00:41:48 -07:00
Bryan Stitt
30828ccae2
prioritize block. queries to syncing nodes ends up being slower
2023-06-24 00:41:30 -07:00
Bryan Stitt
ac4b7e46b4
actually import info level
2023-06-23 22:54:02 -07:00
Bryan Stitt
6edf1a5c1b
info on new block
2023-06-23 22:52:42 -07:00
Bryan Stitt
89330cfba0
upstream ethers again
2023-06-23 22:23:51 -07:00
Bryan Stitt
fd661689a3
Tracing ( #144 )
...
* tracing
* add tracing and features to match
* use just one hostname crate
* cargo upgrade
* set up pretty logger and sentry layer
2023-06-23 16:28:45 -07:00
Bryan Stitt
3fac4248d6
Revert "just use Ulid instead of RpcSecretKey type"
...
It did work
This reverts commit 377e8356a57d80dd17b746dd05a62b475d9e7d07.
2023-06-23 01:29:11 -07:00
Bryan Stitt
377e8356a5
just use Ulid instead of RpcSecretKey type
2023-06-23 01:28:47 -07:00
Bryan Stitt
68ab9b6d1d
always serialize RpcSecretKey as a ULID
2023-06-23 01:07:54 -07:00
Bryan Stitt
6b6fac396f
lower default web3_proxy::rpcs::consensus level
2023-06-22 22:45:43 -07:00
Bryan Stitt
b1b8346db9
#123 role to rpc keys ( #142 )
...
* added roles to rpc keys
* dont unwrap
---------
Co-authored-by: yenicelik <david.yenicelik@gmail.com>
2023-06-22 12:56:19 -07:00
Bryan Stitt
c79b787e13
allow setting referral code if not already set ( #141 )
2023-06-22 12:41:05 -07:00
Bryan Stitt
376b9f474d
use short syntax for json data in logs
2023-06-22 12:10:23 -07:00
Bryan Stitt
f593667169
fix lifetimes
2023-06-22 10:16:58 -07:00
Bryan Stitt
66212b5cf5
cargo upgrade --incompatible -p itertools
2023-06-22 09:26:57 -07:00
Bryan Stitt
dffff65950
allow no referrer_record
2023-06-22 09:25:12 -07:00
Bryan Stitt
c560a59ef0
add more headers for debug endpoints and use more refs
2023-06-21 22:11:26 -07:00
Bryan Stitt
095a505017
cargo upgrade
2023-06-21 17:57:53 -07:00
Bryan Stitt
662bbb296f
add header debug endpoint
2023-06-21 11:28:33 -07:00
Bryan Stitt
63c4f9e591
allow no ip
...
this shouldn't be needed, but is a workaround while we debug staging
2023-06-21 11:28:22 -07:00
Bryan Stitt
7f4da8d43c
lint
2023-06-21 10:40:55 -07:00
Bryan Stitt
d962b749a2
use find_with_related, not find_also_related
...
find_also_related is 1:1, but we want 1:Many
2023-06-21 10:37:01 -07:00
Bryan Stitt
1cbb58e8e0
comment
2023-06-21 10:25:10 -07:00
Bryan Stitt
06ce95c386
let serde_json do more of the work
2023-06-21 10:18:36 -07:00
Bryan Stitt
5504062f47
dont error if no referrals
2023-06-21 10:18:06 -07:00
Bryan Stitt
8f1b6fe6c0
lint
2023-06-21 10:02:02 -07:00
Bryan Stitt
4dad743fc3
tuple, not list
2023-06-21 10:01:51 -07:00
Bryan Stitt
f75f3f8d2f
serialize caches in a list
2023-06-21 10:00:05 -07:00
Bryan Stitt
3c2f95de10
Improve max wait and timeouts ( #137 )
...
* pass max wait with more functions
* move rpc_head_str higher up to use it in all the logs
* refresh consensus at double the block time
* new pricing that also includes archive check
* lint
* don't clone method
* put caches into one list
they serialize with their name, so it will still be easy to tell them apart
* more consistent waiting. still waits more than I want right now
* clean up default max waits
* more timeouts
2023-06-20 14:22:14 -07:00
Bryan Stitt
78efad5453
cargo upgrade strum
2023-06-19 17:48:46 -07:00
Bryan Stitt
6d25c41faf
Compute units ( #136 )
...
* wip
* add basic compute unit calculator
* calculate costs with compute units
2023-06-19 17:47:38 -07:00
Bryan Stitt
b7935f77fc
spawn recording latency
2023-06-19 17:46:58 -07:00
Bryan Stitt
6038351cb8
change default tracking in prep for premium-only keys
2023-06-19 13:00:57 -07:00
Bryan Stitt
b35cd58a76
rate limit user_balance_post by bearer OR ip
2023-06-19 10:21:48 -07:00
Bryan Stitt
c3ae4ded2b
move data to the right places
2023-06-18 21:42:16 -07:00
Bryan Stitt
58cc129837
forgot to convert tier_sec_size from ms. 1 was a very large default
2023-06-18 17:57:21 -07:00
Bryan Stitt
ba410cf126
better log message
2023-06-18 16:41:01 -07:00
Bryan Stitt
89009dcd42
use web3_context for more errors
2023-06-18 16:40:17 -07:00
Bryan Stitt
af8543c3bf
some defaults are needed maybe?
2023-06-18 16:36:23 -07:00
Bryan Stitt
2f78e64c5d
create empty balance entry if none exists
2023-06-18 16:25:25 -07:00
Bryan Stitt
6deeabe1e1
pretty print errors
2023-06-18 16:14:06 -07:00
Bryan Stitt
9dd0bae40a
text instead of string payload
2023-06-18 16:13:55 -07:00
Bryan Stitt
825ba006f1
move floats and durations around for latency tracking
2023-06-18 10:46:22 -07:00
Bryan Stitt
2f0e6103ac
Revert "tier more important than backup"
...
This reverts commit bca22537c633822e5e6759fa2840712a837211fd.
2023-06-18 10:09:21 -07:00
Bryan Stitt
bca22537c6
tier more important than backup
...
we filter backups when they aren't needed, so this should be okay
2023-06-18 10:06:26 -07:00
Bryan Stitt
e54299beca
rolling median for choosing tier
2023-06-18 09:53:36 -07:00
Bryan Stitt
8b22c9861b
Revert "temp fix while filtering is improved"
...
This reverts commit 5367c511953fcea1af3da1d905de06d9e76711ba.
2023-06-17 12:15:40 -07:00
Bryan Stitt
5367c51195
temp fix while filtering is improved
2023-06-17 12:09:04 -07:00
Bryan Stitt
3b65074f38
cleaner duration multiplication
2023-06-17 11:33:33 -07:00
Bryan Stitt
eab86c7ee8
automatic max_head_block_age
2023-06-17 10:13:40 -07:00
Bryan Stitt
bf13e86a04
warn if no max_head_block_age
2023-06-17 09:19:05 -07:00
Bryan Stitt
3b9314a76f
comments
2023-06-17 08:44:18 -07:00
Bryan Stitt
9b9e5341cb
lint
2023-06-17 08:44:07 -07:00
Bryan Stitt
6bfa5a69ca
latest_balance is part of AuthorizationChecks now
2023-06-17 08:43:51 -07:00
Bryan Stitt
8ffd7d2e1b
enable more advanced cost calculation
2023-06-16 23:55:41 -07:00
Bryan Stitt
ba67151706
lint
2023-06-16 23:48:16 -07:00
Bryan Stitt
745870d119
drop a bunch of log levels
2023-06-16 23:46:20 -07:00
Bryan Stitt
74d2333039
try this version of influxdb2
2023-06-16 23:41:12 -07:00
David
d6513cde74
Forgot to handle Option unwrap ( #132 )
...
* made the query much faster
* aggregate queries should be fast now too
* forgot to handle an option unwrap
2023-06-16 23:18:51 -07:00
Bryan Stitt
86f9e7358a
move balance onto AuthorizationChecks ( #131 )
...
* move balance onto AuthorizationChecks
* todone
* bigger default
* flat cost for testing
2023-06-16 23:14:43 -07:00