Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve logging on mismatched results #1

Open
BlinkyStitt opened this issue Nov 1, 2023 · 0 comments
Open

improve logging on mismatched results #1

BlinkyStitt opened this issue Nov 1, 2023 · 0 comments

Comments

@BlinkyStitt
Copy link
Contributor

% ethspam --rpc https://ethereum.llamarpc.com | head -n10 | cargo run -- https://ethereum.llamarpc.com https://ethereum-staging.llamarpc.com https://rpc.ankr.com/eth
   Compiling versus-rs v0.1.0 (/Users/bryan/llamanodes/versus-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 2.25s
     Running `target/debug/versus-rs 'https://ethereum.llamarpc.com' 'https://ethereum-staging.llamarpc.com' 'https://rpc.ankr.com/eth'`
https://ethereum.llamarpc.com: chain_id 1
https://ethereum-staging.llamarpc.com: chain_id 1
https://rpc.ankr.com/eth: chain_id 1
sent 10/1000 requests
https://rpc.ankr.com/eth 0: {"accessList":[],"blockHash":"0x5b9fa71584a126737c988bd591d0f4a776d7130a974e4b622f00d09c22950868","blockNumber":"0x119e250","chainId":"0x1","from":"0xd8d71d1cace4e671b2697df2ca0f3dc3b18954aa","gas":"0x1725d","gasPrice":"0x4e1be810e","hash":"0xd1884ff5391bd1b43964e9bafa397a91606fc9b340176fa8b3b41efe1ef84511","input":"0xa9059cbb0000000000000000000000001a67ace5970bb82bdf638ef477fb9f36be34a8c60000000000000000000000000000000000000000000000000000000002faf080","maxFeePerGas":"0x59f786060","maxPriorityFeePerGas":"0xe93f21","nonce":"0x0","r":"0x3cc3405d1234b81ec408751e1b02201907de475786464964f2e786723a249e74","s":"0x4fba7a654b8854713ae5337b5888049828390d1ea211cb21823d7562207a3c28","to":"0xdac17f958d2ee523a2206206994597c13d831ec7","transactionIndex":"0x30","type":"0x2","v":"0x1","value":"0x0"} != {"accessList":[],"blockHash":"0x5b9fa71584a126737c988bd591d0f4a776d7130a974e4b622f00d09c22950868","blockNumber":"0x119e250","chainId":"0x1","from":"0xd8d71d1cace4e671b2697df2ca0f3dc3b18954aa","gas":"0x1725d","gasPrice":"0x4e1be810e","hash":"0xd1884ff5391bd1b43964e9bafa397a91606fc9b340176fa8b3b41efe1ef84511","input":"0xa9059cbb0000000000000000000000001a67ace5970bb82bdf638ef477fb9f36be34a8c60000000000000000000000000000000000000000000000000000000002faf080","maxFeePerGas":"0x59f786060","maxPriorityFeePerGas":"0xe93f21","nonce":"0x0","r":"0x3cc3405d1234b81ec408751e1b02201907de475786464964f2e786723a249e74","s":"0x4fba7a654b8854713ae5337b5888049828390d1ea211cb21823d7562207a3c28","to":"0xdac17f958d2ee523a2206206994597c13d831ec7","transactionIndex":"0x30","type":"0x2","v":"0x1","value":"0x0","yParity":"0x1"}
https://rpc.ankr.com/eth 8: [] != JsonRpcClientError(SerdeJson { err: Error("invalid type: null, expected u64", line: 1, column: 86), text: "{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32600,\"message\":\"block range is too wide\"},\"id\":null}" })
Error: mismatched results!
  1. request 0 failed because ankr adds a non-standard "yParity" field. It would be nice if the matching fields were hidden and only the mismatched fields showed. the formatting is also hard to follow. The order is rpc, id, primary response, rpc response which isn't very intuitive

  2. request 8 failed because ankr limits eth_getLogs ranges. The annoying part is that ethers fails to parse because they are too strict about requiring integer ids. Besides not using ethers or forking it, the only way I see to improve this is using reqwest directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant