starknet-devnet-rs icon indicating copy to clipboard operation
starknet-devnet-rs copied to clipboard

Add mining blocks at a certain interval

Open ivpavici opened this issue 1 year ago • 2 comments

A new block should be created at a fixed time interval selected by the user.

This functionality exists in Anvil and Katana:

  • evm_setIntervalMining in https://book.getfoundry.sh/reference/anvil/#special-methods
  • https://book.dojoengine.org/toolchain/katana/mining#interval-mining

ivpavici avatar May 14 '24 08:05 ivpavici

I can take it since it's related to time and blocks

mikiw avatar May 14 '24 08:05 mikiw

in CLI it could be governed by:

--block-generation <ON_DEMAND|PERIODIC>
--block-generation-period # only usable with --block-generation PERIODIC

FabijanC avatar May 16 '24 07:05 FabijanC

requires a merge of https://github.com/0xSpaceShard/starknet-devnet-rs/pull/480/files but I already started based on this branch

mikiw avatar Jun 05 '24 14:06 mikiw

I'll implement --block-generation-on <transaction|demand|<SECONDS> as discussed on the chat.

mikiw avatar Jun 07 '24 09:06 mikiw