Skip to content

Commit

Permalink
Added option to skip empty blocks (#1444)
Browse files Browse the repository at this point in the history
* Added option to skip empty blocks

Signed-off-by: madelinemurray <madeline.murray@consensys.net>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>

* Update docs/private-networks/how-to/configure/consensus/clique.md

Signed-off-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>

---------

Signed-off-by: madelinemurray <madeline.murray@consensys.net>
Signed-off-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>
Co-authored-by: Alexandra Tran Carrillo <12214231+alexandratran@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
  • Loading branch information
3 people authored Nov 16, 2023
1 parent fb0b3cc commit bef04dc
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions docs/private-networks/how-to/configure/consensus/clique.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,31 @@ The properties specific to Clique are:

- `blockperiodseconds` - The block time, in seconds.
- `epochlength` - The number of blocks after which to reset all votes.
- `createemptyblocks` - Set to false to [skip creating empty blocks](#skip-empty-blocks).
- `extraData` - [Extra data](#extra-data) including the initial signers.

### Skip empty blocks

By default, Clique creates empty blocks. For large private networks using Clique, skipping empty blocks can reduce the storage needed.

To skip creating empty blocks, set `createemptyblocks` to `false` in the genesis file:

```bash
{
"config": {
"londonBlock": 0,
"clique": {
"blockperiodseconds": 10,
"epochlength": 30000,
"createemptyblocks": false
}
},
...
}
```

All validators must have the same value for `createemptyblocks`.

### Extra data

The `extraData` property consists of:
Expand Down Expand Up @@ -152,7 +175,3 @@ However, when the out-of-turn delay is shorter than the block propagation delay,
We recommend using a more updated consensus protocol such as [IBFT 2.0](ibft.md) or [QBFT](qbft.md).

:::

<!-- Acronyms and Definitions -->

\*[vanity data]: Signers can include anything they like as vanity data.

0 comments on commit bef04dc

Please sign in to comment.