informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
588 stars 215 forks source link

Deprecate blocksync and fastsync config options #1368

Open conorsch opened 8 months ago

conorsch commented 8 months ago

Description

When running CometBFT v0.37.2 with a config file containing fastsync options, deprecation notices are printed:

I[2023-10-03|21:23:02.579] deprecated usage found in configuration file usage="[fastsync] table detected. This section has been renamed to [blocksync]. The values in this deprecated section will be disregarded."
I[2023-10-03|21:23:02.579] deprecated usage found in configuration file usage="fast_sync key detected. This key has been renamed to block_sync. The value of this deprecated key will be disregarded."

Renaming the fields as recommended causes config parsing via tendermint_config::TendermintConfig to fail:

Error: Failed to parse the TOML config template for CometBFT

Caused by:
    0: toml de error

       Caused by:
           missing field `fastsync` at line 457 column 1

       Location:

My understanding based on discussion in https://github.com/cometbft/cometbft/issues/409 is that as of 0.38.x, neither blocksync nor fastsync options will be honored. I'm not sure how tendermint-config should handle this. Testing locally with CometBFT v0.38.0, neither errors nor warnings are emitted if the config file includes fastsync. However, it's still inappropriate that tendermint-config require the presence of an unused config option.

Definition of "done"

I see two options:

  1. tendermint_config::TendermintConfig supports blocksync fields, at least for <0.38
  2. Remove requirement for fastsync, making it optional.

with 2 being a bit easier.