Skip to content

Improve DevMode with hybrid approach. #2770

@winder

Description

@winder

Problem

DevMode is typically used by dapp developers to run tests of their dapps. DevMode allows them to submit many sequential transactions (that have to wait for the previous ones to be committed) without waiting 4 seconds per round. Most tests involve several rounds (for setting up accounts, deploying apps/creating assets, opting in the accounts, then calling the apps/ transacting on the assets), some tests involve many rounds (e.g. simulating an auction with many bids, or running an app that accrues interest over rounds...).

When DevMode is enabled new blocks are only generated when a transaction is sent. This gives the appearance of a stalled network and causes some weirdness with features like "waitForBlock".

Solution

Adjust the algorithm so that blocks are generated every 4.5 seconds as usual, in addition to creating a new block when a transaction enters the transaction pool.

Dependencies

Urgency

Medium, I think this would be a very nice improvement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions