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

[Bug] rpc server returns error: server returned an error response: error code -32600 #1190

Closed
HowHsu opened this issue Aug 26, 2024 · 4 comments · Fixed by #1193
Closed

[Bug] rpc server returns error: server returned an error response: error code -32600 #1190

HowHsu opened this issue Aug 26, 2024 · 4 comments · Fixed by #1193
Labels
bug Something isn't working

Comments

@HowHsu
Copy link

HowHsu commented Aug 26, 2024

Component

rpc

What version of Alloy are you on?

Latest

Operating System

Linux

Describe the bug

my code is:

        let contract = Contract::new(con_addr, self.sp.clone());
        let call_builder = contract.register(name, bio, url).value(value);   
        let pending_tx = call_builder.send().await.unwrap();

I'm using hardhat local node to test my code, and the call_builder.send().await.unwrap() causes below error.
Here sp is a http_provider.

[2024-08-26T04:14:01Z DEBUG alloy_rpc_client::poller] poller; method=eth_blockNumber
[2024-08-26T04:14:01Z DEBUG alloy_rpc_client::call] sending request method=eth_blockNumber id=5
[2024-08-26T04:14:01Z DEBUG alloy_transport_http::reqwest_transport] ReqwestTransport; url=http://127.0.0.1:8545/
[2024-08-26T04:14:01Z DEBUG hyper_util::client::legacy::pool] reuse idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T04:14:01Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T04:14:01Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK
[2024-08-26T04:14:01Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=116
[2024-08-26T04:14:01Z ERROR alloy_rpc_client::poller] failed to poll err=server returned an error response: error code -32600: Invalid request, data: {"message":"Invalid request"}
@HowHsu HowHsu added the bug Something isn't working label Aug 26, 2024
@alloy-rs alloy-rs deleted a comment Aug 26, 2024
@DaniPopes
Copy link
Member

Can you show trace level logs?

@HowHsu
Copy link
Author

HowHsu commented Aug 26, 2024

[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)                                                                                   
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)                                                                                    
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK                                                                                      
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=43                                                                      
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":0,"result":"0x3786b"}                                                                   
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;                                                                                                                                       
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserializing response ty=ruint::Uint<128, 2> json="\"0x3786b\""                                                                                  
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserialized response response=227435                                                                                                             
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse                                                                                                       
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse                                                                                                       
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse                                                                                                       
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse                                                                                                       
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)                                                                                   
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)                                                                                    
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK                                                                                      
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=545                                                                     
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":["0x2938f8bf","0x24147d73","0x20342944","0x1cdf56a5","0x19a7
2ee8","0x1706d481","0x14304839","0x11b1440a","0xf851055","0xd9fed33","0xbf2e172"],"gasUsedRatio":[0.0010006,0.07025716666666666,0.08621733333333334,0.053988633333333334,0.090477,0.006993099999999999
5,0.0054323,0.0087928,0.011573666666666666,0.007964500000000001],"oldestBlock":"0x3","reward":[["0xaf32212"],["0x9957152"],["0x88ddaf6"],["0x7ab5303"],["0x6d06875"],["0x61dd072"],["0x55cd32f"],["0x4
b31612"],["0x41f5856"],["0x73dddbc"]]}}                                                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;                                                                                                                               
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;                                                                                                                                       
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserializing response ty=alloy_rpc_types_eth::fee::FeeHistory json="{\"baseFeePerGas\":[\"0x2938f8bf\",\"0x24147d73\",\"0x20342944\",\"0x1cdf56a5
\",\"0x19a72ee8\",\"0x1706d481\",\"0x14304839\",\"0x11b1440a\",\"0xf851055\",\"0xd9fed33\",\"0xbf2e172\"],\"gasUsedRatio\":[0.0010006,0.07025716666666666,0.08621733333333334,0.053988633333333334,0.0
90477,0.0069930999999999995,0.0054323,0.0087928,0.011573666666666666,0.007964500000000001],\"oldestBlock\":\"0x3\",\"reward\":[[\"0xaf32212\"],[\"0x9957152\"],[\"0x88ddaf6\"],[\"0x7ab5303\"],[\"0x6d
06875\"],[\"0x61dd072\"],[\"0x55cd32f\"],[\"0x4b31612\"],[\"0x41f5856\"],[\"0x73dddbc\"]]}"                                                                                                           
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserialized response response=FeeHistory { base_fee_per_gas: [691599551, 605322611, 540289348, 484398757, 430386920, 386323585, 338708537, 296829
962, 260378709, 228584755, 200466802], gas_used_ratio: [0.0010006, 0.07025716666666666, 0.08621733333333334, 0.053988633333333334, 0.090477, 0.0069930999999999995, 0.0054323, 0.0087928, 0.0115736666
66666666, 0.007964500000000001], base_fee_per_blob_gas: [], blob_gas_used_ratio: [], oldest_block: 3, reward: Some([[183706130], [160788818], [143514358], [128668419], [114321525], [102617202], [899
69455], [78845458], [69163094], [121494972]]) }
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=42
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":3,"result":"0x7a69"}
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserializing response ty=ruint::Uint<64, 1> json="\"0x7a69\""
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserialized response response=31337
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=39
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":2,"result":"0x1"}
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserializing response ty=ruint::Uint<64, 1> json="\"0x1\""
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserialized response response=1
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=Prepared
[2024-08-26T09:14:28Z DEBUG alloy_rpc_client::call] sending request method=eth_sendRawTransaction id=4
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] full request params_ty=(alloc::string::String,) request=Request { meta: RequestMeta { method: "eth_sendRawTransaction", id: Number(4), is_subscrip
tion: false }, params: ("0x02f9019b827a69018407072318842246fd7e8303786b945fbdb2315678afecb367f032d93f642f64180aa3888ac7230489e80000b901244cd08d0300000000000000000000000000000000000000000000000000000
0000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000
00009746573745f6e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f62696f0000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000008746573745f75726c000000000000000000000000000000000000000000000000c080a0134f57f1ce0e38bb6c8b24249c7416c4cc43654c1f52747529d5256e31c11afaa
0231c9f32ca279c48cfa25fe1ac6c59678fbcfc14099b08abdb03fdd6b2b8d514",) }
[2024-08-26T09:14:28Z DEBUG alloy_rpc_client::poller] poller; method=eth_blockNumber
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] serialized request request={"method":"eth_sendRawTransaction","params":["0x02f9019b827a69018407072318842246fd7e8303786b945fbdb2315678afecb367f032d
93f642f64180aa3888ac7230489e80000b901244cd08d03000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000
000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000009746573745f6e616d65000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000008746573745f62696f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f75726c0000000000000000000
00000000000000000000000000000c080a0134f57f1ce0e38bb6c8b24249c7416c4cc43654c1f52747529d5256e31c11afaa0231c9f32ca279c48cfa25fe1ac6c59678fbcfc14099b08abdb03fdd6b2b8d514"],"id":4,"jsonrpc":"2.0"}
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] ReqwestTransport; url=http://127.0.0.1:8545/
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> poller;
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::poller] polling
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=Prepared
[2024-08-26T09:14:28Z DEBUG alloy_rpc_client::call] sending request method=eth_blockNumber id=5
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] take? ("http", 127.0.0.1:8545): expiration = Some(90s)
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] full request params_ty=&serde_json::raw::RawValue request=Request { meta: RequestMeta { method: "eth_blockNumber", id: Number(5), is_subscription:
 false }, params: RawValue(null) }
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] reuse idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] serialized request request={"method":"eth_blockNumber","params":null,"id":5,"jsonrpc":"2.0"}
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] ReqwestTransport; url=http://127.0.0.1:8545/
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] take? ("http", 127.0.0.1:8545): expiration = Some(90s)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] reuse idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- poller;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> poller;
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=116
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Invalid request","data":{"message":"Invalid reque
st"}}}
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;
[2024-08-26T09:14:28Z ERROR alloy_rpc_client::poller] failed to poll err=server returned an error response: error code -32600: Invalid request, data: {"message":"Invalid request"}
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- poller;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> poller;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- poller;
[2024-08-26T09:14:28Z TRACE tracing::span] -- poller;
[2024-08-26T09:14:28Z DEBUG alloy_provider::chain] polling stream ended
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=102
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":4,"result":"0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364"}
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserializing response ty=alloy_primitives::bits::fixed::FixedBytes<32> json="\"0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364
\""
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserialized response response=0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=Prepared
[2024-08-26T09:14:28Z DEBUG alloy_rpc_client::call] sending request method=eth_getTransactionReceipt id=6
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] full request params_ty=(alloy_primitives::bits::fixed::FixedBytes<32>,) request=Request { meta: RequestMeta { method: "eth_getTransactionReceipt",
 id: Number(6), is_subscription: false }, params: (0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364,) }
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] serialized request request={"method":"eth_getTransactionReceipt","params":["0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364"],"
id":6,"jsonrpc":"2.0"}
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] ReqwestTransport; url=http://127.0.0.1:8545/
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] take? ("http", 127.0.0.1:8545): expiration = Some(90s)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] reuse idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=AwaitingResponse
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE hyper_util::client::legacy::pool] put; add idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", 127.0.0.1:8545)
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] received response from server status=200 OK
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] retrieved response body. Use `trace` for full body bytes=2190
[2024-08-26T09:14:28Z TRACE alloy_transport_http::reqwest_transport] response body body={"jsonrpc":"2.0","id":6,"result":{"blockHash":"0x38cf903698c4cbd387fdc34e1bb88a84c992dbf153c4fe4175d3240d46724
55e","blockNumber":"0xd","contractAddress":null,"cumulativeGasUsed":"0x3786b","effectiveGasPrice":"0x12fa048a","from":"0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199","gasUsed":"0x3786b","logs":[{"addre
ss":"0x5fbdb2315678afecb367f032d93f642f64180aa3","blockHash":"0x38cf903698c4cbd387fdc34e1bb88a84c992dbf153c4fe4175d3240d4672455e","blockNumber":"0xd","data":"0x00000000000000000000000000000000000000
000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000008626f6940e2eb28930ef
b4cef49b2d1f2c9c11990000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000009746573745f6e616d6500000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f62696f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000008746573745f75726c000000000000000000000000000000000000000000000000","logIndex":"0x0","removed":false,"topics":["0xf3101cfe3d26514f241cf20c3d7a54005b8b9461513f23b9f3446d3342544b7b","0x000000000
0000000000000000000000000000000000000000000000000000001"],"transactionHash":"0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364","transactionIndex":"0x0"}],"logsBloom":"0x00000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000040000000000
000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000200000000000000000000000000000000000000000000001000000000000000000000000000000040000000000000000
000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","to":"0x5fbdb2315678afecb367f032d93f642f64180aa3","transactionHash":"0x94a36
f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364","transactionIndex":"0x0","type":"0x2"}}
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] -> ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span::active] <- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE tracing::span] -- ReqwestTransport;
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserializing response ty=core::option::Option<alloy_rpc_types_eth::transaction::receipt::TransactionReceipt> json="{\"blockHash\":\"0x38cf903698c
4cbd387fdc34e1bb88a84c992dbf153c4fe4175d3240d4672455e\",\"blockNumber\":\"0xd\",\"contractAddress\":null,\"cumulativeGasUsed\":\"0x3786b\",\"effectiveGasPrice\":\"0x12fa048a\",\"from\":\"0x8626f6940
e2eb28930efb4cef49b2d1f2c9c1199\",\"gasUsed\":\"0x3786b\",\"logs\":[{\"address\":\"0x5fbdb2315678afecb367f032d93f642f64180aa3\",\"blockHash\":\"0x38cf903698c4cbd387fdc34e1bb88a84c992dbf153c4fe4175d3
240d4672455e\",\"blockNumber\":\"0xd\",\"data\":\"0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000
00000000000000000000000000000000000000000001200000000000000000000000008626f6940e2eb28930efb4cef49b2d1f2c9c11990000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000
0000000000000000000000000000000000000009746573745f6e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f62696f00000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f75726c000000000000000000000000000000000000000000000000\",\"logIndex\":\"0x0\",\"removed\":
false,\"topics\":[\"0xf3101cfe3d26514f241cf20c3d7a54005b8b9461513f23b9f3446d3342544b7b\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"],\"transactionHash\":\"0x94a36f733710b
f53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364\",\"transactionIndex\":\"0x0\"}],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000200000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000
000000000000000000200000000000000000000000000000000000000000000001000000000000000000000000000000040000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000
000000000000000000000\",\"status\":\"0x1\",\"to\":\"0x5fbdb2315678afecb367f032d93f642f64180aa3\",\"transactionHash\":\"0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364\",\"transact
ionIndex\":\"0x0\",\"type\":\"0x2\"}"
[2024-08-26T09:14:28Z TRACE alloy_json_rpc::result] deserialized response response=Some(TransactionReceipt { inner: Eip1559(ReceiptWithBloom { receipt: Receipt { status: Eip658(true), cumulative_gas
_used: 227435, logs: [Log { inner: Log { address: 0x5fbdb2315678afecb367f032d93f642f64180aa3, data: LogData { topics: [0xf3101cfe3d26514f241cf20c3d7a54005b8b9461513f23b9f3446d3342544b7b, 0x000000000
0000000000000000000000000000000000000000000000000000001], data: 0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000
0000000000000000000000000000000000000000000000000000000001200000000000000000000000008626f6940e2eb28930efb4cef49b2d1f2c9c11990000000000000000000000000000000000000000000000008ac7230489e800000000000000
000000000000000000000000000000000000000000000000000009746573745f6e616d6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f62696f
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008746573745f75726c000000000000000000000000000000000000000000000000 } }, block_hash: Some
(0x38cf903698c4cbd387fdc34e1bb88a84c992dbf153c4fe4175d3240d4672455e), block_number: Some(13), block_timestamp: None, transaction_hash: Some(0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395
b744f364), transaction_index: Some(0), log_index: Some(0), removed: false }] }, logs_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200
000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000
000000000200000000000000000000000000000000000000000000001000000000000000000000000000000040000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000
000000000000 }), transaction_hash: 0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364, transaction_index: Some(0), block_hash: Some(0x38cf903698c4cbd387fdc34e1bb88a84c992dbf153c4fe41
75d3240d4672455e), block_number: Some(13), gas_used: 227435, effective_gas_price: 318375050, blob_gas_used: None, blob_gas_price: None, from: 0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199, to: Some(0x5
fbdb2315678afecb367f032d93f642f64180aa3), contract_address: None, state_root: None, authorization_list: None })
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] polling RpcCall self.state=Prepared
[2024-08-26T09:14:28Z DEBUG alloy_rpc_client::call] sending request method=eth_getTransactionReceipt id=7
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] full request params_ty=(alloy_primitives::bits::fixed::FixedBytes<32>,) request=Request { meta: RequestMeta { method: "eth_getTransactionReceipt",
 id: Number(7), is_subscription: false }, params: (0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364,) }
[2024-08-26T09:14:28Z TRACE alloy_rpc_client::call] serialized request request={"method":"eth_getTransactionReceipt","params":["0x94a36f733710bf53a9f117d2facec055b6b6f664f4018fd7b0ad8395b744f364"],"
id":7,"jsonrpc":"2.0"}
[2024-08-26T09:14:28Z DEBUG alloy_transport_http::reqwest_transport] ReqwestTransport; url=http://127.0.0.1:8545/

@HowHsu
Copy link
Author

HowHsu commented Aug 26, 2024

Can you show trace level logs?

It's a bit long, I don't know how to upload a file, so I just put it in the comment. There is only one ERROR, I copied logs around it.

@DaniPopes
Copy link
Member

Thanks for the report, we're serializing empty parameters as null when it should either be omitted or an empty array, as per JSON-RPC 2.0. This is fixed with #1193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants