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

Otterscan fails to load wallet history and block transactions with anvil local fork #7881

Closed
2 tasks done
Tracked by #8269
Nikotos opened this issue May 7, 2024 · 5 comments
Closed
2 tasks done
Tracked by #8269
Labels
C-anvil Command: anvil T-bug Type: bug T-to-investigate Type: to investigate
Milestone

Comments

@Nikotos
Copy link

Nikotos commented May 7, 2024

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (6da2ff4 2024-05-07T10:40:04.621682000Z)

What command(s) is the bug in?

anvil --fork-url --fork-block-number

Operating System

macOS (Apple Silicon)

Describe the bug

it seems to be couple of bugs, even after their patches fixing it. (issue-7516) (#7516)

latest foundry commit isn’t fixing this issue (6da2ff4)

Long story short:

  1. Otterscan can’t fetch the wallets history
  2. Otterscan can’t fetch transactions in local fork blocks

it seems to be caused by the behavior of the:
a) ots_searchTransactionsBefore
b) ots_searchTransactionsAfter
c) ots_getBlockTransactions

checked with several other developers, they have the same problem

@Nikotos Nikotos added the T-bug Type: bug label May 7, 2024
@zerosnacks zerosnacks added the C-anvil Command: anvil label Jun 27, 2024
@zerosnacks zerosnacks added the T-to-investigate Type: to investigate label Jul 15, 2024
@zerosnacks
Copy link
Member

Hi @Nikotos thanks for the report

Would you be able to provide a minimal reproduction with steps?

@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@petscheit
Copy link

I am having a similar problem. When I access the block txs list via otterscan, anvil crashes.

I run: anvil -f <MY_FORK_RPC> -p 6900

and then: docker run --rm -p 5100:80 --name otterscan -e ERIGON_URL="http://localhost:6900" otterscan/otterscan:latest

Anvil crashes with the following error:

eth_getTransactionReceipt
thread 'tokio-runtime-worker' panicked at crates/anvil/src/eth/otterscan/api.rs:409:73:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I am running anvil 0.2.0

@zerosnacks
Copy link
Member

For future reference:

self.backend.get_block(r.block_number.unwrap()).unwrap().header.timestamp;

@grandizzy
Copy link
Collaborator

I am having a similar problem. When I access the block txs list via otterscan, anvil crashes.

I am not able to reproduce anvil crash, otterscan docker started:

image

and anvil keeps up even under heavy load

image

@jenpaff
Copy link
Collaborator

jenpaff commented Sep 26, 2024

closing as this seems to be fixed, please re-open if the issue still occurs

@jenpaff jenpaff closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-bug Type: bug T-to-investigate Type: to investigate
Projects
None yet
Development

No branches or pull requests

5 participants