foundry-zksync: The application panicked (crashed) - Integer overflow when casting to u64

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

0.0.10-foundry-zksync-v0.0.10

What version of Foundryup are you on?

No response

What command(s) is the bug in?

forge t --zksync

Operating System

None

Describe the bug

proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
The application panicked (crashed).
Message:  Integer overflow when casting to u64
Location: /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/primitive-types-0.12.2/src/lib.rs:38

This is a bug. Consider reporting it at https://github.com/matter-labs/foundry-zksync

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 9 frames hidden ⋮                               
  10: foundry_zksync_core::vm::runner::get_historical_block_hashes::h5d66cf1cf7b3dc14
      at <unknown source file>:<unknown line>
  11: foundry_zksync_core::vm::runner::call::h1f5a52cbb307841b
      at <unknown source file>:<unknown line>
  12: <foundry_strategy_zksync::cheatcode::runner::ZksyncCheatcodeInspectorStrategyRunner as foundry_cheatcodes::strategy::CheatcodeInspectorStrategyExt>::zksync_try_call::h600e03ffee22a785
      at <unknown source file>:<unknown line>
  13: <foundry_evm::inspectors::stack::InspectorStackRefMut as revm::inspector::Inspector<&mut dyn foundry_evm_core::backend::DatabaseExt+Error = foundry_fork_db::error::DatabaseError>>::call::h0a7f6b8eb666a8c4
      at <unknown source file>:<unknown line>
  14: <foundry_evm::inspectors::stack::InspectorStack as revm::inspector::Inspector<&mut dyn foundry_evm_core::backend::DatabaseExt+Error = foundry_fork_db::error::DatabaseError>>::call::hfdf614f94d683698
      at <unknown source file>:<unknown line>
  15: revm::inspector::handler_register::inspector_handle_register::{{closure}}::h109446e5c6bdc2bc
      at <unknown source file>:<unknown line>
  16: revm::evm::Evm<EXT,DB>::transact_preverified_inner::h9f3315704e284985
      at <unknown source file>:<unknown line>
  17: <foundry_evm_core::backend::strategy::EvmBackendStrategyRunner as foundry_evm_core::backend::strategy::BackendStrategyRunner>::inspect::h3ef7c9d56ae1c93f
      at <unknown source file>:<unknown line>
  18: <foundry_evm::executors::strategy::EvmExecutorStrategyRunner as foundry_evm::executors::strategy::ExecutorStrategyRunner>::call::he4f4af9900c197d1
      at <unknown source file>:<unknown line>
  19: foundry_evm::executors::Executor::call_with_env::he05707c429c185c2
      at <unknown source file>:<unknown line>
  20: foundry_evm::executors::fuzz::FuzzedExecutor::single_fuzz::ha63079e92d6bd921
      at <unknown source file>:<unknown line>
  21: proptest::test_runner::runner::call_test::he1d2ab0d18196ad6
      at <unknown source file>:<unknown line>
  22: proptest::test_runner::runner::TestRunner::gen_and_run_case::h5dc78a00e176c71a
      at <unknown source file>:<unknown line>
  23: proptest::test_runner::runner::TestRunner::run_in_process::h85fd4e4d389fb4ea
      at <unknown source file>:<unknown line>
  24: foundry_evm::executors::fuzz::FuzzedExecutor::fuzz::hea09bbd2dc63f1e0
      at <unknown source file>:<unknown line>
  25: forge::runner::FunctionRunner::run::h46cd3e75f25be189
      at <unknown source file>:<unknown line>
  26: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &F>::call_mut::h4644f8f2be4758a2
      at <unknown source file>:<unknown line>
  27: rayon::iter::plumbing::Folder::consume_iter::h04ad68ba33697f80
      at <unknown source file>:<unknown line>
  28: rayon::iter::plumbing::bridge_producer_consumer::helper::h4247d96bd958c10f
      at <unknown source file>:<unknown line>
  29: rayon_core::join::join_context::{{closure}}::h77b49310d1ae1109
      at <unknown source file>:<unknown line>
  30: rayon::iter::plumbing::bridge_producer_consumer::helper::h4247d96bd958c10f
      at <unknown source file>:<unknown line>
  31: rayon_core::join::join_context::{{closure}}::h77b49310d1ae1109
      at <unknown source file>:<unknown line>
  32: rayon::iter::plumbing::bridge_producer_consumer::helper::h4247d96bd958c10f
      at <unknown source file>:<unknown line>
  33: rayon_core::join::join_context::{{closure}}::h77b49310d1ae1109
      at <unknown source file>:<unknown line>
  34: rayon::iter::plumbing::bridge_producer_consumer::helper::h4247d96bd958c10f
      at <unknown source file>:<unknown line>
  35: rayon_core::join::join_context::{{closure}}::h77b49310d1ae1109
      at <unknown source file>:<unknown line>
  36: rayon::iter::plumbing::bridge_producer_consumer::helper::h4247d96bd958c10f
      at <unknown source file>:<unknown line>
  37: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::hf7337d7fcc7eb198
      at <unknown source file>:<unknown line>
  38: rayon_core::registry::WorkerThread::wait_until_cold::hb9f4b580ea7f0586
      at <unknown source file>:<unknown line>
  39: rayon_core::join::join_context::{{closure}}::hf04c7affc32f8a9e
      at <unknown source file>:<unknown line>
  40: rayon::iter::plumbing::bridge_producer_consumer::helper::h44d4b916d1380fa3
      at <unknown source file>:<unknown line>
  41: rayon_core::join::join_context::{{closure}}::hf04c7affc32f8a9e
      at <unknown source file>:<unknown line>
  42: rayon::iter::plumbing::bridge_producer_consumer::helper::h44d4b916d1380fa3
      at <unknown source file>:<unknown line>
  43: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::h6d24271e31da2b72
      at <unknown source file>:<unknown line>
  44: rayon_core::registry::WorkerThread::wait_until_cold::hb9f4b580ea7f0586
      at <unknown source file>:<unknown line>
  45: rayon_core::registry::ThreadBuilder::run::h6dc3bd01e69fc7e5
      at <unknown source file>:<unknown line>
  46: std::sys::backtrace::__rust_begin_short_backtrace::h3725a54683be1af9
      at <unknown source file>:<unknown line>
  47: core::ops::function::FnOnce::call_once{{vtable.shim}}::ha7c56510319d1b83
      at <unknown source file>:<unknown line>
  48: std::sys::pal::unix::thread::Thread::new::thread_start::h02b173395cbbc15c
      at <unknown source file>:<unknown line>
  49: __pthread_deallocate<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
[1]    28517 abort      forge t --zksync

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

We are running it without forks so far, only local

As far as I know, @Karrq, this should not affect the block.number, just the block.timestamp. But it’s all I could find realted to block manipulation in our tests

Reported at ZKsync Community Hub (Issue # 954) as well, as per request of ZKsync team.