Skip to content

Commit

Permalink
chore: ignore store v1 proto generation (#18224)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <[email protected]>
  • Loading branch information
alexanderbez and tac0turtle authored Oct 24, 2023
1 parent 4352ab1 commit 2f23e8a
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 30 deletions.
9 changes: 4 additions & 5 deletions api/cosmos/gov/module/v1/module.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion proto/cosmos/store/internal/kv/v1beta1/kv.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,26 @@ import "gogoproto/gogo.proto";

option go_package = "cosmossdk.io/store/internal/kv";

// This is duplicated from the base kv directory to avoid a circular dependency with the cosmos-sdk
// This is duplicated from the base kv directory to avoid a circular dependency
// with the cosmos-sdk

// Pairs defines a repeated slice of Pair objects.
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message Pairs {
option deprecated = true;

repeated Pair pairs = 1 [(gogoproto.nullable) = false];
}

// Pair defines a key/value bytes tuple.
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message Pair {
option deprecated = true;

bytes key = 1;
bytes value = 2;
}
10 changes: 5 additions & 5 deletions proto/cosmos/store/snapshots/v1/snapshot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message Snapshot {

// Metadata contains SDK-specific snapshot metadata.
message Metadata {
repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes
repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes
}

// SnapshotItem is an item contained in a rootmulti.Store snapshot.
Expand All @@ -25,9 +25,9 @@ message Metadata {
message SnapshotItem {
// item is the specific type of snapshot item.
oneof item {
SnapshotStoreItem store = 1;
SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"];
SnapshotExtensionMeta extension = 3;
SnapshotStoreItem store = 1;
SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"];
SnapshotExtensionMeta extension = 3;
SnapshotExtensionPayload extension_payload = 4;
}
}
Expand Down Expand Up @@ -64,4 +64,4 @@ message SnapshotExtensionMeta {
// Since: cosmos-sdk 0.46
message SnapshotExtensionPayload {
bytes payload = 1;
}
}
38 changes: 33 additions & 5 deletions proto/cosmos/store/streaming/abci/grpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,57 @@ import "cosmos/store/v1beta1/listening.proto";
option go_package = "cosmossdk.io/store/streaming/abci";

// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message ListenFinalizeBlockRequest {
option deprecated = true;

tendermint.abci.RequestFinalizeBlock req = 1;
tendermint.abci.ResponseFinalizeBlock res = 2;
}

// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method
message ListenFinalizeBlockResponse {}
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message ListenFinalizeBlockResponse {
option deprecated = true;
}

// ListenCommitRequest is the request type for the ListenCommit RPC method
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message ListenCommitRequest {
// explicitly pass in block height as ResponseCommit does not contain this info
option deprecated = true;

// explicitly pass in block height as ResponseCommit does not contain this
// info
int64 block_height = 1;
tendermint.abci.ResponseCommit res = 2;
repeated cosmos.store.v1beta1.StoreKVPair change_set = 3;
}

// ListenCommitResponse is the response type for the ListenCommit RPC method
message ListenCommitResponse {}
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message ListenCommitResponse {
option deprecated = true;
}

// ABCIListenerService is the service for the BaseApp ABCIListener interface
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
service ABCIListenerService {
// ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock
rpc ListenFinalizeBlock(ListenFinalizeBlockRequest) returns (ListenFinalizeBlockResponse);
option deprecated = true;

// ListenFinalizeBlock is the corresponding endpoint for
// ABCIListener.ListenEndBlock
rpc ListenFinalizeBlock(ListenFinalizeBlockRequest)
returns (ListenFinalizeBlockResponse);
// ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit
rpc ListenCommit(ListenCommitRequest) returns (ListenCommitResponse);
}
17 changes: 16 additions & 1 deletion proto/cosmos/store/v1beta1/commit_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,37 @@ option go_package = "cosmossdk.io/store/types";

// CommitInfo defines commit information used by the multi-store when committing
// a version/height.
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message CommitInfo {
option deprecated = true;

int64 version = 1;
repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false];
google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp timestamp = 3
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}

// StoreInfo defines store-specific commit information. It contains a reference
// between a store name and the commit ID.
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message StoreInfo {
option deprecated = true;

string name = 1;
CommitID commit_id = 2 [(gogoproto.nullable) = false];
}

// CommitID defines the commitment information when a specific store is
// committed.
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message CommitID {
option deprecated = true;
option (gogoproto.goproto_stringer) = false;

int64 version = 1;
Expand Down
33 changes: 22 additions & 11 deletions proto/cosmos/store/v1beta1/listening.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,35 @@ import "tendermint/abci/types.proto";

option go_package = "cosmossdk.io/store/types";

// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
// Deletes
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and
// Deletes) It optionally includes the StoreKey for the originating KVStore and
// a Boolean flag to distinguish between Sets and Deletes
//
// Since: cosmos-sdk 0.43
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message StoreKVPair {
string store_key = 1; // the store key for the KVStore this pair originates from
bool delete = 2; // true indicates a delete operation, false indicates a set operation
bytes key = 3;
bytes value = 4;
option deprecated = true;

string store_key = 1; // the store key for the KVStore this pair originates from
bool delete = 2; // true indicates a delete operation, false indicates a set operation
bytes key = 3;
bytes value = 4;
}

// BlockMetadata contains all the abci event data of a block
// the file streamer dump them into files together with the state changes.
//
// Deprecated: Store v1 is deprecated as of v0.50.x, please use Store v2 types
// instead.
message BlockMetadata {
tendermint.abci.ResponseCommit response_commit = 6;
tendermint.abci.RequestFinalizeBlock request_finalize_block = 7;
tendermint.abci.ResponseFinalizeBlock response_finalize_block = 8; // TODO: should we renumber this?
option deprecated = true;

tendermint.abci.ResponseCommit response_commit = 6;
tendermint.abci.RequestFinalizeBlock request_finalize_block = 7;
tendermint.abci.ResponseFinalizeBlock response_finalize_block =
8; // TODO: should we renumber this?

reserved 1, 2, 3, 4, 5; // reserved for from previous use in comet <= 0.37
reserved 1, 2, 3, 4, 5; // reserved for from previous use in comet <= 0.37
}
3 changes: 1 addition & 2 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e

echo "Generating gogo proto code"
cd proto
proto_dirs=$(find ./cosmos ./amino -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
proto_dirs=$(find ./cosmos ./amino -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq | grep -v '^./cosmos/store/')
for dir in $proto_dirs; do
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do
# this regex checks if a proto file has its go_package set to cosmossdk.io/api/...
Expand All @@ -38,4 +38,3 @@ rm -rf github.com cosmossdk.io
go mod tidy

./scripts/protocgen-pulsar.sh

0 comments on commit 2f23e8a

Please sign in to comment.