evm-diff icon indicating copy to clipboard operation
evm-diff copied to clipboard

feat: block production

Open mds1 opened this issue 1 year ago • 0 comments

Initial ideas below

Block Times

Fetch the latest block number, and fetch the latest n blocks.

  • If block time deltas are the same, assume that delta is a constant block time.
  • If block times are the same mod x, assume x is the block time (e.g. some blocks may have been missed, like on mainnet)
  • If block times vary, take the median value.
  • For some chains the JSON files will change every time bun fetch-data is run. We will need to add handling for this expected difference to avoid the hourly CI checks from constantly reporting diffs.

Gas Limits and Targets

For OP Stack chains we can get the gas limit from the L1 SystemConfig contract, but there's no way to automatically discover that contract address without adding it as an additional input. Unsure how to do this for other chains.

mds1 avatar May 20 '24 13:05 mds1