matter-labs / era-test-node

In-memory node that can be used for integration testing and debugging.

Home Page:https://matter-labs.github.io/era-test-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hardhat_mine produces block timestamps incompatible with hardhat

vbar opened this issue Β· comments

πŸ› Bug Report for zkSync Era In-Memory Node

πŸ“ Description

Hardhat testsuite expects different timestamps in blocks produced by hardhat_mine called with an explicit interval parameter. As the results for the default interval are compatible, an error in test node is suspected.

πŸ”„ Reproduction Steps

Run the hardhat_mine test of the modified hardhat testsuite (available at https://github.com/eqlabs/hardhat ) against the latest test node.

πŸ€” Expected Behavior

As the hardhat_mine is a supported API, the test should pass.

😯 Current Behavior

The test fails.

πŸ–₯️ Environment

  • Rust version: nightly-2024-01-01, as specified in rust-toolchain.toml
  • Operating System & Version: Ubuntu 20.04.6

πŸ“Ž Log Output

$ mocha test/helpers/mine.ts -grep "should accept an interval"


  mine
    1) should accept an interval


  0 passing (507ms)
  1 failing

  1) mine
       should accept an interval:

      AssertionError: expected 59401001 to equal 60401
      + expected - actual

      -59401001
      +60401
      
      at Context.<anonymous> (test/helpers/mine.ts:54:12)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

Partial (but not complete) fix is in #321 .