Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about emptyBlockPeriodSeconds #246

Merged
merged 4 commits into from
Aug 4, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions docs/configure-and-manage/configure/consensus-protocols/qbft.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,59 @@ To update an existing network with a new `blockperiodseconds`:
1. To verify the changes after the transition block, call
[`istanbul_getValidators`](../../../reference/api-methods.md#istanbul_getvalidators), specifying `latest`.

### Configure empty block period

A block is produced every block period, whether there are transactions or not. This can lead to your network being bloated with many empty blocks, especially if you have a low block period such as one second. Configuring `emptyBlockPeriodSeconds` helps reduce the number of empty blocks produced in your network. You can specify `emptyBlockPeriodSeconds` using the config section or with a transition.
antonydenyer marked this conversation as resolved.
Show resolved Hide resolved

!!! example

```bash
"transitions": [{
"block": ...,
"blockPeriodSeconds": 2
"emptyBlockPeriodSeconds": 60
}]
```

In the preceding example, a block is produced every two seconds if there are transactions pending to be mined. If no transactions are pending, then blocks are not produced until after 60 seconds.

The blocks produced with those settings could have timestamps similar to the following:

```yaml
block: 10
timestamp: 07:00:00
transactions: 1

block: 11
timestamp: 07:00:02
transactions: 3

block: 12
timestamp: 07:01:02
transactions: 0

block: 13
timestamp: 07:02:02
transactions: 0

block: 14
timestamp: 07:02:08
transactions: 2

block: 15
timestamp: 07:02:42
transactions: 1

block: 16
timestamp: 07:03:12
transactions: 1

```

!!! Note

If the `emptyBlockPeriodSeconds` is less than `blockPeriodSeconds`, empty blocks continue to be produced.
antonydenyer marked this conversation as resolved.
Show resolved Hide resolved

### Swap validator management methods

To swap between block header validator selection and contract validator selection methods in an existing network:
Expand Down