Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

updated protobuf definitions to TM 0.33.5 + crates (fixes #130 fixes #128) #131

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "abci"
version = "0.7.0"
version = "0.7.1"
authors = ["Adrian Brink <adrian@brink-holdings.com>", "Jackson Lewis <st.japa6@gmail.com>", "Dave Bryson", "Tomas Tauber"]
edition = "2018"
license = "MIT/Apache-2.0"
Expand All @@ -13,13 +13,13 @@ include = ["src/**/*", "Cargo.toml"]

[dependencies]
bytes = "0.4"
protobuf = "= 2.11.0"
byteorder = "1.3.2"
integer-encoding = "1.0.5"
protobuf = "= 2.15.1"
byteorder = "1.3.4"
integer-encoding = "1.1.5"
log = "0.4.8"
env_logger = "0.7.0"
env_logger = "0.7.1"
tokio = { version = "0.1", default-features = false, features = ["codec", "io", "tcp", "rt-full"] }
futures = "0.3"

[build-dependencies]
protobuf-codegen-pure = "= 2.11.0"
protobuf-codegen-pure = "= 2.15.1"
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Origin
version_branch = v0.33.1
version_branch = v0.33.5
tendermint = https://raw.githubusercontent.com/tendermint/tendermint/$(version_branch)

# Outputs
tmkv = protobuf/libs/kv/types.proto
tmmerkle = protobuf/crypto/merkle/merkle.proto
tmabci = protobuf/abci/types/types.proto
third_party = protobuf/third_party/proto/gogoproto/gogo.proto
third_party = third_party/proto/gogoproto/gogo.proto

# You *only* need to run this to rebuild protobufs from the tendermint source
update-proto:
Expand All @@ -15,4 +15,4 @@ update-proto:
curl $(tendermint)/crypto/merkle/merkle.proto > $(tmmerkle)
sed 's@package types;@package abci;@' $(tmabci) > protobuf/abci.proto
curl $(tendermint)/version/version.go | grep -F -eTMCoreSem -eABCISemVer > version.txt
curl $(tendermint)/$(third_party) > $(third_party)
curl $(tendermint)/$(third_party) > protobuf/$(third_party)
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ applications for [Tendermint](https://github.com/tendermint/tendermint/).

## Supported Version

- Tendermint 0.33.1
- ABCI 0.16.1
- Tendermint 0.33.5
- ABCI 0.16.2

## Installation

Expand All @@ -33,7 +33,7 @@ To use this library to build your own ABCI apps in Rust you have to include the

```toml
[dependencies]
abci = "0.7.0"
abci = "0.7.1"
```

### Development
Expand Down Expand Up @@ -65,6 +65,7 @@ For a real life example of an ABCI application you can checkout [Cosmos SDK](htt

| Tendermint | Rust-abci |
| ---------- | :-------: |
| 0.33.5 | 0.7.1 |
| 0.33.1 | 0.7.0 |
| 0.32.9 | 0.6.5 |
| 0.31.7 | 0.5.4 |
Expand Down
17 changes: 7 additions & 10 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
extern crate protobuf_codegen_pure;

fn main() {
protobuf_codegen_pure::run(protobuf_codegen_pure::Args {
out_dir: "src/messages",
input: &[
protobuf_codegen_pure::Codegen::new()
.out_dir("src/messages")
.inputs(&[
"protobuf/abci.proto",
"protobuf/libs/kv/types.proto",
"protobuf/crypto/merkle/merkle.proto",
],
includes: &["protobuf"],
customize: protobuf_codegen_pure::Customize {
..Default::default()
},
})
.expect("protoc");
])
.include("protobuf")
.run()
.expect("protoc");
}
3 changes: 2 additions & 1 deletion protobuf/abci.proto
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ message ResponseEndBlock {

message ResponseCommit {
// reserve 1
bytes data = 2;
bytes data = 2;
int64 retain_height = 3;
}

//----------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion protobuf/abci/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ message ResponseEndBlock {

message ResponseCommit {
// reserve 1
bytes data = 2;
bytes data = 2;
int64 retain_height = 3;
}

//----------------------------------------
Expand Down
7 changes: 0 additions & 7 deletions protobuf/libs/kv/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ option (gogoproto.testgen_all) = true;
//----------------------------------------
// Abstract types

// Define these here for compatibility but use tmlibs/kv.Pair.
message Pair {
bytes key = 1;
bytes value = 2;
}

// Define these here for compatibility but use tmlibs/kv.KI64Pair.
message KI64Pair {
bytes key = 1;
int64 value = 2;
}
178 changes: 89 additions & 89 deletions protobuf/third_party/proto/gogoproto/gogo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,115 +33,115 @@ package gogoproto;

import "google/protobuf/descriptor.proto";

option java_package = "com.google.protobuf";
option java_package = "com.google.protobuf";
option java_outer_classname = "GoGoProtos";
option go_package = "github.com/gogo/protobuf/gogoproto";
option go_package = "github.com/gogo/protobuf/gogoproto";

extend google.protobuf.EnumOptions {
optional bool goproto_enum_prefix = 62001;
optional bool goproto_enum_stringer = 62021;
optional bool enum_stringer = 62022;
optional string enum_customname = 62023;
optional bool enumdecl = 62024;
optional bool goproto_enum_prefix = 62001;
optional bool goproto_enum_stringer = 62021;
optional bool enum_stringer = 62022;
optional string enum_customname = 62023;
optional bool enumdecl = 62024;
}

extend google.protobuf.EnumValueOptions {
optional string enumvalue_customname = 66001;
optional string enumvalue_customname = 66001;
}

extend google.protobuf.FileOptions {
optional bool goproto_getters_all = 63001;
optional bool goproto_enum_prefix_all = 63002;
optional bool goproto_stringer_all = 63003;
optional bool verbose_equal_all = 63004;
optional bool face_all = 63005;
optional bool gostring_all = 63006;
optional bool populate_all = 63007;
optional bool stringer_all = 63008;
optional bool onlyone_all = 63009;

optional bool equal_all = 63013;
optional bool description_all = 63014;
optional bool testgen_all = 63015;
optional bool benchgen_all = 63016;
optional bool marshaler_all = 63017;
optional bool unmarshaler_all = 63018;
optional bool stable_marshaler_all = 63019;

optional bool sizer_all = 63020;

optional bool goproto_enum_stringer_all = 63021;
optional bool enum_stringer_all = 63022;

optional bool unsafe_marshaler_all = 63023;
optional bool unsafe_unmarshaler_all = 63024;

optional bool goproto_extensions_map_all = 63025;
optional bool goproto_unrecognized_all = 63026;
optional bool gogoproto_import = 63027;
optional bool protosizer_all = 63028;
optional bool compare_all = 63029;
optional bool typedecl_all = 63030;
optional bool enumdecl_all = 63031;

optional bool goproto_registration = 63032;
optional bool messagename_all = 63033;

optional bool goproto_sizecache_all = 63034;
optional bool goproto_unkeyed_all = 63035;
optional bool goproto_getters_all = 63001;
optional bool goproto_enum_prefix_all = 63002;
optional bool goproto_stringer_all = 63003;
optional bool verbose_equal_all = 63004;
optional bool face_all = 63005;
optional bool gostring_all = 63006;
optional bool populate_all = 63007;
optional bool stringer_all = 63008;
optional bool onlyone_all = 63009;

optional bool equal_all = 63013;
optional bool description_all = 63014;
optional bool testgen_all = 63015;
optional bool benchgen_all = 63016;
optional bool marshaler_all = 63017;
optional bool unmarshaler_all = 63018;
optional bool stable_marshaler_all = 63019;

optional bool sizer_all = 63020;

optional bool goproto_enum_stringer_all = 63021;
optional bool enum_stringer_all = 63022;

optional bool unsafe_marshaler_all = 63023;
optional bool unsafe_unmarshaler_all = 63024;

optional bool goproto_extensions_map_all = 63025;
optional bool goproto_unrecognized_all = 63026;
optional bool gogoproto_import = 63027;
optional bool protosizer_all = 63028;
optional bool compare_all = 63029;
optional bool typedecl_all = 63030;
optional bool enumdecl_all = 63031;

optional bool goproto_registration = 63032;
optional bool messagename_all = 63033;

optional bool goproto_sizecache_all = 63034;
optional bool goproto_unkeyed_all = 63035;
}

extend google.protobuf.MessageOptions {
optional bool goproto_getters = 64001;
optional bool goproto_stringer = 64003;
optional bool verbose_equal = 64004;
optional bool face = 64005;
optional bool gostring = 64006;
optional bool populate = 64007;
optional bool stringer = 67008;
optional bool onlyone = 64009;
optional bool goproto_getters = 64001;
optional bool goproto_stringer = 64003;
optional bool verbose_equal = 64004;
optional bool face = 64005;
optional bool gostring = 64006;
optional bool populate = 64007;
optional bool stringer = 67008;
optional bool onlyone = 64009;

optional bool equal = 64013;
optional bool description = 64014;
optional bool testgen = 64015;
optional bool benchgen = 64016;
optional bool marshaler = 64017;
optional bool unmarshaler = 64018;
optional bool stable_marshaler = 64019;
optional bool equal = 64013;
optional bool description = 64014;
optional bool testgen = 64015;
optional bool benchgen = 64016;
optional bool marshaler = 64017;
optional bool unmarshaler = 64018;
optional bool stable_marshaler = 64019;

optional bool sizer = 64020;
optional bool sizer = 64020;

optional bool unsafe_marshaler = 64023;
optional bool unsafe_unmarshaler = 64024;
optional bool unsafe_marshaler = 64023;
optional bool unsafe_unmarshaler = 64024;

optional bool goproto_extensions_map = 64025;
optional bool goproto_unrecognized = 64026;
optional bool goproto_extensions_map = 64025;
optional bool goproto_unrecognized = 64026;

optional bool protosizer = 64028;
optional bool compare = 64029;
optional bool protosizer = 64028;
optional bool compare = 64029;

optional bool typedecl = 64030;
optional bool typedecl = 64030;

optional bool messagename = 64033;
optional bool messagename = 64033;

optional bool goproto_sizecache = 64034;
optional bool goproto_unkeyed = 64035;
optional bool goproto_sizecache = 64034;
optional bool goproto_unkeyed = 64035;
}

extend google.protobuf.FieldOptions {
optional bool nullable = 65001;
optional bool embed = 65002;
optional string customtype = 65003;
optional string customname = 65004;
optional string jsontag = 65005;
optional string moretags = 65006;
optional string casttype = 65007;
optional string castkey = 65008;
optional string castvalue = 65009;

optional bool stdtime = 65010;
optional bool stdduration = 65011;
optional bool wktpointer = 65012;

optional string castrepeated = 65013;
}
optional bool nullable = 65001;
optional bool embed = 65002;
optional string customtype = 65003;
optional string customname = 65004;
optional string jsontag = 65005;
optional string moretags = 65006;
optional string casttype = 65007;
optional string castkey = 65008;
optional string castvalue = 65009;

optional bool stdtime = 65010;
optional bool stdduration = 65011;
optional bool wktpointer = 65012;

optional string castrepeated = 65013;
}
Loading