matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
299 stars 130 forks source link

chore: take historical block count from env #574

Closed nbaztec closed 2 months ago

nbaztec commented 2 months ago

Motivation

Fetching last 256 blocks from rpc causes too much noise, in addition to, several rpc requests.

Solution

Make this parameter configurable with the env variable ZK_DEBUG_HISTORICAL_BLOCK_HASHES, in the absence of a generic config setting.

ZK_DEBUG_HISTORICAL_BLOCK_HASHES=0 forge test     # disables fetching historical block hashes