Merge PR #5669: proto: update tendermint proto files
This commit is contained in:
parent
b54d07e5ce
commit
32b40fdb27
48
Makefile
48
Makefile
|
@ -238,25 +238,37 @@ proto-lint:
|
||||||
proto-check-breaking:
|
proto-check-breaking:
|
||||||
@buf check breaking --against-input '.git#branch=master'
|
@buf check breaking --against-input '.git#branch=master'
|
||||||
|
|
||||||
# Origin
|
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.33.1
|
||||||
# TODO: Update to the version of Tendermint that is being used in go.mod
|
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
|
||||||
version_branch = v0.33.0
|
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
|
||||||
tendermint = https://raw.githubusercontent.com/tendermint/tendermint/$(version_branch)
|
|
||||||
|
|
||||||
# Outputs
|
TM_KV_TYPES = third_party/proto/tendermint/libs/kv
|
||||||
tmkv = third_party/proto/tendermint/libs/kv/types.proto
|
TM_MERKLE_TYPES = third_party/proto/tendermint/crypto/merkle
|
||||||
tmmerkle = third_party/proto/tendermint/crypto/merkle/merkle.proto
|
TM_ABCI_TYPES = third_party/proto/tendermint/abci/types
|
||||||
tmabci = third_party/proto/tendermint/abci/types/types.proto
|
GOGO_PROTO_TYPES = third_party/proto/gogoproto
|
||||||
|
COSMOS_PROTO_TYPES = third_party/proto/cosmos-proto
|
||||||
|
SDK_PROTO_TYPES = third_party/proto/cosmos-sdk/types
|
||||||
|
AUTH_PROTO_TYPES = third_party/proto/cosmos-sdk/x/auth/types
|
||||||
|
VESTING_PROTO_TYPES = third_party/proto/cosmos-sdk/x/auth/vesting/types
|
||||||
|
SUPPLY_PROTO_TYPES = third_party/proto/cosmos-sdk/x/supply/types
|
||||||
|
|
||||||
# You *only* need to run this to rebuild protobufs from the tendermint source
|
proto-update-deps:
|
||||||
proto-update-tendermint:
|
@mkdir -p $(GOGO_PROTO_TYPES)
|
||||||
@curl $(tendermint)/abci/types/types.proto > $(tmabci)
|
@curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
|
||||||
sed -i '' '8,9 s|github.com/tendermint|third_party/proto|g' $(tmabci)
|
|
||||||
sed -i '' '7 s|github.com/gogo/protobuf|third_party/proto|' $(tmabci)
|
@mkdir -p $(COSMOS_PROTO_TYPES)
|
||||||
@curl $(tendermint)/libs/kv/types.proto > $(tmkv)
|
@curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
|
||||||
sed -i '' 's|github.com/gogo/protobuf|third_party/proto|' $(tmkv)
|
|
||||||
@curl $(tendermint)/crypto/merkle/merkle.proto > $(tmmerkle)
|
@mkdir -p $(TM_ABCI_TYPES)
|
||||||
sed -i '' '7 s|github.com/gogo/protobuf|third_party/proto|' $(tmmerkle)
|
@curl -sSL $(TM_URL)/abci/types/types.proto > $(TM_ABCI_TYPES)/types.proto
|
||||||
|
@sed -i '' '8 s|crypto/merkle/merkle.proto|third_party/proto/tendermint/crypto/merkle/merkle.proto|g' $(TM_ABCI_TYPES)/types.proto
|
||||||
|
@sed -i '' '9 s|libs/kv/types.proto|third_party/proto/tendermint/libs/kv/types.proto|g' $(TM_ABCI_TYPES)/types.proto
|
||||||
|
|
||||||
|
@mkdir -p $(TM_KV_TYPES)
|
||||||
|
@curl -sSL $(TM_URL)/libs/kv/types.proto > $(TM_KV_TYPES)/types.proto
|
||||||
|
|
||||||
|
@mkdir -p $(TM_MERKLE_TYPES)
|
||||||
|
@curl -sSL $(TM_URL)/crypto/merkle/merkle.proto > $(TM_MERKLE_TYPES)/merkle.proto
|
||||||
|
|
||||||
|
|
||||||
.PHONY: proto-all proto-gen proto-lint proto-check-breaking proto-update-tendermint
|
.PHONY: proto-all proto-gen proto-lint proto-check-breaking proto-update-deps
|
||||||
|
|
|
@ -46,8 +46,7 @@ message RequestEcho {
|
||||||
string message = 1;
|
string message = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RequestFlush {
|
message RequestFlush {}
|
||||||
}
|
|
||||||
|
|
||||||
message RequestInfo {
|
message RequestInfo {
|
||||||
string version = 1;
|
string version = 1;
|
||||||
|
@ -101,8 +100,7 @@ message RequestEndBlock {
|
||||||
int64 height = 1;
|
int64 height = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RequestCommit {
|
message RequestCommit {}
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
// Response types
|
// Response types
|
||||||
|
@ -133,8 +131,7 @@ message ResponseEcho {
|
||||||
string message = 1;
|
string message = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseFlush {
|
message ResponseFlush {}
|
||||||
}
|
|
||||||
|
|
||||||
message ResponseInfo {
|
message ResponseInfo {
|
||||||
string data = 1;
|
string data = 1;
|
||||||
|
@ -173,7 +170,8 @@ message ResponseQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseBeginBlock {
|
message ResponseBeginBlock {
|
||||||
repeated Event events = 1 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
|
repeated Event events = 1
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseCheckTx {
|
message ResponseCheckTx {
|
||||||
|
@ -183,7 +181,8 @@ message ResponseCheckTx {
|
||||||
string info = 4; // nondeterministic
|
string info = 4; // nondeterministic
|
||||||
int64 gas_wanted = 5;
|
int64 gas_wanted = 5;
|
||||||
int64 gas_used = 6;
|
int64 gas_used = 6;
|
||||||
repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
|
repeated Event events = 7
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
string codespace = 8;
|
string codespace = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,14 +193,16 @@ message ResponseDeliverTx {
|
||||||
string info = 4; // nondeterministic
|
string info = 4; // nondeterministic
|
||||||
int64 gas_wanted = 5;
|
int64 gas_wanted = 5;
|
||||||
int64 gas_used = 6;
|
int64 gas_used = 6;
|
||||||
repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
|
repeated Event events = 7
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
string codespace = 8;
|
string codespace = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseEndBlock {
|
message ResponseEndBlock {
|
||||||
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
|
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
|
||||||
ConsensusParams consensus_param_updates = 2;
|
ConsensusParams consensus_param_updates = 2;
|
||||||
repeated Event events = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
|
repeated Event events = 3
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseCommit {
|
message ResponseCommit {
|
||||||
|
@ -231,7 +232,8 @@ message BlockParams {
|
||||||
message EvidenceParams {
|
message EvidenceParams {
|
||||||
// Note: must be greater than 0
|
// Note: must be greater than 0
|
||||||
int64 max_age_num_blocks = 1;
|
int64 max_age_num_blocks = 1;
|
||||||
google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable)=false, (gogoproto.stdduration)=true];
|
google.protobuf.Duration max_age_duration = 2
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidatorParams contains limits on validators.
|
// ValidatorParams contains limits on validators.
|
||||||
|
@ -246,7 +248,8 @@ message LastCommitInfo {
|
||||||
|
|
||||||
message Event {
|
message Event {
|
||||||
string type = 1;
|
string type = 1;
|
||||||
repeated tendermint.libs.kv.Pair attributes = 2 [(gogoproto.nullable)=false, (gogoproto.jsontag)="attributes,omitempty"];
|
repeated tendermint.libs.kv.Pair attributes = 2
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
@ -283,7 +286,6 @@ message Version {
|
||||||
uint64 App = 2;
|
uint64 App = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message BlockID {
|
message BlockID {
|
||||||
bytes hash = 1;
|
bytes hash = 1;
|
||||||
PartSetHeader parts_header = 2 [(gogoproto.nullable) = false];
|
PartSetHeader parts_header = 2 [(gogoproto.nullable) = false];
|
||||||
|
|
|
@ -16,13 +16,13 @@ option (gogoproto.testgen_all) = true;
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
// Abstract types
|
// Abstract types
|
||||||
|
|
||||||
// Define these here for compatibility but use tmlibs/common.KVPair.
|
// Define these here for compatibility but use tmlibs/kv.Pair.
|
||||||
message Pair {
|
message Pair {
|
||||||
bytes key = 1;
|
bytes key = 1;
|
||||||
bytes value = 2;
|
bytes value = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define these here for compatibility but use tmlibs/common.KI64Pair.
|
// Define these here for compatibility but use tmlibs/kv.KI64Pair.
|
||||||
message KI64Pair {
|
message KI64Pair {
|
||||||
bytes key = 1;
|
bytes key = 1;
|
||||||
int64 value = 2;
|
int64 value = 2;
|
||||||
|
|
Loading…
Reference in New Issue