mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-20 23:01:56 +00:00
Compare commits
4 Commits
master
...
v0.25.1-rc
Author | SHA1 | Date | |
---|---|---|---|
|
90eda9bfb6 | ||
|
1ad379aa87 | ||
|
72201676b2 | ||
|
adf8cea09e |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v0.25.1
|
||||||
|
|
||||||
|
*October 17, 2018*
|
||||||
|
|
||||||
|
BUG FIXES:
|
||||||
|
|
||||||
|
- [state] [\#2616](https://github.com/tendermint/tendermint/issues/2616) Fix panic when genesis file's `validators` field is nil
|
||||||
|
- [consensus] [\#2634](https://github.com/tendermint/tendermint/issues/2634) Set `NextValidators` during replay
|
||||||
|
|
||||||
## v0.25.0
|
## v0.25.0
|
||||||
|
|
||||||
*September 22, 2018*
|
*September 22, 2018*
|
||||||
@@ -164,8 +173,8 @@ BUG FIXES:
|
|||||||
*August 22nd, 2018*
|
*August 22nd, 2018*
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
- [libs/autofile] \#2261 Fix log rotation so it actually happens.
|
- [libs/autofile] [\#2261](https://github.com/tendermint/tendermint/issues/2261) Fix log rotation so it actually happens.
|
||||||
- Fixes issues with consensus WAL growing unbounded ala \#2259
|
- Fixes issues with consensus WAL growing unbounded ala [\#2259](https://github.com/tendermint/tendermint/issues/2259)
|
||||||
|
|
||||||
## 0.23.0
|
## 0.23.0
|
||||||
|
|
||||||
|
@@ -287,6 +287,7 @@ func (h *Handshaker) ReplayBlocks(state sm.State, appHash []byte, appBlockHeight
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
state.Validators = types.NewValidatorSet(vals)
|
state.Validators = types.NewValidatorSet(vals)
|
||||||
|
state.NextValidators = types.NewValidatorSet(vals)
|
||||||
}
|
}
|
||||||
if res.ConsensusParams != nil {
|
if res.ConsensusParams != nil {
|
||||||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
|
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
|
||||||
|
@@ -198,17 +198,25 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make validators slice
|
// Make validators slice
|
||||||
validators := make([]*types.Validator, len(genDoc.Validators))
|
var validatorSet, nextValidatorSet *types.ValidatorSet
|
||||||
for i, val := range genDoc.Validators {
|
if genDoc.Validators == nil {
|
||||||
pubKey := val.PubKey
|
validatorSet = types.NewValidatorSet(nil)
|
||||||
address := pubKey.Address()
|
nextValidatorSet = types.NewValidatorSet(nil)
|
||||||
|
} else {
|
||||||
|
validators := make([]*types.Validator, len(genDoc.Validators))
|
||||||
|
for i, val := range genDoc.Validators {
|
||||||
|
pubKey := val.PubKey
|
||||||
|
address := pubKey.Address()
|
||||||
|
|
||||||
// Make validator
|
// Make validator
|
||||||
validators[i] = &types.Validator{
|
validators[i] = &types.Validator{
|
||||||
Address: address,
|
Address: address,
|
||||||
PubKey: pubKey,
|
PubKey: pubKey,
|
||||||
VotingPower: val.Power,
|
VotingPower: val.Power,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
validatorSet = types.NewValidatorSet(validators)
|
||||||
|
nextValidatorSet = types.NewValidatorSet(validators).CopyIncrementAccum(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
return State{
|
return State{
|
||||||
@@ -219,8 +227,8 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) {
|
|||||||
LastBlockID: types.BlockID{},
|
LastBlockID: types.BlockID{},
|
||||||
LastBlockTime: genDoc.GenesisTime,
|
LastBlockTime: genDoc.GenesisTime,
|
||||||
|
|
||||||
NextValidators: types.NewValidatorSet(validators).CopyIncrementAccum(1),
|
NextValidators: nextValidatorSet,
|
||||||
Validators: types.NewValidatorSet(validators),
|
Validators: validatorSet,
|
||||||
LastValidators: types.NewValidatorSet(nil),
|
LastValidators: types.NewValidatorSet(nil),
|
||||||
LastHeightValidatorsChanged: 1,
|
LastHeightValidatorsChanged: 1,
|
||||||
|
|
||||||
|
@@ -48,6 +48,19 @@ func TestStateCopy(t *testing.T) {
|
|||||||
%v`, state))
|
%v`, state))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TestMakeGenesisStateNilValidators tests state's consistency when genesis file's validators field is nil.
|
||||||
|
func TestMakeGenesisStateNilValidators(t *testing.T) {
|
||||||
|
doc := types.GenesisDoc{
|
||||||
|
ChainID: "dummy",
|
||||||
|
Validators: nil,
|
||||||
|
}
|
||||||
|
require.Nil(t, doc.ValidateAndComplete())
|
||||||
|
state, err := MakeGenesisState(&doc)
|
||||||
|
require.Nil(t, err)
|
||||||
|
require.Equal(t, 0, len(state.Validators.Validators))
|
||||||
|
require.Equal(t, 0, len(state.NextValidators.Validators))
|
||||||
|
}
|
||||||
|
|
||||||
// TestStateSaveLoad tests saving and loading State from a db.
|
// TestStateSaveLoad tests saving and loading State from a db.
|
||||||
func TestStateSaveLoad(t *testing.T) {
|
func TestStateSaveLoad(t *testing.T) {
|
||||||
tearDown, stateDB, state := setupTestCase(t)
|
tearDown, stateDB, state := setupTestCase(t)
|
||||||
|
@@ -4,13 +4,13 @@ package version
|
|||||||
const (
|
const (
|
||||||
Maj = "0"
|
Maj = "0"
|
||||||
Min = "25"
|
Min = "25"
|
||||||
Fix = "0"
|
Fix = "1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Version is the current version of Tendermint
|
// Version is the current version of Tendermint
|
||||||
// Must be a string because scripts like dist.sh read this file.
|
// Must be a string because scripts like dist.sh read this file.
|
||||||
Version = "0.25.0"
|
Version = "0.25.1"
|
||||||
|
|
||||||
// GitCommit is the current HEAD set using ldflags.
|
// GitCommit is the current HEAD set using ldflags.
|
||||||
GitCommit string
|
GitCommit string
|
||||||
|
Reference in New Issue
Block a user