From 805cb6ad1028ee7e93f6b7b6fd240ca777f66e80 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 8 Aug 2023 17:40:26 -0700 Subject: [PATCH] ignore alchemy_ methods --- web3_proxy/src/app/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index d1412266..df7189c0 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -1633,6 +1633,12 @@ impl Web3ProxyApp { // TODO: emit a stat? will probably just be noise return Err(Web3ProxyError::AccessDenied("admin methods are not allowed".into())); } + if method.starts_with("alchemy_") { + return Err(JsonRpcErrorData::from(format!( + "the method {} does not exist/is not available", + method + )).into()); + } // TODO: if no servers synced, wait for them to be synced? probably better to error and let haproxy retry another server let head_block: Web3ProxyBlock = head_block