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

rpcdaemon: limit default max number of output traces in trace_filter #2670

Open
Sixtysixter opened this issue Jan 22, 2025 · 0 comments
Open
Assignees
Labels
enhancement New feature or improvement

Comments

@Sixtysixter
Copy link
Contributor

Sixtysixter commented Jan 22, 2025

Calling trace_filter API by providing toBlock >> fromBlock causes a long call execution.
For example:

{
  "request": {
    "id": 1,
    "jsonrpc": "2.0",
    "method": "trace_filter",
    "params": [
      {
        "fromBlock": 152918,
        "toBlock": 2446688
      }
    ]
  }

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
      {
        "action": {
        "callType": "call",
        "from": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",
        "gas": "0x7148",
        "input": "0x",
        "to": "0xef4f88a89dde9340a4ec680498aa1787ad608d8f",
        "value": "0xb301e9c3d8fe10"
      },
   ]
}

In order to mitigate this problem, we should limit the maximum number of traces contained in the response result to N, where N could be hard-coded or passed via CLI.
Such value N acts as a default value for the count input parameter.

@Sixtysixter Sixtysixter added the enhancement New feature or improvement label Jan 22, 2025
@Sixtysixter Sixtysixter self-assigned this Jan 22, 2025
@canepat canepat changed the title rpcdaemon: trace_filter long running rpcdaemon: limit default max number of output traces in trace_filter Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

1 participant