2080739865
* 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
37 lines
1022 B
Rust
37 lines
1022 B
Rust
pub mod admin_queries;
|
|
pub mod app;
|
|
pub mod block_number;
|
|
pub mod config;
|
|
pub mod frontend;
|
|
pub mod http_params;
|
|
pub mod jsonrpc;
|
|
pub mod pagerduty;
|
|
pub mod prometheus;
|
|
pub mod referral_code;
|
|
pub mod response_cache;
|
|
pub mod rpcs;
|
|
pub mod stats;
|
|
pub mod user_token;
|
|
|
|
use serde::Deserialize;
|
|
|
|
// Push some commonly used types here. Can establish a folder later on
|
|
/// Query params for our `post_login` handler.
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct PostLoginQuery {
|
|
/// While we are in alpha/beta, we require users to supply an invite code.
|
|
/// The invite code (if any) is set in the application's config.
|
|
/// This may eventually provide some sort of referral bonus.
|
|
invite_code: Option<String>,
|
|
}
|
|
|
|
/// JSON body to our `post_login` handler.
|
|
/// Currently only siwe logins that send an address, msg, and sig are allowed.
|
|
/// Email/password and other login methods are planned.
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct PostLogin {
|
|
sig: String,
|
|
msg: String,
|
|
pub referral_code: Option<String>,
|
|
}
|