fetchai / fetchd

Source code for Fetch.ai blockchain nodes
Other
96 stars 40 forks source link

Feature request: Only mine on new transaction #236

Closed dishmop closed 2 years ago

dishmop commented 2 years ago

Prerequisites

Problem

Development is very slow or very resource intensive.

If I run a local fetchd node with default (5 second) block times then it can take minutes to run through a single scenario using cosmpy. This means our integration tests can take half an hour.

If I set skip_timeout_commit = true in the config then I get much faster mining, but it quickly uses up large amounts of disc space.

Feature / Solution

I want to not mine blocks until a transaction comes in and then immediately mine (ganache does this)

Alternatives

No response

Additional Context

No response

daeMOn63 commented 2 years ago

This can be achieved setting:

# EmptyBlocks mode and possible interval between empty blocks
create_empty_blocks = false

in ~/.fetchd/config.toml