Skip to content

Commit

Permalink
Merge branch 'main' into fix-mempool-flaky-test
Browse files Browse the repository at this point in the history
  • Loading branch information
JayT106 committed Nov 29, 2022
2 parents d20792e + 790132a commit 3498cf5
Show file tree
Hide file tree
Showing 28 changed files with 63 additions and 20 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

Friendly reminder, we have a [bug bounty program](https://hackerone.com/cosmos).

## v0.34.24

*Nov 22, 2022*

Apart from one minor bug fix, this release aims to optimize the output of the
RPC (both HTTP and WebSocket endpoints). See our [upgrading
guidelines](./UPGRADING.md#v03424) for more details.

### IMPROVEMENTS

- `[rpc]` [\#9724](https://github.com/tendermint/tendermint/issues/9724) Remove
useless whitespace in RPC output (@adizere, @thanethomson)

### BUG FIXES

- `[rpc]` [\#9692](https://github.com/tendermint/tendermint/issues/9692) Remove
`Cache-Control` header response from `/check_tx` endpoint (@JayT106)

## v0.34.23

*Nov 9, 2022*
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- [p2p/pex] \#6509 Improve addrBook.hash performance (@cuonglm)
- [crypto/merkle] \#6443 & \#6513 Improve HashAlternatives performance (@cuonglm, @marbar3778)
- [rpc] \#9650 Enable caching of RPC responses (@JayT106)
- [consensus] \#9760 Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. (@williambanfield)

### BUG FIXES

Expand Down
8 changes: 8 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ Tendermint Core.
this should have no effect on the wire-level encoding for UTF8-encoded
strings.

## v0.34.24

Note that in [\#9724](https://github.com/tendermint/tendermint/pull/9724) we
un-prettified the JSON output (i.e. removed all indentation) of the HTTP and
WebSocket RPC for performance and subscription stability reasons. We recommend
using a tool such as [jq](https://github.com/stedolan/jq) to obtain prettified
output if you rely on that prettified output in some way.

## v0.34.20

### Feature: Priority Mempool
Expand Down
1 change: 1 addition & 0 deletions abci/types/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"io"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/libs/protoio"
)

Expand Down
1 change: 1 addition & 0 deletions consensus/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/cosmos/gogoproto/proto"

cstypes "github.com/tendermint/tendermint/consensus/types"
"github.com/tendermint/tendermint/libs/bits"
tmmath "github.com/tendermint/tendermint/libs/math"
Expand Down
3 changes: 2 additions & 1 deletion consensus/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) {
psRound := ps.PRS.Round
psCatchupCommitRound := ps.PRS.CatchupCommitRound
psCatchupCommit := ps.PRS.CatchupCommit
lastPrecommits := ps.PRS.Precommits

startTime := tmtime.Now().Add(-1 * time.Duration(msg.SecondsSinceStartTime) * time.Second)
ps.PRS.Height = msg.Height
Expand Down Expand Up @@ -1378,7 +1379,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) {
// Shift Precommits to LastCommit.
if psHeight+1 == msg.Height && psRound == msg.LastCommitRound {
ps.PRS.LastCommitRound = msg.LastCommitRound
ps.PRS.LastCommit = ps.PRS.Precommits
ps.PRS.LastCommit = lastPrecommits
} else {
ps.PRS.LastCommitRound = msg.LastCommitRound
ps.PRS.LastCommit = nil
Expand Down
4 changes: 2 additions & 2 deletions consensus/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error {

h.logger.Info("ABCI Handshake App Info",
"height", blockHeight,
"hash", appHash,
"hash", log.NewLazySprintf("%X", appHash),
"software-version", res.Version,
"protocol-version", res.AppVersion,
)
Expand All @@ -271,7 +271,7 @@ func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error {
}

h.logger.Info("Completed ABCI Handshake - Tendermint and App are synced",
"appHeight", blockHeight, "appHash", appHash)
"appHeight", blockHeight, "appHash", log.NewLazySprintf("%X", appHash))

// TODO: (on restart) replay mempool

Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = {
editLinks: true,
label: 'core',
algolia: {
id: "BH4D9OD16A",
key: "59f0e2deb984aa9cdf2b3a5fd24ac501",
id: "QQFROLBNZC",
key: "f1b68b96fb31d8aa4a54412c44917a26",
index: "tendermint"
},
versions: [
Expand Down
1 change: 1 addition & 0 deletions evidence/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

"github.com/cosmos/gogoproto/proto"

clist "github.com/tendermint/tendermint/libs/clist"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/p2p"
Expand Down
1 change: 1 addition & 0 deletions libs/pubsub/query/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/stretchr/testify/require"

"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/pubsub"
"github.com/tendermint/tendermint/libs/pubsub/query"
Expand Down
5 changes: 3 additions & 2 deletions p2p/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"time"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/libs/cmap"
"github.com/tendermint/tendermint/libs/rand"
Expand Down Expand Up @@ -726,7 +727,7 @@ func (sw *Switch) addOutboundPeerWithConfig(
addr *NetAddress,
cfg *config.P2PConfig,
) error {
sw.Logger.Info("Dialing peer", "address", addr)
sw.Logger.Debug("Dialing peer", "address", addr)

// XXX(xla): Remove the leakage of test concerns in implementation.
if cfg.TestDialFail {
Expand Down Expand Up @@ -854,7 +855,7 @@ func (sw *Switch) addPeer(p Peer) error {
reactor.AddPeer(p)
}

sw.Logger.Info("Added peer", "peer", p)
sw.Logger.Debug("Added peer", "peer", p)

return nil
}
1 change: 1 addition & 0 deletions p2p/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"golang.org/x/net/netutil"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/libs/protoio"
"github.com/tendermint/tendermint/p2p/conn"
Expand Down
1 change: 1 addition & 0 deletions p2p/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package p2p

import (
"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/p2p/conn"
tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p"
)
Expand Down
1 change: 1 addition & 0 deletions proto/tendermint/blocksync/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/p2p"
)

Expand Down
1 change: 1 addition & 0 deletions proto/tendermint/consensus/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/p2p"
)

Expand Down
1 change: 1 addition & 0 deletions proto/tendermint/mempool/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/p2p"
)

Expand Down
1 change: 1 addition & 0 deletions proto/tendermint/statesync/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/cosmos/gogoproto/proto"

"github.com/tendermint/tendermint/p2p"
)

Expand Down
4 changes: 0 additions & 4 deletions release_notes.md

This file was deleted.

3 changes: 2 additions & 1 deletion state/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

dbm "github.com/tendermint/tm-db"

abciclientmocks "github.com/tendermint/tendermint/abci/client/mocks"
abci "github.com/tendermint/tendermint/abci/types"
abcimocks "github.com/tendermint/tendermint/abci/types/mocks"
Expand All @@ -29,7 +31,6 @@ import (
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
dbm "github.com/tendermint/tm-db"
)

var (
Expand Down
1 change: 1 addition & 0 deletions state/indexer/block/kv/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strconv"

"github.com/google/orderedcode"

"github.com/tendermint/tendermint/libs/pubsub/query/syntax"
"github.com/tendermint/tendermint/types"
)
Expand Down
3 changes: 2 additions & 1 deletion state/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

dbm "github.com/tendermint/tm-db"

abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/tmhash"
Expand All @@ -20,7 +22,6 @@ import (
"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
dbm "github.com/tendermint/tm-db"
)

const validationTestsStopHeight int64 = 10
Expand Down
6 changes: 3 additions & 3 deletions statesync/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ func (s *syncer) verifyApp(snapshot *snapshot, appVersion uint64) error {
}
if !bytes.Equal(snapshot.trustedAppHash, resp.LastBlockAppHash) {
s.logger.Error("appHash verification failed",
"expected", snapshot.trustedAppHash,
"actual", resp.LastBlockAppHash)
"expected", fmt.Sprintf("%X", snapshot.trustedAppHash),
"actual", fmt.Sprintf("%X", resp.LastBlockAppHash))
return errVerifyFailed
}
if uint64(resp.LastBlockHeight) != snapshot.Height {
Expand All @@ -511,6 +511,6 @@ func (s *syncer) verifyApp(snapshot *snapshot, appVersion uint64) error {
return errVerifyFailed
}

s.logger.Info("Verified ABCI app", "height", snapshot.Height, "appHash", snapshot.trustedAppHash)
s.logger.Info("Verified ABCI app", "height", snapshot.Height, "appHash", log.NewLazySprintf("%X", snapshot.trustedAppHash))
return nil
}
2 changes: 1 addition & 1 deletion test/fuzz/oss-fuzz-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build_go_fuzzer() {
compile_native_go_fuzzer "$FUZZ_ROOT"/test/fuzz/tests "$function" "$fuzzer"
}

go get github.com/AdamKorcz/go-118-fuzz-build/utils
go get github.com/AdamKorcz/go-118-fuzz-build/testing
go get github.com/prometheus/common/[email protected]

build_go_fuzzer FuzzP2PSecretConnection fuzz_p2p_secretconnection
Expand Down
1 change: 1 addition & 0 deletions test/loadtime/cmd/load/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/google/uuid"
"github.com/informalsystems/tm-load-test/pkg/loadtest"

"github.com/tendermint/tendermint/test/loadtime/payload"
)

Expand Down
3 changes: 2 additions & 1 deletion test/loadtime/cmd/report/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"strconv"
"strings"

dbm "github.com/tendermint/tm-db"

"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/test/loadtime/report"
dbm "github.com/tendermint/tm-db"
)

var (
Expand Down
1 change: 1 addition & 0 deletions test/loadtime/payload/payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/google/uuid"

"github.com/tendermint/tendermint/test/loadtime/payload"
)

Expand Down
3 changes: 2 additions & 1 deletion test/loadtime/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"time"

"github.com/gofrs/uuid"
"gonum.org/v1/gonum/stat"

"github.com/tendermint/tendermint/test/loadtime/payload"
"github.com/tendermint/tendermint/types"
"gonum.org/v1/gonum/stat"
)

// BlockStore defines the set of methods needed by the report generator from
Expand Down
3 changes: 2 additions & 1 deletion test/loadtime/report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"time"

"github.com/google/uuid"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/tendermint/tendermint/test/loadtime/payload"
"github.com/tendermint/tendermint/test/loadtime/report"
"github.com/tendermint/tendermint/types"
"google.golang.org/protobuf/types/known/timestamppb"
)

type mockBlockStore struct {
Expand Down

0 comments on commit 3498cf5

Please sign in to comment.