Skip to content

Commit

Permalink
sync with ibc-go v8.1.1 (#201)
Browse files Browse the repository at this point in the history
* sync with ibc-go v8.1.1

* Add changelog entry

---------

Co-authored-by: Romain Ruetschi <[email protected]>
  • Loading branch information
Carlos Rodriguez and romac authored Mar 14, 2024
1 parent 1131d13 commit 0a77136
Show file tree
Hide file tree
Showing 7 changed files with 2,777 additions and 507 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/201-ibc-go-v8.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update to ibc-go v8.1.1 which brings back the `ibc.lightclients.wasm.v1`
protos ([\#201](https://github.com/cosmos/ibc-proto-rs/pull/201))
2 changes: 1 addition & 1 deletion src/IBC_GO_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7e01c9149149b9d4b1d871e58eb88a22f15bdb3c
a4ef5360b49ad2118e1d68f25f13935162660e0b
170 changes: 31 additions & 139 deletions src/prost/google.protobuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ pub struct FileDescriptorProto {
/// If `edition` is present, this value must be "editions".
#[prost(string, optional, tag = "12")]
pub syntax: ::core::option::Option<::prost::alloc::string::String>,
/// The edition of the proto file.
#[prost(enumeration = "Edition", optional, tag = "14")]
pub edition: ::core::option::Option<i32>,
/// The edition of the proto file, which is an opaque string.
#[prost(string, optional, tag = "13")]
pub edition: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for FileDescriptorProto {
const NAME: &'static str = "FileDescriptorProto";
Expand Down Expand Up @@ -294,7 +294,7 @@ pub struct ExtensionRangeOptions {
#[prost(message, optional, tag = "50")]
pub features: ::core::option::Option<FeatureSet>,
/// The verification state of the range.
/// TODO: flip the default to DECLARATION once all empty ranges
/// TODO(b/278783756): flip the default to DECLARATION once all empty ranges
/// are marked as UNVERIFIED.
#[prost(
enumeration = "extension_range_options::VerificationState",
Expand Down Expand Up @@ -484,10 +484,9 @@ pub mod field_descriptor_proto {
Bool = 8,
String = 9,
/// Tag-delimited aggregate.
/// Group type is deprecated and not supported after google.protobuf. However, Proto3
/// Group type is deprecated and not supported in proto3. However, Proto3
/// implementations should still be able to parse the group wire format and
/// treat group fields as unknown fields. In Editions, the group wire format
/// can be enabled via the `message_encoding` feature.
/// treat group fields as unknown fields.
Group = 10,
/// Length-delimited aggregate.
Message = 11,
Expand Down Expand Up @@ -569,11 +568,8 @@ pub mod field_descriptor_proto {
pub enum Label {
/// 0 is reserved for errors
Optional = 1,
Repeated = 3,
/// The required label is only allowed in google.protobuf. In proto3 and Editions
/// it's explicitly prohibited. In Editions, the `field_presence` feature
/// can be used to get this behavior.
Required = 2,
Repeated = 3,
}
impl Label {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -583,16 +579,16 @@ pub mod field_descriptor_proto {
pub fn as_str_name(&self) -> &'static str {
match self {
Label::Optional => "LABEL_OPTIONAL",
Label::Repeated => "LABEL_REPEATED",
Label::Required => "LABEL_REQUIRED",
Label::Repeated => "LABEL_REPEATED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LABEL_OPTIONAL" => Some(Self::Optional),
"LABEL_REPEATED" => Some(Self::Repeated),
"LABEL_REQUIRED" => Some(Self::Required),
"LABEL_REPEATED" => Some(Self::Repeated),
_ => None,
}
}
Expand Down Expand Up @@ -978,7 +974,7 @@ pub struct MessageOptions {
/// This should only be used as a temporary measure against broken builds due
/// to the change in behavior for JSON field name conflicts.
///
/// TODO This is legacy behavior we plan to remove once downstream
/// TODO(b/261750190) This is legacy behavior we plan to remove once downstream
/// teams have had time to migrate.
#[deprecated]
#[prost(bool, optional, tag = "11")]
Expand Down Expand Up @@ -1017,9 +1013,7 @@ pub struct FieldOptions {
/// a more efficient representation on the wire. Rather than repeatedly
/// writing the tag and type for each element, the entire array is encoded as
/// a single length-delimited blob. In proto3, only explicit setting it to
/// false will avoid using packed encoding. This option is prohibited in
/// Editions, but the `repeated_field_encoding` feature can be used to control
/// the behavior.
/// false will avoid using packed encoding.
#[prost(bool, optional, tag = "2")]
pub packed: ::core::option::Option<bool>,
/// The jstype option determines the JavaScript type used for values of the
Expand Down Expand Up @@ -1113,8 +1107,8 @@ pub mod field_options {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EditionDefault {
#[prost(enumeration = "super::Edition", optional, tag = "3")]
pub edition: ::core::option::Option<i32>,
#[prost(string, optional, tag = "1")]
pub edition: ::core::option::Option<::prost::alloc::string::String>,
/// Textproto value.
#[prost(string, optional, tag = "2")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
Expand Down Expand Up @@ -1364,7 +1358,7 @@ pub struct EnumOptions {
/// and strips underscored from the fields before comparison in proto3 only.
/// The new behavior takes `json_name` into account and applies to proto2 as
/// well.
/// TODO Remove this legacy behavior once downstream teams have
/// TODO(b/261750190) Remove this legacy behavior once downstream teams have
/// had time to migrate.
#[deprecated]
#[prost(bool, optional, tag = "6")]
Expand Down Expand Up @@ -1567,7 +1561,7 @@ impl ::prost::Name for UninterpretedOption {
::prost::alloc::format!("google.protobuf.{}", Self::NAME)
}
}
/// TODO Enums in C++ gencode (and potentially other languages) are
/// TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are
/// not well scoped. This means that each of the feature enums below can clash
/// with each other. The short names we've chosen maximize call-site
/// readability, but leave us very open to this scenario. A future feature will
Expand All @@ -1582,12 +1576,14 @@ pub struct FeatureSet {
pub enum_type: ::core::option::Option<i32>,
#[prost(enumeration = "feature_set::RepeatedFieldEncoding", optional, tag = "3")]
pub repeated_field_encoding: ::core::option::Option<i32>,
#[prost(enumeration = "feature_set::Utf8Validation", optional, tag = "4")]
pub utf8_validation: ::core::option::Option<i32>,
#[prost(enumeration = "feature_set::StringFieldValidation", optional, tag = "4")]
pub string_field_validation: ::core::option::Option<i32>,
#[prost(enumeration = "feature_set::MessageEncoding", optional, tag = "5")]
pub message_encoding: ::core::option::Option<i32>,
#[prost(enumeration = "feature_set::JsonFormat", optional, tag = "6")]
pub json_format: ::core::option::Option<i32>,
#[prost(message, optional, boxed, tag = "999")]
pub raw_features: ::core::option::Option<::prost::alloc::boxed::Box<FeatureSet>>,
}
/// Nested message and enum types in `FeatureSet`.
pub mod feature_set {
Expand Down Expand Up @@ -1723,29 +1719,32 @@ pub mod feature_set {
::prost::Enumeration
)]
#[repr(i32)]
pub enum Utf8Validation {
pub enum StringFieldValidation {
Unknown = 0,
None = 1,
Verify = 2,
Mandatory = 1,
Hint = 2,
None = 3,
}
impl Utf8Validation {
impl StringFieldValidation {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Utf8Validation::Unknown => "UTF8_VALIDATION_UNKNOWN",
Utf8Validation::None => "NONE",
Utf8Validation::Verify => "VERIFY",
StringFieldValidation::Unknown => "STRING_FIELD_VALIDATION_UNKNOWN",
StringFieldValidation::Mandatory => "MANDATORY",
StringFieldValidation::Hint => "HINT",
StringFieldValidation::None => "NONE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UTF8_VALIDATION_UNKNOWN" => Some(Self::Unknown),
"STRING_FIELD_VALIDATION_UNKNOWN" => Some(Self::Unknown),
"MANDATORY" => Some(Self::Mandatory),
"HINT" => Some(Self::Hint),
"NONE" => Some(Self::None),
"VERIFY" => Some(Self::Verify),
_ => None,
}
}
Expand Down Expand Up @@ -1836,55 +1835,6 @@ impl ::prost::Name for FeatureSet {
::prost::alloc::format!("google.protobuf.{}", Self::NAME)
}
}
/// A compiled specification for the defaults of a set of features. These
/// messages are generated from FeatureSet extensions and can be used to seed
/// feature resolution. The resolution with this object becomes a simple search
/// for the closest matching edition, followed by proto merges.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureSetDefaults {
#[prost(message, repeated, tag = "1")]
pub defaults: ::prost::alloc::vec::Vec<
feature_set_defaults::FeatureSetEditionDefault,
>,
/// The minimum supported edition (inclusive) when this was constructed.
/// Editions before this will not have defaults.
#[prost(enumeration = "Edition", optional, tag = "4")]
pub minimum_edition: ::core::option::Option<i32>,
/// The maximum known edition (inclusive) when this was constructed. Editions
/// after this will not have reliable defaults.
#[prost(enumeration = "Edition", optional, tag = "5")]
pub maximum_edition: ::core::option::Option<i32>,
}
/// Nested message and enum types in `FeatureSetDefaults`.
pub mod feature_set_defaults {
/// A map from every known edition with a unique set of defaults to its
/// defaults. Not all editions may be contained here. For a given edition,
/// the defaults at the closest matching edition ordered at or before it should
/// be used. This field must be in strict ascending order by edition.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureSetEditionDefault {
#[prost(enumeration = "super::Edition", optional, tag = "3")]
pub edition: ::core::option::Option<i32>,
#[prost(message, optional, tag = "2")]
pub features: ::core::option::Option<super::FeatureSet>,
}
impl ::prost::Name for FeatureSetEditionDefault {
const NAME: &'static str = "FeatureSetEditionDefault";
const PACKAGE: &'static str = "google.protobuf";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("google.protobuf.FeatureSetDefaults.{}", Self::NAME)
}
}
}
impl ::prost::Name for FeatureSetDefaults {
const NAME: &'static str = "FeatureSetDefaults";
const PACKAGE: &'static str = "google.protobuf";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!("google.protobuf.{}", Self::NAME)
}
}
/// Encapsulates information about the original source file from which a
/// FileDescriptorProto was generated.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -2141,64 +2091,6 @@ impl ::prost::Name for GeneratedCodeInfo {
::prost::alloc::format!("google.protobuf.{}", Self::NAME)
}
}
/// The full set of known editions.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Edition {
/// A placeholder for an unknown edition value.
Unknown = 0,
/// Legacy syntax "editions". These pre-date editions, but behave much like
/// distinct editions. These can't be used to specify the edition of proto
/// files, but feature definitions must supply proto2/proto3 defaults for
/// backwards compatibility.
Proto2 = 998,
Proto3 = 999,
/// Editions that have been released. The specific values are arbitrary and
/// should not be depended on, but they will always be time-ordered for easy
/// comparison.
Edition2023 = 1000,
/// Placeholder editions for testing feature resolution. These should not be
/// used or relyed on outside of tests.
Edition1TestOnly = 1,
Edition2TestOnly = 2,
Edition99997TestOnly = 99997,
Edition99998TestOnly = 99998,
Edition99999TestOnly = 99999,
}
impl Edition {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Edition::Unknown => "EDITION_UNKNOWN",
Edition::Proto2 => "EDITION_PROTO2",
Edition::Proto3 => "EDITION_PROTO3",
Edition::Edition2023 => "EDITION_2023",
Edition::Edition1TestOnly => "EDITION_1_TEST_ONLY",
Edition::Edition2TestOnly => "EDITION_2_TEST_ONLY",
Edition::Edition99997TestOnly => "EDITION_99997_TEST_ONLY",
Edition::Edition99998TestOnly => "EDITION_99998_TEST_ONLY",
Edition::Edition99999TestOnly => "EDITION_99999_TEST_ONLY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EDITION_UNKNOWN" => Some(Self::Unknown),
"EDITION_PROTO2" => Some(Self::Proto2),
"EDITION_PROTO3" => Some(Self::Proto3),
"EDITION_2023" => Some(Self::Edition2023),
"EDITION_1_TEST_ONLY" => Some(Self::Edition1TestOnly),
"EDITION_2_TEST_ONLY" => Some(Self::Edition2TestOnly),
"EDITION_99997_TEST_ONLY" => Some(Self::Edition99997TestOnly),
"EDITION_99998_TEST_ONLY" => Some(Self::Edition99998TestOnly),
"EDITION_99999_TEST_ONLY" => Some(Self::Edition99999TestOnly),
_ => None,
}
}
}
/// A Timestamp represents a point in time independent of any time zone or local
/// calendar, encoded as a count of seconds and fractions of seconds at
/// nanosecond resolution. The count is relative to an epoch at UTC midnight on
Expand Down
Loading

0 comments on commit 0a77136

Please sign in to comment.