This commit is contained in:
Bryan Stitt 2022-05-12 19:58:26 +00:00
parent f82f5ea544
commit 81abf901c2
3 changed files with 14 additions and 6 deletions

@ -1,4 +1,4 @@
FROM rust:1-buster as builder
FROM rust:1-bullseye as builder
WORKDIR /usr/src/web3-proxy
COPY . .
@ -6,7 +6,10 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/src/web3-proxy/target \
cargo install --locked --path ./web3-proxy
FROM debian:buster-slim
FROM debian:bullseye-slim
COPY --from=builder /usr/local/cargo/bin/web3-proxy /usr/local/bin/web3-proxy
ENTRYPOINT ["web3-proxy"]
# TODO: lower log level when done with prototyping
ENV RUST_LOG "web3_proxy=debug"

@ -5,13 +5,18 @@ chain_id = 1
[balanced_rpc_tiers.0]
[balanced_rpc_tiers.0.erigon_archive]
url = "ws://127.0.0.1:8549"
# TODO: double check soft_limit on erigon
soft_limit = 100_000
[balanced_rpc_tiers.0.geth]
url = "ws://127.0.0.1:8546"
soft_limit = 200_000
#[balanced_rpc_tiers.0.ankr]
#url = "https://rpc.ankr.com/eth"
#soft_limit = 3_000
[balanced_rpc_tiers.0.ankr]
url = "https://rpc.ankr.com/eth"
soft_limit = 3_000
[private_rpcs]

@ -302,7 +302,7 @@ pub struct ActiveRequestHandle(Arc<Web3Connection>);
impl ActiveRequestHandle {
fn new(connection: Arc<Web3Connection>) -> Self {
// TODO: attach the incoming id to this? will be helpful for logging
// TODO: attach a unique id to this
// TODO: what ordering?!
connection
.active_requests