chore: bump TM to v0.35.0 release candidate (#10210)

Integrate Tendermint v0.35.0, including changes to build and test
plumbing necessary to make everything build. This change does not
update any SDK APIs to make use of new features.

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: tycho garen <garen@tychoish.com>
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
This commit is contained in:
Aleksandr Bezobchuk
2021-11-16 11:24:38 -08:00
committed by GitHub
co-authored by marbar3778 tycho garen M. J. Fromberger Amaury Callum Waters
parent 3f368577ed
commit af8ad3d20d
83 changed files with 1465 additions and 623 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"strings"
"github.com/tendermint/tendermint/mempool"
tmtypes "github.com/tendermint/tendermint/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@@ -55,7 +54,7 @@ func CheckTendermintError(err error, tx tmtypes.Tx) *sdk.TxResponse {
txHash := fmt.Sprintf("%X", tx.Hash())
switch {
case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())):
case strings.Contains(errStr, strings.ToLower(tmtypes.ErrTxInCache.Error())):
return &sdk.TxResponse{
Code: sdkerrors.ErrTxInMempoolCache.ABCICode(),
Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(),
+7 -8
View File
@@ -7,9 +7,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/crypto/tmhash"
"github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/rpc/client/mock"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/rpc/coretypes"
tmtypes "github.com/tendermint/tendermint/types"
"github.com/cosmos/cosmos-sdk/client/flags"
@@ -21,15 +20,15 @@ type MockClient struct {
err error
}
func (c MockClient) BroadcastTxCommit(ctx context.Context, tx tmtypes.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
func (c MockClient) BroadcastTxCommit(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTxCommit, error) {
return nil, c.err
}
func (c MockClient) BroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*ctypes.ResultBroadcastTx, error) {
func (c MockClient) BroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error) {
return nil, c.err
}
func (c MockClient) BroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*ctypes.ResultBroadcastTx, error) {
func (c MockClient) BroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error) {
return nil, c.err
}
@@ -43,9 +42,9 @@ func CreateContextWithErrorAndMode(err error, mode string) Context {
// Test the correct code is returned when
func TestBroadcastError(t *testing.T) {
errors := map[error]uint32{
mempool.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(),
mempool.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(),
mempool.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(),
tmtypes.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(),
tmtypes.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(),
tmtypes.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(),
}
modes := []string{
+2 -3
View File
@@ -3,12 +3,11 @@ package tmservice
import (
"context"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/tendermint/tendermint/rpc/coretypes"
)
func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*ctypes.ResultBlock, error) {
func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*coretypes.ResultBlock, error) {
// get the node
node, err := clientCtx.GetNode()
if err != nil {
+82 -83
View File
@@ -636,8 +636,8 @@ var xxx_messageInfo_GetNodeInfoRequest proto.InternalMessageInfo
// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.
type GetNodeInfoResponse struct {
DefaultNodeInfo *p2p.DefaultNodeInfo `protobuf:"bytes,1,opt,name=default_node_info,json=defaultNodeInfo,proto3" json:"default_node_info,omitempty"`
ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"`
NodeInfo *p2p.NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"`
ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"`
}
func (m *GetNodeInfoResponse) Reset() { *m = GetNodeInfoResponse{} }
@@ -673,9 +673,9 @@ func (m *GetNodeInfoResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_GetNodeInfoResponse proto.InternalMessageInfo
func (m *GetNodeInfoResponse) GetDefaultNodeInfo() *p2p.DefaultNodeInfo {
func (m *GetNodeInfoResponse) GetNodeInfo() *p2p.NodeInfo {
if m != nil {
return m.DefaultNodeInfo
return m.NodeInfo
}
return nil
}
@@ -876,77 +876,76 @@ func init() {
}
var fileDescriptor_40c93fb3ef485c5d = []byte{
// 1106 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4d, 0x6f, 0x1b, 0x45,
0x18, 0xee, 0xda, 0x6d, 0x9c, 0xbc, 0x46, 0x90, 0x4c, 0x42, 0xe3, 0xac, 0x52, 0x37, 0xf8, 0xd0,
0x26, 0x84, 0xec, 0xca, 0x6e, 0x9b, 0xf6, 0x50, 0x8a, 0x1a, 0x02, 0x69, 0xd4, 0x52, 0x45, 0x1b,
0xc4, 0x01, 0x21, 0xad, 0xc6, 0xde, 0xc9, 0x66, 0x14, 0x7b, 0x67, 0xba, 0x33, 0x1b, 0x64, 0xa1,
0x0a, 0xc4, 0x89, 0x23, 0x12, 0x7f, 0x81, 0x03, 0xdc, 0x11, 0xc7, 0x8a, 0x23,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e, 0x9c,
0xaf, 0xa9, 0xdd, 0x93, 0xd4, 0xee, 0xa0, 0xed, 0xe9, 0xa8, 0xa5, 0x3b, 0xb6, 0xf3, 0xe8, 0xb7,
0xe3, 0xaa, 0xf1, 0xfc, 0xb8, 0x6a, 0xfc, 0x75, 0x5c, 0x35, 0xbe, 0x3b, 0xa9, 0xce, 0x3c, 0x3f,
0xa9, 0xce, 0xbc, 0x3c, 0xa9, 0xce, 0x7c, 0xd6, 0x08, 0x89, 0x38, 0xea, 0x35, 0xed, 0x16, 0xed,
0xa6, 0xb5, 0xd5, 0x67, 0x93, 0x07, 0x6d, 0xa7, 0xd5, 0x21, 0x38, 0x12, 0x4e, 0x18, 0xb3, 0x96,
0x23, 0xba, 0x5c, 0x35, 0xb3, 0xe6, 0xac, 0x7c, 0x07, 0xdd, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff,
0x1c, 0x72, 0x7c, 0x16, 0x44, 0x0d, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1712,9 +1711,9 @@ func (m *GetNodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x12
}
if m.DefaultNodeInfo != nil {
if m.NodeInfo != nil {
{
size, err := m.DefaultNodeInfo.MarshalToSizedBuffer(dAtA[:i])
size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -2055,8 +2054,8 @@ func (m *GetNodeInfoResponse) Size() (n int) {
}
var l int
_ = l
if m.DefaultNodeInfo != nil {
l = m.DefaultNodeInfo.Size()
if m.NodeInfo != nil {
l = m.NodeInfo.Size()
n += 1 + l + sovQuery(uint64(l))
}
if m.ApplicationVersion != nil {
@@ -3325,7 +3324,7 @@ func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error {
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DefaultNodeInfo", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -3352,10 +3351,10 @@ func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.DefaultNodeInfo == nil {
m.DefaultNodeInfo = &p2p.DefaultNodeInfo{}
if m.NodeInfo == nil {
m.NodeInfo = &p2p.NodeInfo{}
}
if err := m.DefaultNodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
+1 -1
View File
@@ -182,7 +182,7 @@ func (s queryServer) GetNodeInfo(ctx context.Context, req *GetNodeInfoRequest) (
}
resp := GetNodeInfoResponse{
DefaultNodeInfo: protoNodeInfo,
NodeInfo: protoNodeInfo,
ApplicationVersion: &VersionInfo{
AppName: nodeInfo.AppName,
Name: nodeInfo.Name,
+2 -2
View File
@@ -204,7 +204,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPC() {
expErrMsg string
}{
{"nil request", nil, true, "request cannot be nil"},
{"empty request", &tmservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than 0"},
{"empty request", &tmservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than zero"},
{"no pagination", &tmservice.GetValidatorSetByHeightRequest{Height: 1}, false, ""},
{"with pagination", &tmservice.GetValidatorSetByHeightRequest{Height: 1, Pagination: &qtypes.PageRequest{Offset: 0, Limit: 1}}, false, ""},
}
@@ -232,7 +232,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() {
expErr bool
expErrMsg string
}{
{"invalid height", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than 0"},
{"invalid height", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than zero"},
{"no pagination", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d", vals[0].APIAddress, 1), false, ""},
{"pagination invalid fields", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d?pagination.offset=-1&pagination.limit=-2", vals[0].APIAddress, 1), true, "strconv.ParseUint"},
{"with pagination", fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/validatorsets/%d?pagination.offset=0&pagination.limit=2", vals[0].APIAddress, 1), false, ""},
+3 -3
View File
@@ -3,15 +3,15 @@ package tmservice
import (
"context"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/rpc/coretypes"
"github.com/cosmos/cosmos-sdk/client"
)
func getNodeStatus(ctx context.Context, clientCtx client.Context) (*ctypes.ResultStatus, error) {
func getNodeStatus(ctx context.Context, clientCtx client.Context) (*coretypes.ResultStatus, error) {
node, err := clientCtx.GetNode()
if err != nil {
return &ctypes.ResultStatus{}, err
return &coretypes.ResultStatus{}, err
}
return node.Status(ctx)
}
+6 -6
View File
@@ -6,8 +6,8 @@ import (
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/libs/bytes"
"github.com/tendermint/tendermint/p2p"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/rpc/coretypes"
tmtypes "github.com/tendermint/tendermint/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
@@ -26,8 +26,8 @@ type validatorInfo struct {
// ResultStatus is node's info, same as Tendermint, except that we use our own
// PubKey.
type resultStatus struct {
NodeInfo p2p.DefaultNodeInfo
SyncInfo ctypes.SyncInfo
NodeInfo tmtypes.NodeInfo
SyncInfo coretypes.SyncInfo
ValidatorInfo validatorInfo
}
@@ -77,10 +77,10 @@ func StatusCommand() *cobra.Command {
return cmd
}
func getNodeStatus(clientCtx client.Context) (*ctypes.ResultStatus, error) {
func getNodeStatus(clientCtx client.Context) (*coretypes.ResultStatus, error) {
node, err := clientCtx.GetNode()
if err != nil {
return &ctypes.ResultStatus{}, err
return &coretypes.ResultStatus{}, err
}
return node.Status(context.Background())
+1 -3
View File
@@ -73,8 +73,6 @@ func ReadPageRequest(flagSet *pflag.FlagSet) (*query.PageRequest, error) {
// NewClientFromNode sets up Client implementation that communicates with a Tendermint node over
// JSON RPC and WebSockets
// TODO: We might not need to manually append `/websocket`:
// https://github.com/cosmos/cosmos-sdk/issues/8986
func NewClientFromNode(nodeURI string) (*rpchttp.HTTP, error) {
return rpchttp.New(nodeURI, "/websocket")
return rpchttp.New(nodeURI)
}