alloy-rs / alloy-rs/alloy

[Bug] recursion limit exceeded when deserialization

オープン
#1,156 コメント 10 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug c-rpc-type-trace
主要言語
Rust
スター
1.3k
フォーク
668
平均マージ
2日 2時間
マージ済み PR(30日)
29

説明

### Component

network, json-rpc

### What version of Alloy are you on?

alloy v0.2.1

### Operating System

Linux

### Describe the bug

The function [`try_deserialize_ok`](https://github.com/alloy-rs/alloy/blob/main/crates/json-rpc/src/result.rs#L68) will return a deserialization error when recursion limit exceeded.

### Reproduce Example

Using `debug_trace_block_by_number` with `CallTracer` option to trace Block [15413811](https://etherscan.io/block/15413811)

**Code**

```rust
let block_number = 15413811;
let geth_trace_options = GethDebugTracingOptions::default().with_tracer(
GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer),
);
let geth_trace_results = provider
.debug_trace_block_by_number(block_number.into(), geth_trace_options)
.await?;
println!("{}", geth_trace_results.len());
```

**Result**
```
Error: deserialization error: recursion limit exceeded at line 1 column 200590

Caused by:
recursion limit exceeded at line 1 column 200590
```

**Reason**

The recursion limit is not large enough to handle call traces of these two transactions [tx1](https://etherscan.io/tx/0xad0b2e6a6cdc87800ce14ce6b8f4659c36f0121560d1855716859b521f159fe2#eventlog) and [tx2](https://etherscan.io/tx/0xaceacb7bbe075e5701638860e33de3dd60b480e4d0cfd7ce672ea0ab77412ba3#eventlog) inside.

```rust
let hash = b256!("aceacb7bbe075e5701638860e33de3dd60b480e4d0cfd7ce672ea0ab77412ba3");
let geth_trace_options = GethDebugTracingOptions::default().with_tracer(
GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer),
);
let geth_trace_results = provider
.debug_trace_transaction(hash, geth_trace_options)
.await;
println!("{}", geth_trace_results.is_err()); // true
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。