From fb6a1bb9d70c3795ef0aa15d1e701af1825d8aac Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 14 Jun 2022 06:54:19 +0000 Subject: [PATCH] block a bunch of commands --- web3-proxy/src/app.rs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/web3-proxy/src/app.rs b/web3-proxy/src/app.rs index 056c9050..91a01d98 100644 --- a/web3-proxy/src/app.rs +++ b/web3-proxy/src/app.rs @@ -374,6 +374,46 @@ impl Web3ProxyApp { let span = info_span!("rpc_request"); // let _enter = span.enter(); // DO NOT ENTER! we can't use enter across awaits! (clippy lint soon) match &request.method[..] { + "admin_addPeer" + | "admin_datadir" + | "admin_startRPC" + | "admin_startWS" + | "admin_stopRPC" + | "admin_stopWS" + | "debug_chaindbCompact" + | "debug_freezeClient" + | "debug_goTrace" + | "debug_mutexProfile" + | "debug_setBlockProfileRate" + | "debug_setGCPercent" + | "debug_setHead" + | "debug_setMutexProfileFraction" + | "debug_standardTraceBlockToFile" + | "debug_standardTraceBadBlockToFile" + | "debug_startCPUProfile" + | "debug_startGoTrace" + | "debug_stopCPUProfile" + | "debug_stopGoTrace" + | "debug_writeBlockProfile" + | "debug_writeMemProfile" + | "debug_writeMutexProfile" + | "les_addBalance" + | "les_setClientParams" + | "les_setDefaultParams" + | "miner_setExtra" + | "miner_setGasPrice" + | "miner_start" + | "miner_stop" + | "miner_setEtherbase" + | "miner_setGasLimit" + | "personal_importRawKey" + | "personal_listAccounts" + | "personal_lockAccount" + | "personal_newAccount" + | "personal_unlockAccount" + | "personal_sendTransaction" + | "personal_sign" + | "personal_ecRecover" => Err(anyhow::anyhow!("unimplemented")), "eth_sendRawTransaction" => { // there are private rpcs configured and the request is eth_sendSignedTransaction. send to all private rpcs // TODO: think more about this lock. i think it won't actually help the herd. it probably makes it worse if we have a tight lag_limit