dash consistency
This commit is contained in:
parent
8eeef81560
commit
2811c84c25
@ -4,6 +4,6 @@
|
||||
/Dockerfile
|
||||
/redis-cell-server/
|
||||
/target
|
||||
/web3-proxy/flamegraph.svg
|
||||
/web3-proxy/perf.data
|
||||
/web3-proxy/perf.data.old
|
||||
/web3_proxy/flamegraph.svg
|
||||
/web3_proxy/perf.data
|
||||
/web3_proxy/perf.data.old
|
||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -5194,7 +5194,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web3-proxy"
|
||||
name = "web3_proxy"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
|
@ -1,9 +1,9 @@
|
||||
FROM rust:1-bullseye as builder
|
||||
|
||||
WORKDIR /usr/src/web3-proxy
|
||||
WORKDIR /usr/src/web3_proxy
|
||||
COPY . .
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/src/web3-proxy/target \
|
||||
--mount=type=cache,target=/usr/src/web3_proxy/target \
|
||||
cargo install --locked --path ./web3_proxy
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
14
README.md
14
README.md
@ -1,6 +1,6 @@
|
||||
# web3-proxy
|
||||
# web3_proxy
|
||||
|
||||
Web3-proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.
|
||||
Web3_proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.
|
||||
|
||||
**Under construction!** This code is under active development. The basics seem to work, but theres lots of tests and features to write still.
|
||||
|
||||
@ -15,12 +15,12 @@ $ cargo install sea-orm-cli
|
||||
$ cargo run --release -- --help
|
||||
```
|
||||
```
|
||||
Compiling web3-proxy v0.1.0 (/home/bryan/src/web3-proxy/web3-proxy)
|
||||
Compiling web3_proxy v0.1.0 (/home/bryan/src/web3_proxy/web3_proxy)
|
||||
Finished release [optimized + debuginfo] target(s) in 17.69s
|
||||
Running `target/release/web3-proxy --help`
|
||||
Usage: web3-proxy [--port <port>] [--workers <workers>] [--config <config>]
|
||||
Running `target/release/web3_proxy --help`
|
||||
Usage: web3_proxy [--port <port>] [--workers <workers>] [--config <config>]
|
||||
|
||||
Web3-proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.
|
||||
web3_proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.
|
||||
|
||||
Options:
|
||||
--port what port the proxy should listen on
|
||||
@ -84,7 +84,7 @@ Flame graphs make finding slow code painless:
|
||||
|
||||
Run the proxy under gdb for advanced debugging:
|
||||
|
||||
cargo build --release && RUST_LOG=web3_proxy=debug rust-gdb --args target/debug/web3-proxy --listen-port 7503 --rpc-config-path ./config/production-eth.toml
|
||||
cargo build --release && RUST_LOG=web3_proxy=debug rust-gdb --args target/debug/web3_proxy --listen-port 7503 --rpc-config-path ./config/production-eth.toml
|
||||
|
||||
TODO: also enable debug symbols in the release build by modifying the root Cargo.toml
|
||||
|
||||
|
2
TODO.md
2
TODO.md
@ -206,6 +206,6 @@ in another repo: event subscriber
|
||||
- [ ] better error handling. we warn too often for validation errors and use the same error code for most every request
|
||||
- [ ] use &str more instead of String. lifetime annotations get really annoying though
|
||||
- [ ] tarpit instead of reject requests (unless theres a lot)
|
||||
- [ ] tune database connection pool size. i think a single web3-proxy currently maxes out our server
|
||||
- [ ] tune database connection pool size. i think a single web3_proxy currently maxes out our server
|
||||
- [ ] subscribing to transactions should be configurable per server. listening to paid servers can get expensive
|
||||
- [ ] archive servers should be lowest priority
|
||||
|
@ -4,7 +4,7 @@ FROM rust:1-bullseye as builder
|
||||
WORKDIR /usr/src/redis-cell
|
||||
RUN \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/src/web3-proxy/target \
|
||||
--mount=type=cache,target=/usr/src/web3_proxy/target \
|
||||
{ \
|
||||
set -eux; \
|
||||
git clone -b v0.3.0 https://github.com/brandur/redis-cell .; \
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "web3-proxy"
|
||||
name = "web3_proxy"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
default-run = "web3_proxy"
|
||||
|
@ -438,7 +438,7 @@ impl Web3ProxyApp {
|
||||
let frontend_rate_limiter = redis_client_pool.as_ref().map(|redis_client_pool| {
|
||||
RedisCellClient::new(
|
||||
redis_client_pool.clone(),
|
||||
"web3-proxy",
|
||||
"web3_proxy",
|
||||
"frontend",
|
||||
public_max_burst,
|
||||
app_config.shared.public_rate_limit_per_minute,
|
||||
|
@ -6,7 +6,7 @@ use tracing::info;
|
||||
use web3_proxy::app::get_migrated_db;
|
||||
|
||||
#[derive(Debug, FromArgs)]
|
||||
/// Command line interface for admins to interact with web3-proxy
|
||||
/// Command line interface for admins to interact with web3_proxy
|
||||
pub struct TopConfig {
|
||||
/// what database the client should connect to
|
||||
#[argh(
|
||||
|
@ -12,7 +12,7 @@ use crate::connection::Web3Connection;
|
||||
pub type BlockAndRpc = (Arc<Block<TxHash>>, Arc<Web3Connection>);
|
||||
|
||||
#[derive(Debug, FromArgs)]
|
||||
/// Web3-proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.
|
||||
/// Web3_proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.
|
||||
pub struct CliConfig {
|
||||
/// what port the proxy should listen on
|
||||
#[argh(option, default = "8544")]
|
||||
|
@ -151,7 +151,7 @@ impl Web3Connection {
|
||||
let period = 1;
|
||||
RedisCellClient::new(
|
||||
redis_conection,
|
||||
"web3-proxy",
|
||||
"web3_proxy",
|
||||
&format!("{}:{}", chain_id, url_str),
|
||||
hard_rate_limit,
|
||||
hard_rate_limit,
|
||||
|
Loading…
Reference in New Issue
Block a user