zemse / hardhat-tracer

🕵️ allows you to see internal calls, events and storage operations in the console
MIT License
355 stars 36 forks source link

Tracer is not working with AA-Benchmark repo #84

Open filmakarov opened 3 weeks ago

filmakarov commented 3 weeks ago

Tried to trace tests for AA-Benchmarks repo with no success.

Steps to reproduce:

clone above repo

cp env.sample .env
pnpm i hardhat-tracer
\\ hardhat.config.ts
import "hardhat-tracer";

then

npx hardhat test --vvv

and no traces shown.

Can you please advise why can that happen?

I tried debug logs for tracer, and what I see is something like that:

  hardhat-tracer:wrapper wrapped request hardhat_setCode +0ms
  hardhat-tracer:wrapper shouldPrint=false, tracer.enabled: true, tracer.ignoreNext=false, tracer.printNext=false +0ms

with shouldPrint=false everywhere.

zemse commented 2 weeks ago

Thanks for reporting this issue. I had a quick look and based on the debug logs it appears that eth_sendTransaction or eth_sendRawTransaction was not used to confirm a transaction on the hardhat network when tests were running. Though I don't see why. I am trying to figure that out. Any ideas?

The way hardhat tracer works is when your tx executes on the hardhat network's EDR, it watches the runtime and notes down relevant the opcodes and then it is used to print the trace tree. It turns on the recorder when RPC like eth_sendTransaction is being used.

filmakarov commented 2 weeks ago

Thank you for your reply!

Any ideas?

No ideas so far. Doesn't look like repo is anyhow altering hardhat network. I'll let you know if I find something