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

Verbose error logging from foundry_zksync_core::vm::inspect #870

Closed
dutterbutter opened this issue Jan 24, 2025 · 2 comments
Closed

Verbose error logging from foundry_zksync_core::vm::inspect #870

dutterbutter opened this issue Jan 24, 2025 · 2 comments
Assignees
Labels
bug 🐛 Something isn't working

Comments

@dutterbutter
Copy link
Collaborator

Steps to reproduce:

  1. git clone [email protected]:coffeexcoin/foundry-zksync-create-prank-error-repro.git
  2. forge test --zksync -vvvv
  3. Tests pass but we can a heavy stream of logged error message:
2025-01-24T21:20:10.419996Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=4
2025-01-24T21:20:10.425820Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=5
2025-01-24T21:20:10.426618Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=2
2025-01-24T21:20:10.433479Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=4
2025-01-24T21:20:10.439175Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=5
2025-01-24T21:20:10.440174Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=2
2025-01-24T21:20:10.446524Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=4
2025-01-24T21:20:10.452201Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL 
2025-01-24T21:20:12.935597Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=2
2025-01-24T21:20:12.935668Z ERROR foundry_zksync_core::vm::inspect: reverting initiator tx nonce for CALL address=0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38 from=3 to=2 deploy_nonce=5
....

Expected Behaviour

Run the tests and see only:

Ran 2 tests for test/CounterWorksNoPrank.t.sol:CounterTestFails
[PASS] testFuzz_SetNumber(uint256) (runs: 256, μ: 249474, ~: 247830)
Logs:
  counter 0xF9E9ba9Ed9B96AB918c74B21dD0f1D5f2ac38a30
  counter2 0x6914631e3e71Bc75A1664e3BaEE140CC05cAE18B
  counter3 0x6b3D9bf4377eF0A0BE817B9e7B8D486AEE3b7876

Traces:
  [237830] CounterTestFails::testFuzz_SetNumber(32)
    ├─ [119231] Counter::setNumber(32)
    │   └─ ← [Return] 
    ├─ [109890] Counter::number() [staticcall]
    │   └─ ← [Return] 32
    ├─ [0] VM::assertEq(32, 32) [staticcall]
    │   └─ ← [Return] 
    └─ ← [Stop] 

[PASS] test_Increment() (gas: 237761)
Logs:
  counter 0xF9E9ba9Ed9B96AB918c74B21dD0f1D5f2ac38a30
  counter2 0x6914631e3e71Bc75A1664e3BaEE140CC05cAE18B
  counter3 0x6b3D9bf4377eF0A0BE817B9e7B8D486AEE3b7876

Traces:
  [237761] CounterTestFails::test_Increment()
    ├─ [119196] Counter::increment()
    │   └─ ← [Return] 
    ├─ [109890] Counter::number() [staticcall]
    │   └─ ← [Return] 1
    ├─ [0] VM::assertEq(1, 1) [staticcall]
    │   └─ ← [Return] 
    └─ ← [Stop] 

Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 3.53s (3.50s CPU time)

Ran 3 test suites in 3.53s (10.54s CPU time): 6 tests passed, 0 failed, 0 skipped (6 total tests)
@dutterbutter dutterbutter added bug 🐛 Something isn't working needs triage ♟️ Issue needs to be picked up or assigned labels Jan 24, 2025
@Jrigada Jrigada self-assigned this Jan 25, 2025
@dutterbutter dutterbutter removed the needs triage ♟️ Issue needs to be picked up or assigned label Jan 27, 2025
@Jrigada
Copy link
Contributor

Jrigada commented Jan 27, 2025

#873 (review)

@Jrigada Jrigada closed this as completed Jan 27, 2025
@Jrigada
Copy link
Contributor

Jrigada commented Jan 27, 2025

This should be resolved, the correct log level should be debug. Thanks @dutterbutter

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

No branches or pull requests

2 participants