Skip to content

Commit

Permalink
Add backfill-blocks and backfill-duration configuration to config.toml (
Browse files Browse the repository at this point in the history
#151)

Co-authored-by: Yiming Zang <yzang@twitter.com>
  • Loading branch information
yzang2019 and Yiming Zang authored Jul 5, 2023
1 parent 6762b3e commit d6af34b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,15 @@ trust-hash = "{{ .StateSync.TrustHash }}"
# period should suffice.
trust-period = "{{ .StateSync.TrustPeriod }}"
# Backfill sequentially fetches after state sync completes, verifies and stores light blocks in reverse order.
# backfill-blocks means it will keep reverse fetching up to backfill-blocks number of blocks behind state sync position
# backfill-duration means it will keep fetching up to backfill-duration old time
# The actual backfill process will take at backfill-blocks as priority:
# - If backfill-blocks is set, use backfill-blocks to backfill
# - If backfill-blocks is not set to be greater than 0, use backfill-duration to backfill
backfill-blocks = "{{ .StateSync.BackfillBlocks }}"
backfill-duration = "{{ .StateSync.BackfillDuration }}"
# Time to spend discovering snapshots before initiating a restore.
discovery-time = "{{ .StateSync.DiscoveryTime }}"
Expand Down
11 changes: 9 additions & 2 deletions docs/nodes/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ rpc-servers = ""
trust-height = 0
trust-hash = ""

# Backfill sequentially fetches after state sync completes, verifies and stores light blocks in reverse order.
# The actual backfill process will stop if it meets either backfill-blocks or backfill-duration condition
# backfill-blocks means it will keep reverse fetching up to backfill-blocks number of blocks behind state sync position
# backfill-duration means it will keep fetching up to backfill-duration old time
backfill-blocks = 0
backfill-duration = "0s"

# The trust period should be set so that Tendermint can detect and gossip misbehavior before
# it is considered expired. For chains based on the Cosmos SDK, one day less than the unbonding
# period should suffice.
Expand Down Expand Up @@ -538,15 +545,15 @@ This section will cover settings within the p2p section of the `config.toml`.
- `pex` = turns the peer exchange reactor on or off. Validator node will want the `pex` turned off so it would not begin gossiping to unknown peers on the network. PeX can also be turned off for statically configured networks with fixed network connectivity. For full nodes on open, dynamic networks, it should be turned on.
- `private-peer-ids` = is a comma-separated list of node ids that will _not_ be exposed to other peers (i.e., you will not tell other peers about the ids in this list). This can be filled with a validator's node id.

Recently the Tendermint Team conducted a refactor of the p2p layer. This lead to multiple config parameters being deprecated and/or replaced.
Recently the Tendermint Team conducted a refactor of the p2p layer. This lead to multiple config parameters being deprecated and/or replaced.

We will cover the new and deprecated parameters below.
### New Parameters

There are three new parameters, which are enabled if use-legacy is set to false.

- `queue-type` = sets a type of queue to use in the p2p layer. There are three options available `fifo`, `priority` and `wdrr`. The default is priority
- `bootstrap-peers` = is a list of comma seperated peers which will be used to bootstrap the address book.
- `bootstrap-peers` = is a list of comma seperated peers which will be used to bootstrap the address book.
- `max-connections` = is the max amount of allowed inbound and outbound connections.
### Deprecated Parameters

Expand Down

0 comments on commit d6af34b

Please sign in to comment.