Browse Source

blockchain: error on v2 selection (#6730)

## Description

Remove v2 flag from toml
pull/6731/head
Marko 3 years ago
committed by GitHub
parent
commit
78a0a5fe73
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions
  1. +1
    -0
      CHANGELOG_PENDING.md
  2. +2
    -0
      UPGRADING.md
  3. +1
    -1
      config/config.go
  4. +1
    -1
      config/config_test.go
  5. +1
    -1
      config/toml.go
  6. +1
    -4
      node/setup.go

+ 1
- 0
CHANGELOG_PENDING.md View File

@ -24,6 +24,7 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi
- [libs/CList] \#6626 Automatically detach the prev/next elements in Remove function (@JayT106)
- [fastsync/rpc] \#6620 Add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC (@JayT106)
- [rpc/grpc] \#6725 Mark gRPC in the RPC layer as deprecated.
- [blockchain/v2] \#6730 Fast Sync v2 is deprecated, please use v0
- Apps
- [ABCI] \#6408 Change the `key` and `value` fields from `[]byte` to `string` in the `EventAttribute` type. (@alexanderbez)


+ 2
- 0
UPGRADING.md View File

@ -32,6 +32,8 @@ This guide provides instructions for upgrading to specific versions of Tendermin
- configuration values starting with `priv-validator-` have moved to the new
`priv-validator` section, without the `priv-validator-` prefix.
* Fast Sync v2 has been deprecated, please use v0 to sync a node.
### CLI Changes
* You must now specify the node mode (validator|full|seed) in `tendermint init [mode]`


+ 1
- 1
config/config.go View File

@ -961,7 +961,7 @@ func (cfg *FastSyncConfig) ValidateBasic() error {
case BlockchainV0:
return nil
case BlockchainV2:
return nil
return errors.New("fastsync version v2 is no longer supported. Please use v0")
default:
return fmt.Errorf("unknown fastsync version %s", cfg.Version)
}


+ 1
- 1
config/config_test.go View File

@ -131,7 +131,7 @@ func TestFastSyncConfigValidateBasic(t *testing.T) {
// tamper with version
cfg.Version = "v2"
assert.NoError(t, cfg.ValidateBasic())
assert.Error(t, cfg.ValidateBasic())
cfg.Version = "invalid"
assert.Error(t, cfg.ValidateBasic())


+ 1
- 1
config/toml.go View File

@ -442,7 +442,7 @@ fetchers = "{{ .StateSync.Fetchers }}"
# Fast Sync version to use:
# 1) "v0" (default) - the legacy fast sync implementation
# 2) "v2" - complete redesign of v0, optimized for testability & readability
# 2) "v2" - DEPRECATED, please use v0
version = "{{ .FastSync.Version }}"
#######################################################


+ 1
- 4
node/setup.go View File

@ -372,10 +372,7 @@ func createBlockchainReactor(
return reactorShim, reactor, nil
case cfg.BlockchainV2:
reactor := bcv2.NewBlockchainReactor(state.Copy(), blockExec, blockStore, fastSync, metrics)
reactor.SetLogger(logger)
return nil, reactor, nil
return nil, nil, errors.New("fastsync version v2 is no longer supported. Please use v0")
default:
return nil, nil, fmt.Errorf("unknown fastsync version %s", config.FastSync.Version)


Loading…
Cancel
Save