user_address change not made yet
This commit is contained in:
parent
ee3c55401c
commit
e261886c60
1
TODO.md
1
TODO.md
|
@ -318,3 +318,4 @@ in another repo: event subscriber
|
||||||
{"jsonrpc":"2.0","id":null,"error":{"code":-32099,"message":"deadline has elapsed"}}
|
{"jsonrpc":"2.0","id":null,"error":{"code":-32099,"message":"deadline has elapsed"}}
|
||||||
|
|
||||||
- [ ] figure out rate limits for private rpcs. eden v1 gives 500 error instead of a code for rate limits
|
- [ ] figure out rate limits for private rpcs. eden v1 gives 500 error instead of a code for rate limits
|
||||||
|
- [ ] https://gitlab.com/moka-labs/tiered-cache-example
|
||||||
|
|
|
@ -9,7 +9,7 @@ redis_url = "redis://dev-redis:6379/"
|
||||||
# TODO: how do we find the optimal redis_max_connections? too high actually ends up being slower
|
# TODO: how do we find the optimal redis_max_connections? too high actually ends up being slower
|
||||||
redis_max_connections = 99
|
redis_max_connections = 99
|
||||||
redirect_public_url = "https://llamanodes.com/free-rpc-stats"
|
redirect_public_url = "https://llamanodes.com/free-rpc-stats"
|
||||||
redirect_user_url = "https://llamanodes.com/user-rpc-stats/{{user_address}}"
|
redirect_user_url = "https://llamanodes.com/user-rpc-stats/{{user_id}}"
|
||||||
public_rate_limit_per_minute = 0
|
public_rate_limit_per_minute = 0
|
||||||
# 1GB of cache
|
# 1GB of cache
|
||||||
response_cache_max_bytes = 10000000000
|
response_cache_max_bytes = 10000000000
|
||||||
|
|
|
@ -153,11 +153,8 @@ impl Web3ProxyApp {
|
||||||
// safety checks on the config
|
// safety checks on the config
|
||||||
debug!("redirect_user_url: {}", top_config.app.redirect_user_url);
|
debug!("redirect_user_url: {}", top_config.app.redirect_user_url);
|
||||||
assert!(
|
assert!(
|
||||||
top_config
|
top_config.app.redirect_user_url.contains("{{user_id}}"),
|
||||||
.app
|
"redirect user url must contain \"{{user_id}}\""
|
||||||
.redirect_user_url
|
|
||||||
.contains("{{user_address}}"),
|
|
||||||
"redirect user url must contain \"{{user_address}}\""
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// first, we connect to mysql and make sure the latest migrations have run
|
// first, we connect to mysql and make sure the latest migrations have run
|
||||||
|
|
|
@ -218,7 +218,7 @@ mod tests {
|
||||||
public_rate_limit_per_minute: 6_000_000,
|
public_rate_limit_per_minute: 6_000_000,
|
||||||
response_cache_max_bytes: 10_usize.pow(7),
|
response_cache_max_bytes: 10_usize.pow(7),
|
||||||
redirect_public_url: "example.com/".to_string(),
|
redirect_public_url: "example.com/".to_string(),
|
||||||
redirect_user_url: "example.com/{{user_address}}".to_string(),
|
redirect_user_url: "example.com/{{user_id}}".to_string(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
balanced_rpcs: HashMap::from([
|
balanced_rpcs: HashMap::from([
|
||||||
|
|
|
@ -71,7 +71,7 @@ pub struct AppConfig {
|
||||||
pub response_cache_max_bytes: usize,
|
pub response_cache_max_bytes: usize,
|
||||||
/// the stats page url for an anonymous user.
|
/// the stats page url for an anonymous user.
|
||||||
pub redirect_public_url: String,
|
pub redirect_public_url: String,
|
||||||
/// the stats page url for a logged in user. it must contain "{user_address}"
|
/// the stats page url for a logged in user. it must contain "{user_id}"
|
||||||
pub redirect_user_url: String,
|
pub redirect_user_url: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ pub async fn user_websocket_handler(
|
||||||
// TODO: store this on the app and use register_template?
|
// TODO: store this on the app and use register_template?
|
||||||
let reg = Handlebars::new();
|
let reg = Handlebars::new();
|
||||||
|
|
||||||
// TODO: show the user's address, not their id (remember to update the checks for {{user_address}}} in app.rs)
|
// TODO: show the user's address, not their id (remember to update the checks for {{user_id}}} in app.rs)
|
||||||
// TODO: query to get the user's address. expose that instead of user_id
|
// TODO: query to get the user's address. expose that instead of user_id
|
||||||
let user_url = reg
|
let user_url = reg
|
||||||
.render_template(
|
.render_template(
|
||||||
|
|
Loading…
Reference in New Issue