AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

support unfinalized block with `dev_newBlock` #825

Open shunjizhan opened 2 days ago

shunjizhan commented 2 days ago

add a param to dev_newBlock to specify if the new blocks should be finalized, similar to provider.api.rpc.engine.createBlock. This will be helpful for testing finalization related behaviors.

xlc commented 2 days ago

We need a mode to handle block finalization strategy.

Add new config finalize-block-mode that can be:

and add new RPC dev_setFinalizedHead to control which block should be finalized

on manual mode, dev_newBlock can have a finalize: bool argument to specify if this block should be mark as finalized