From 0b97ee56964505ac3f77805530daa312f4c427d4 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 7 Aug 2023 15:31:56 -0700 Subject: [PATCH] dump some notes --- TODO.md | 9 +++++++- docs/influx notes.txt | 7 +++++++ docs/misc curl.bash | 48 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 docs/influx notes.txt create mode 100644 docs/misc curl.bash diff --git a/TODO.md b/TODO.md index e008a958..1ae3559c 100644 --- a/TODO.md +++ b/TODO.md @@ -745,4 +745,11 @@ in another repo: event subscriber - [ ] tests for config reloading - [ ] use pin instead of arc for a bunch of things? - https://fasterthanli.me/articles/pin-and-suffering -- [ ] calculate archive depth automatically based on block_data_limits \ No newline at end of file +- [ ] calculate archive depth automatically based on block_data_limits +- `[2023-04-11T05:40:33Z ERROR ethers_providers::rpc::transports::ws::backend] Failed to deserialize message e=invalid type: null, expected u64 at line 1 column 26` + - "Post http://127.0.0.1:8544: net/http: request canceled (Client.Timeout exceeded while awaiting headers)" + - probably need to have a max count on how long we wait for a response +- [ ] do we need lto = true? is that the default on release? +- [x] we want rate limits based on request latency instead of head latency. low head latency already increases the chance that the server will be seen +- [x] server selection isn't picking lagged archive servers correctly +- [x] sending an empty block on disconnect is bad. the rpc name is used as a key instead of the arc. so the new connection's block is cleared diff --git a/docs/influx notes.txt b/docs/influx notes.txt new file mode 100644 index 00000000..6ecce300 --- /dev/null +++ b/docs/influx notes.txt @@ -0,0 +1,7 @@ +influx config set -n llamanodes_staging -a +influx delete --bucket web3_proxy --start 2023-01-01T00:00:00-00:00 --stop "$(date +"%Y-%m-%dT%H:%M:%SZ")" --predicate _measurement="global_proxy" +influx delete --bucket web3_proxy --start 2023-01-01T00:00:00-00:00 --stop "$(date +"%Y-%m-%dT%H:%M:%SZ")" --predicate _measurement="opt_in_proxy" + +influx config set -n llamanodes_production -a +influx delete --bucket web3_proxy --start 2023-07-18T18:00:00-07:00 --stop "$(date +"%Y-%m-%dT%H:%M:%SZ")" --predicate _measurement="global_proxy" +influx delete --bucket web3_proxy --start 2023-07-18T18:00:00-07:00 --stop "$(date +"%Y-%m-%dT%H:%M:%SZ")" --predicate _measurement="opt_in_proxy" diff --git a/docs/misc curl.bash b/docs/misc curl.bash new file mode 100644 index 00000000..8e612dfd --- /dev/null +++ b/docs/misc curl.bash @@ -0,0 +1,48 @@ +#!/bin/bash +set -eux -o pipefail + +curl --verbose -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","id":1}' http://127.0.0.1:8544/debug/$dev_rpc_key +curl --verbose -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' http://127.0.0.1:8544/debug/$dev_rpc_key +curl --verbose -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance", "params": ["0x0000000000000000000000000000000000000000", "latest"],"id":1}' http://127.0.0.1:8544/debug/$dev_rpc_key + +curl --verbose -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","id":1}' https://eth.llamarpc.com/debug/$prod_rpc_key +curl --verbose -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' https://eth.llamarpc.com/debug/$prod_rpc_key +curl --verbose -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance", "params": ["0x0000000000000000000000000000000000000000", "latest"],"id":1}' https://eth.llamarpc.com/debug/$prod_rpc_key + +# TODO: what chain? +curl http://127.0.0.1:8544 -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' + +curl http://127.0.0.1:8544 -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' + +# polygon +# {"jsonrpc":"2.0","id":2,"method":"eth_getLogs","params":[{"address":"0xbB35ef85FEF432bd918276A41dd6e04d1dBA5d42","fromBlock":"0x263e5b2","toBlock":"0x263e5bc","topics":["0x3de57033544efee8507d277ad65c808de56c31849180038a1e673db86d1c362d"]} + +# eth +curl http://127.0.0.1:8544 \ + -X POST \ + -H "Content-Type: application/json" \ + --data '{"method":"eth_getLogs","params":[{"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"}],"id":1,"jsonrpc":"2.0"}' + +curl https://eth.llamarpc.com/ \ + -X POST \ + -H "Content-Type: application/json" \ + --data '{"method":"eth_getLogs","params":[{"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"}],"id":1,"jsonrpc":"2.0"}' + +curl http://127.0.0.1:8545/ \ + -X POST \ + -H "Content-Type: application/json" \ + --data '{"method":"eth_getLogs","params":[{"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"}],"id":1,"jsonrpc":"2.0"}' + +curl http://127.0.0.1:8545 \ + -X POST \ + -H "Content-Type: application/json" \ + --data '{"method":"eth_getTransactionReceipt","params":["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"],"id":1,"jsonrpc":"2.0"}' + +curl https://eth.llamarpc.com \ + -X POST \ + -H "Content-Type: application/json" \ + --data '{"method":"eth_getTransactionReceipt","params":["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"],"id":1,"jsonrpc":"2.0"}'