Skip to content

Commit 5455f70

Browse files
authored
Merge branch 'main' into julien/encoder-autocli
2 parents da856da + b2835eb commit 5455f70

11 files changed

Lines changed: 17 additions & 41 deletions

File tree

UPGRADING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ There is no longer a need for the Cosmos SDK to host these protos for itself and
148148
That package containing proto v2 generated code, but the SDK now uses [buf generated go SDK instead](https://buf.build/docs/bsr/generated-sdks/go).
149149
If you were depending on `cosmossdk.io/api/tendermint`, please use the buf generated go SDK instead, or ask CometBFT host the generated proto v2 code.
150150

151+
The `codectypes.Any` has moved to `github.com/cosmos/gogoproto/types/any`. Module developers can update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for directly mapping the`Any` type to its new location. This change is optional as `codectypes.Any` is aliased to `gogoproto.Any` in the SDK.
152+
151153
### Modules
152154

153155
#### `**all**`
@@ -440,10 +442,7 @@ With the deprecation of the Amino JSON codec defined in [cosmos/gogoproto](https
440442

441443
For core SDK types equivalence is asserted by generative testing of [SignableTypes](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/tests/integration/rapidgen/rapidgen.go#L102) in [TestAminoJSON_Equivalence](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/tests/integration/tx/aminojson/aminojson_test.go#L94).
442444

443-
Due to the `Any` type moving to the `github.com/cosmos/gogoproto/types/any` repository, module developers must update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for correct mapping to the new `Any` type location.
444-
445-
446-
**TODO: summarize proto annotation requirements.**
445+
Read more about the available annotations [here](https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations).
447446

448447
#### Stringer
449448

client/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func ReadPersistentCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Cont
168168
})))
169169
}
170170

171-
grpcClient, err := grpc.Dial(grpcURI, dialOpts...)
171+
grpcClient, err := grpc.NewClient(grpcURI, dialOpts...)
172172
if err != nil {
173173
return Context{}, err
174174
}

client/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func getGRPCClient(grpcConfig GRPCConfig) (*grpc.ClientConn, error) {
175175
}
176176

177177
dialOptions := []grpc.DialOption{transport}
178-
grpcClient, err := grpc.Dial(grpcConfig.Address, dialOptions...)
178+
grpcClient, err := grpc.NewClient(grpcConfig.Address, dialOptions...)
179179
if err != nil {
180180
return nil, fmt.Errorf("failed to dial gRPC server at %s: %w", grpcConfig.Address, err)
181181
}

server/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func startGrpcServer(
473473
}
474474

475475
// if gRPC is enabled, configure gRPC client for gRPC gateway
476-
grpcClient, err := grpc.Dial(
476+
grpcClient, err := grpc.NewClient(
477477
config.Address,
478478
grpc.WithTransportCredentials(insecure.NewCredentials()),
479479
grpc.WithDefaultCallOptions(

store/db/rocksdb_noflag.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -86,29 +86,3 @@ func (itr *rocksDBIterator) Close() error {
8686
func (itr *rocksDBIterator) assertIsValid() {
8787
panic("rocksdb must be built with -tags rocksdb")
8888
}
89-
90-
type rocksDBBatch struct{}
91-
92-
func (b *rocksDBBatch) Set(key, value []byte) error {
93-
panic("rocksdb must be built with -tags rocksdb")
94-
}
95-
96-
func (b *rocksDBBatch) Delete(key []byte) error {
97-
panic("rocksdb must be built with -tags rocksdb")
98-
}
99-
100-
func (b *rocksDBBatch) Write() error {
101-
panic("rocksdb must be built with -tags rocksdb")
102-
}
103-
104-
func (b *rocksDBBatch) WriteSync() error {
105-
panic("rocksdb must be built with -tags rocksdb")
106-
}
107-
108-
func (b *rocksDBBatch) Close() error {
109-
panic("rocksdb must be built with -tags rocksdb")
110-
}
111-
112-
func (b *rocksDBBatch) GetByteSize() (int, error) {
113-
panic("rocksdb must be built with -tags rocksdb")
114-
}

store/root/migrate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (s *MigrateStoreTestSuite) TestMigrateState() {
8888
s.Require().NoError(err)
8989

9090
// start the migration process
91-
s.rootStore.StartMigration()
91+
s.Require().NoError(s.rootStore.StartMigration())
9292

9393
// continue to apply changeset against the original store
9494
latestVersion := originalLatestVersion + 1

tests/integration/server/grpc/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
5252
s.Require().NoError(err)
5353

5454
val0 := s.network.GetValidators()[0]
55-
s.conn, err = grpc.Dial(
55+
s.conn, err = grpc.NewClient(
5656
val0.GetAppConfig().GRPC.Address,
5757
grpc.WithInsecure(), //nolint:staticcheck // ignore SA1019, we don't need to use a secure connection for tests
5858
grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(s.cfg.InterfaceRegistry).GRPCCodec())),

tests/starship/tests/suite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (s *TestSuite) SetupTest() {
5555

5656
s.cdc = encodingConfig
5757

58-
grpcConn, err := grpc.Dial(
58+
grpcConn, err := grpc.NewClient(
5959
fmt.Sprintf("127.0.0.1:%d", config.GetChain(chainID).Ports.Grpc),
6060
grpc.WithInsecure(), //nolint:staticcheck // ignore SA1019, we don't need to use a secure connection for tests
6161
grpc.WithDefaultCallOptions(grpc.ForceCodec(codec.NewProtoCodec(s.cdc.InterfaceRegistry).GRPCCodec())))

tools/hubl/internal/load.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (c *ChainInfo) OpenClient() (*grpc.ClientConn, error) {
174174
}
175175

176176
var err error
177-
c.client, err = grpc.Dial(endpoint.Endpoint, grpc.WithTransportCredentials(creds))
177+
c.client, err = grpc.NewClient(endpoint.Endpoint, grpc.WithTransportCredentials(creds))
178178
if err != nil {
179179
res = errors.Join(res, err)
180180
continue

x/accounts/defaults/lockup/lockup.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"fmt"
77
"time"
88

9+
"github.com/cosmos/gogoproto/proto"
10+
911
"cosmossdk.io/collections"
1012
collcodec "cosmossdk.io/collections/codec"
1113
"cosmossdk.io/core/address"
@@ -15,9 +17,8 @@ import (
1517
"cosmossdk.io/x/accounts/accountstd"
1618
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types"
1719
banktypes "cosmossdk.io/x/bank/types"
18-
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
19-
"github.com/cosmos/gogoproto/proto"
2020

21+
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
2122
sdk "github.com/cosmos/cosmos-sdk/types"
2223
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
2324
)

0 commit comments

Comments
 (0)