From 923c3803cf9dcbc77541a9348faed7e61bee31ee Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 4 Mar 2022 20:59:11 -0800 Subject: [PATCH 1/2] Update README.md --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b3d58ef..f8a2921f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ # web3-proxy -quick and dirty proxy for ethereum nodes (or similar) +quick and dirty proxy for ethereum rpcs (or similar) + +Signed transactions are sent to the configured private RPC (eden, flashbots, etc.). All other requests are sent to the configured primary RPC (alchemy, moralis, rivet, your own node, or one of many other providers). ``` -% cargo run -- --help +cargo run -- --help +``` +``` Finished dev [unoptimized + debuginfo] target(s) in 0.04s Running `target/debug/eth-proxy --help` Usage: eth-proxy --eth-primary-rpc --eth-private-rpc [--listen-port ] @@ -14,5 +18,24 @@ Options: --eth-private-rpc the private Ethereum RPC server --listen-port the port to listen on --help display usage information +``` ``` +cargo run -- --eth-primary-rpc "https://your.favorite.provider" +``` + +``` +curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' 127.0.0.1:8845/eth +``` + + +## Todo + +- [x] simple proxy +- [ ] proper logging +- [ ] load balance between multiple RPC servers +- [ ] support more than just ETH +- [ ] option to disable private rpc and send everything to primary +- [ ] health check nodes by block height +- [ ] measure latency to nodes +- [ ] Dockerfile From 1b50cb361cde878ed5be93eb5d250be8d6c29936 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 4 Mar 2022 21:00:10 -0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8a2921f..c120c3a7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Options: ``` ``` -cargo run -- --eth-primary-rpc "https://your.favorite.provider" +cargo run -r -- --eth-primary-rpc "https://your.favorite.provider" ``` ```