Skip to content

Commit 4fe0a18

Browse files
authored
Merge pull request #924 from dashpay/release_1.3.0
chore(release): update changelog and bump version to 1.3.0
2 parents 1e6c97c + fc7c6d6 commit 4fe0a18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2109
-1861
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## [1.3.0] - 2024-09-19
2+
3+
### Bug Fixes
4+
5+
- Address already in use (#845)
6+
- Active validators not always connected to each other (#844)
7+
- Validators form islands on genesis (#850)
8+
- Panic on block_results when consensus params change (#923)
9+
10+
### Features
11+
12+
- [**breaking**] Replace dash core quorum sign with quorum platformsign (#828)
13+
- Allow overriding genesis time in InitChain (#847)
14+
15+
### Miscellaneous Tasks
16+
17+
- Update changelog and version to 1.1.0-dev.1 (#842)
18+
- Update changelog and version to 1.1.0-dev.2 (#846)
19+
- Update changelog and version to 1.1.0-dev.3 (#848)
20+
21+
### Build
22+
23+
- Bump bufbuild/buf-setup-action from 1.33.0 to 1.35.0 (#841)
24+
- Run dependabot on default branch, not master (#843)
25+
126
## [1.2.1] - 2024-08-29
227

328
### Bug Fixes
@@ -8,6 +33,7 @@
833
### Miscellaneous Tasks
934

1035
- Update changelog and version to 1.2.1-dev.1
36+
- Update changelog and version to 1.2.1
1137

1238
### Build
1339

abci/example/kvstore/verify_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (e *blockExecutor) createBlock(txs types.Txs, commit *types.Commit) *types.
8585
if commit == nil {
8686
commit = &types.Commit{}
8787
}
88-
proposer := e.state.Validators.GetProposer()
88+
proposer := e.state.GetProposerFromState(e.state.LastBlockHeight+1, 0)
8989
block := e.state.MakeBlock(
9090
e.state.LastBlockHeight+1,
9191
txs,

dash/quorum/validator_conn_executor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ func makeState(nVals int, height int64) (sm.State, dbm.DB) {
621621
}
622622

623623
func makeBlock(ctx context.Context, t *testing.T, blockExec *sm.BlockExecutor, state sm.State, _height int64, commit *types.Commit) *types.Block {
624-
block, crs, err := blockExec.CreateProposalBlock(ctx, 1, 0, state, commit, state.Validators.Proposer.ProTxHash, 1)
624+
block, crs, err := blockExec.CreateProposalBlock(ctx, 1, 0, state, commit, state.Validators.Proposer().ProTxHash, 1)
625625
require.NoError(t, err)
626626

627627
err = crs.UpdateBlock(block)

dash/quorum/validator_map_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package quorum
33
import (
44
"testing"
55

6+
"github.com/stretchr/testify/assert"
7+
68
"github.com/dashpay/tenderdash/dash/quorum/mock"
79
"github.com/dashpay/tenderdash/types"
8-
"github.com/stretchr/testify/assert"
910
)
1011

1112
func Test_validatorMap_String(t *testing.T) {
@@ -30,11 +31,11 @@ func Test_validatorMap_String(t *testing.T) {
3031
{
3132
vm: newValidatorMap(vals),
3233
contains: []string{
33-
"<nil> VP:0 A:0 N:tcp://0100000000000000000000000000000000000000@127.0.0.1:1}",
34-
"<nil> VP:0 A:0 N:tcp://0200000000000000000000000000000000000000@127.0.0.1:2}",
35-
"<nil> VP:0 A:0 N:tcp://0300000000000000000000000000000000000000@127.0.0.1:3}",
36-
"<nil> VP:0 A:0 N:tcp://0400000000000000000000000000000000000000@127.0.0.1:4}",
37-
"<nil> VP:0 A:0 N:tcp://0500000000000000000000000000000000000000@127.0.0.1:5}",
34+
"<nil> VP:0 N:tcp://0100000000000000000000000000000000000000@127.0.0.1:1}",
35+
"<nil> VP:0 N:tcp://0200000000000000000000000000000000000000@127.0.0.1:2}",
36+
"<nil> VP:0 N:tcp://0300000000000000000000000000000000000000@127.0.0.1:3}",
37+
"<nil> VP:0 N:tcp://0400000000000000000000000000000000000000@127.0.0.1:4}",
38+
"<nil> VP:0 N:tcp://0500000000000000000000000000000000000000@127.0.0.1:5}",
3839
},
3940
},
4041
}

internal/consensus/gossiper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ func (g *msgGossiper) GossipCommit(ctx context.Context, rs cstypes.RoundState, p
203203
if prs.HasCommit {
204204
return
205205
}
206-
logger := g.logger.With([]any{
206+
logger := g.logger.With(
207207
"height", rs.Height,
208208
"peer_height", prs.Height,
209-
})
209+
)
210210
var commit *types.Commit
211211
blockStoreBase := g.blockStore.Base()
212212
if rs.Height == prs.Height+1 {

internal/consensus/msgs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func TestMsgToProto(t *testing.T) {
7878
vote, err := factory.MakeVote(
7979
ctx,
8080
pv,
81-
&types.ValidatorSet{Proposer: val, Validators: []*types.Validator{val}, QuorumHash: quorumHash, ThresholdPublicKey: pk},
81+
&types.ValidatorSet{Validators: []*types.Validator{val}, QuorumHash: quorumHash, ThresholdPublicKey: pk},
8282
"chainID",
8383
0,
8484
1,

internal/consensus/pbts_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ type timestampedEvent struct {
293293

294294
func (p *pbtsTestHarness) pickProposer() types.PrivValidator {
295295
stateData := p.observedState.GetStateData()
296-
proposer := stateData.Validators.GetProposer()
296+
proposer := stateData.ProposerSelector.MustGetProposer(p.currentHeight, p.currentRound)
297297
p.observedState.logger.Debug("picking proposer", "protxhash", proposer.ProTxHash)
298298

299299
allVals := append(p.otherValidators, p.observedValidator)

internal/consensus/peer_state.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
cstypes "github.com/dashpay/tenderdash/internal/consensus/types"
1515
"github.com/dashpay/tenderdash/libs/bits"
1616
"github.com/dashpay/tenderdash/libs/log"
17+
"github.com/dashpay/tenderdash/libs/math"
1718
tmproto "github.com/dashpay/tenderdash/proto/tendermint/types"
1819
"github.com/dashpay/tenderdash/types"
1920
)
@@ -214,7 +215,11 @@ func (ps *PeerState) PickVoteToSend(votes types.VoteSetReader) (*types.Vote, boo
214215
}
215216

216217
if index, ok := votes.BitArray().Sub(psVotes).PickRandom(); ok {
217-
vote := votes.GetByIndex(int32(index))
218+
idx, err := math.SafeConvertInt32(int64(index))
219+
if err != nil {
220+
panic(fmt.Errorf("failed to convert index to int32: %w", err))
221+
}
222+
vote := votes.GetByIndex(idx)
218223
if vote != nil {
219224
return vote, true
220225
}

internal/consensus/reactor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (r *Reactor) SwitchToConsensus(ctx context.Context, state sm.State, skipWAL
223223

224224
// NOTE: The line below causes broadcastNewRoundStepRoutine() to broadcast a
225225
// NewRoundStepMessage.
226-
stateData.updateToState(state, nil)
226+
stateData.updateToState(state, nil, r.state.blockStore)
227227
err := r.state.stateDataStore.Update(stateData)
228228
if err != nil {
229229
panic(err)

internal/consensus/replay.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func (cs *State) readReplayMessage(ctx context.Context, msg *TimedWALMessage, ne
7474
case *ProposalMessage:
7575
p := msg.Proposal
7676
if cs.config.WalSkipRoundsToLast && p.Round > stateData.Round {
77-
stateData.Validators.IncrementProposerPriority(p.Round - stateData.Round)
7877
stateData.Votes.SetRound(p.Round)
7978
stateData.Round = p.Round
8079
}

0 commit comments

Comments
 (0)