From 42a3e663c0cceece04449b9a0d1f8fa244578246 Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Fri, 2 Aug 2024 14:12:02 +0300 Subject: [PATCH 1/7] Added start_height and end_height fields to NodeVersionInfo response --- .../flow/entities/node_version_info.proto | 4 ++ .../go/flow/entities/node_version_info.pb.go | 58 +++++++++++++------ 2 files changed, 43 insertions(+), 19 deletions(-) diff --git a/protobuf/flow/entities/node_version_info.proto b/protobuf/flow/entities/node_version_info.proto index a61378d4e..de7ac399f 100644 --- a/protobuf/flow/entities/node_version_info.proto +++ b/protobuf/flow/entities/node_version_info.proto @@ -21,4 +21,8 @@ message NodeVersionInfo { // If the node started after the beginning of the spork, it is the height of the first sealed block // indexed. uint64 node_root_block_height = 6; + // The first block that the node's version supports. + uint64 start_height = 7; + // The last block the node's version supports. + uint64 end_height = 8; } diff --git a/protobuf/go/flow/entities/node_version_info.pb.go b/protobuf/go/flow/entities/node_version_info.pb.go index a998c3bf7..aa4102bff 100644 --- a/protobuf/go/flow/entities/node_version_info.pb.go +++ b/protobuf/go/flow/entities/node_version_info.pb.go @@ -35,7 +35,11 @@ type NodeVersionInfo struct { // If the node started at the beginning of the spork, it is the same as the spork root block height. // If the node started after the beginning of the spork, it is the height of the first sealed block // indexed. - NodeRootBlockHeight uint64 `protobuf:"varint,6,opt,name=node_root_block_height,json=nodeRootBlockHeight,proto3" json:"node_root_block_height,omitempty"` + NodeRootBlockHeight uint64 `protobuf:"varint,6,opt,name=node_root_block_height,json=nodeRootBlockHeight,proto3" json:"node_root_block_height,omitempty"` + // The first block that the node's version supports. + StartHeight uint64 `protobuf:"varint,7,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` + // The last block the node's version supports. + EndHeight uint64 `protobuf:"varint,8,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -108,6 +112,20 @@ func (m *NodeVersionInfo) GetNodeRootBlockHeight() uint64 { return 0 } +func (m *NodeVersionInfo) GetStartHeight() uint64 { + if m != nil { + return m.StartHeight + } + return 0 +} + +func (m *NodeVersionInfo) GetEndHeight() uint64 { + if m != nil { + return m.EndHeight + } + return 0 +} + func init() { proto.RegisterType((*NodeVersionInfo)(nil), "flow.entities.NodeVersionInfo") } @@ -117,22 +135,24 @@ func init() { } var fileDescriptor_ff9e447351cb4a8a = []byte{ - // 263 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x50, 0xcd, 0x4a, 0xf4, 0x30, - 0x14, 0xa5, 0xdf, 0x37, 0x56, 0x0d, 0xca, 0x48, 0x94, 0x31, 0x82, 0x8b, 0x22, 0x08, 0x75, 0xd3, - 0x08, 0x83, 0x2f, 0x30, 0x2b, 0x67, 0x23, 0xd2, 0x85, 0x0b, 0x37, 0x81, 0xb6, 0x69, 0x1b, 0xa6, - 0xcd, 0x19, 0xd2, 0xcc, 0xf8, 0xe0, 0xbe, 0x80, 0xf4, 0x66, 0x2a, 0xa8, 0x9b, 0xc0, 0xf9, 0xcb, - 0xbd, 0xf7, 0xb0, 0xfb, 0xba, 0xc3, 0x87, 0xd4, 0xd6, 0x1b, 0x6f, 0xf4, 0x20, 0x2d, 0x2a, 0xad, - 0xf6, 0xda, 0x0d, 0x06, 0x56, 0x19, 0x5b, 0x23, 0xdb, 0x3a, 0x78, 0xf0, 0xf3, 0xd1, 0x96, 0x4d, - 0xb6, 0xbb, 0xcf, 0x88, 0xcd, 0x5f, 0x50, 0xe9, 0xb7, 0xe0, 0x5c, 0xdb, 0x1a, 0x7c, 0xc1, 0xe2, - 0x41, 0xf7, 0x7b, 0xed, 0x44, 0x94, 0x44, 0xe9, 0x69, 0x7e, 0x40, 0x23, 0x5f, 0xa2, 0xef, 0x8d, - 0x17, 0xff, 0x02, 0x1f, 0x10, 0xbf, 0x61, 0x27, 0xc3, 0x16, 0x6e, 0xa3, 0x4c, 0x25, 0xfe, 0x27, - 0x51, 0x7a, 0x96, 0x1f, 0x13, 0x5e, 0x57, 0xfc, 0x81, 0x5d, 0xd0, 0xd8, 0x12, 0xdd, 0xb4, 0x8c, - 0x98, 0x25, 0x51, 0x3a, 0xcb, 0xe7, 0x13, 0x7f, 0x98, 0xcc, 0x9f, 0xd8, 0x75, 0xf8, 0xc5, 0x01, - 0x5e, 0x15, 0x1d, 0xca, 0x8d, 0x6a, 0xb5, 0x69, 0x5a, 0x2f, 0x8e, 0x28, 0x71, 0x45, 0x72, 0x0e, - 0xf8, 0xd5, 0x28, 0x3e, 0x93, 0xc6, 0x97, 0x6c, 0x41, 0xa7, 0xfe, 0x4d, 0xc5, 0x94, 0xba, 0x1c, - 0xd5, 0x5f, 0xa1, 0xd5, 0x2b, 0xbb, 0x85, 0x6b, 0x32, 0x58, 0x2a, 0x83, 0x36, 0x29, 0x76, 0xf5, - 0x77, 0x2b, 0xef, 0x8f, 0x8d, 0xf1, 0xed, 0xae, 0xc8, 0x4a, 0xf4, 0x32, 0x98, 0x24, 0x3d, 0x93, - 0x53, 0x36, 0x90, 0x3f, 0xea, 0x2e, 0x62, 0x92, 0x96, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0c, - 0x2a, 0x5d, 0x89, 0x86, 0x01, 0x00, 0x00, + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xdf, 0x4a, 0xc3, 0x30, + 0x14, 0xc6, 0xe9, 0x9c, 0xfb, 0x73, 0x9c, 0x4c, 0xa2, 0xcc, 0x0a, 0x0a, 0x53, 0x10, 0xea, 0x4d, + 0x23, 0x0c, 0x5f, 0x60, 0x57, 0xee, 0x46, 0xa4, 0x17, 0x5e, 0x78, 0x53, 0x6c, 0x93, 0xb6, 0x61, + 0x6d, 0xce, 0x48, 0xb3, 0xf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81, 0x09, 0x01, 0x53, 0xa9, 0x85, 0xb3, 0xd7, + 0xaf, 0x70, 0x8d, 0xa6, 0x8c, 0x51, 0xd3, 0x3a, 0x69, 0x96, 0x6c, 0x5f, 0xfc, 0xec, 0xf5, 0xfd, + 0xb1, 0x54, 0xb6, 0xda, 0x67, 0x71, 0x8e, 0x0d, 0x77, 0x10, 0xa7, 0xc3, 0x93, 0xbc, 0x44, 0xfe, + 0xeb, 0xc3, 0xb2, 0x11, 0x59, 0xab, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xe9, 0x03, 0x44, + 0xc8, 0x01, 0x00, 0x00, } From 56b1cca23494e8d8256ba5fb4aa8fe241a3660a6 Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Mon, 5 Aug 2024 13:39:09 +0300 Subject: [PATCH 2/7] Updated REST NodeVersionInfo endpoint --- openapi/access.yaml | 8 ++++++++ openapi/go-client-generated/api/swagger.yaml | 10 ++++++++++ openapi/go-client-generated/docs/NodeVersionInfo.md | 2 ++ openapi/go-client-generated/model_node_version_info.go | 2 ++ 4 files changed, 22 insertions(+) diff --git a/openapi/access.yaml b/openapi/access.yaml index 04a1463e4..3d920fc11 100644 --- a/openapi/access.yaml +++ b/openapi/access.yaml @@ -1202,6 +1202,8 @@ components: - protocol_version - spork_root_block_height - node_root_block_height + - start_height + - end_height properties: semver: type: string @@ -1218,6 +1220,12 @@ components: node_root_block_height: type: string format: uint64 + start_height: + type: string + format: uint64 + end_height: + type: string + format: uint64 SubscribeEvents: type: object properties: diff --git a/openapi/go-client-generated/api/swagger.yaml b/openapi/go-client-generated/api/swagger.yaml index 6759eb841..aa913fc0b 100644 --- a/openapi/go-client-generated/api/swagger.yaml +++ b/openapi/go-client-generated/api/swagger.yaml @@ -2073,11 +2073,13 @@ components: NodeVersionInfo: required: - commit + - end_height - node_root_block_height - protocol_version - semver - spork_id - spork_root_block_height + - start_height type: object properties: semver: @@ -2095,10 +2097,18 @@ components: node_root_block_height: type: string format: uint64 + start_height: + type: string + format: uint64 + end_height: + type: string + format: uint64 example: protocol_version: protocol_version + end_height: end_height semver: semver commit: commit + start_height: start_height node_root_block_height: node_root_block_height spork_id: spork_id spork_root_block_height: spork_root_block_height diff --git a/openapi/go-client-generated/docs/NodeVersionInfo.md b/openapi/go-client-generated/docs/NodeVersionInfo.md index c46323422..1e4487e3c 100644 --- a/openapi/go-client-generated/docs/NodeVersionInfo.md +++ b/openapi/go-client-generated/docs/NodeVersionInfo.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **ProtocolVersion** | **string** | | [default to null] **SporkRootBlockHeight** | **string** | | [default to null] **NodeRootBlockHeight** | **string** | | [default to null] +**StartHeight** | **string** | | [default to null] +**EndHeight** | **string** | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/go-client-generated/model_node_version_info.go b/openapi/go-client-generated/model_node_version_info.go index 6e20865b9..9b29d3161 100644 --- a/openapi/go-client-generated/model_node_version_info.go +++ b/openapi/go-client-generated/model_node_version_info.go @@ -15,4 +15,6 @@ type NodeVersionInfo struct { ProtocolVersion string `json:"protocol_version"` SporkRootBlockHeight string `json:"spork_root_block_height"` NodeRootBlockHeight string `json:"node_root_block_height"` + StartHeight string `json:"start_height"` + EndHeight string `json:"end_height"` } From a4f0b3b7c2917dc71b2a730b9e9fa398c8b3346e Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Tue, 6 Aug 2024 12:27:56 +0300 Subject: [PATCH 3/7] Updated naming according to comments --- .../flow/entities/node_version_info.proto | 4 +- .../go/flow/entities/node_version_info.pb.go | 58 +++++++++---------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/protobuf/flow/entities/node_version_info.proto b/protobuf/flow/entities/node_version_info.proto index de7ac399f..c704a1d33 100644 --- a/protobuf/flow/entities/node_version_info.proto +++ b/protobuf/flow/entities/node_version_info.proto @@ -22,7 +22,7 @@ message NodeVersionInfo { // indexed. uint64 node_root_block_height = 6; // The first block that the node's version supports. - uint64 start_height = 7; + uint64 protocol_version_start_height = 7; // The last block the node's version supports. - uint64 end_height = 8; + uint64 protocol_version_end_height = 8; } diff --git a/protobuf/go/flow/entities/node_version_info.pb.go b/protobuf/go/flow/entities/node_version_info.pb.go index aa4102bff..08b9609c3 100644 --- a/protobuf/go/flow/entities/node_version_info.pb.go +++ b/protobuf/go/flow/entities/node_version_info.pb.go @@ -37,12 +37,12 @@ type NodeVersionInfo struct { // indexed. NodeRootBlockHeight uint64 `protobuf:"varint,6,opt,name=node_root_block_height,json=nodeRootBlockHeight,proto3" json:"node_root_block_height,omitempty"` // The first block that the node's version supports. - StartHeight uint64 `protobuf:"varint,7,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` + ProtocolVersionStartHeight uint64 `protobuf:"varint,7,opt,name=protocol_version_start_height,json=protocolVersionStartHeight,proto3" json:"protocol_version_start_height,omitempty"` // The last block the node's version supports. - EndHeight uint64 `protobuf:"varint,8,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ProtocolVersionEndHeight uint64 `protobuf:"varint,8,opt,name=protocol_version_end_height,json=protocolVersionEndHeight,proto3" json:"protocol_version_end_height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *NodeVersionInfo) Reset() { *m = NodeVersionInfo{} } @@ -112,16 +112,16 @@ func (m *NodeVersionInfo) GetNodeRootBlockHeight() uint64 { return 0 } -func (m *NodeVersionInfo) GetStartHeight() uint64 { +func (m *NodeVersionInfo) GetProtocolVersionStartHeight() uint64 { if m != nil { - return m.StartHeight + return m.ProtocolVersionStartHeight } return 0 } -func (m *NodeVersionInfo) GetEndHeight() uint64 { +func (m *NodeVersionInfo) GetProtocolVersionEndHeight() uint64 { if m != nil { - return m.EndHeight + return m.ProtocolVersionEndHeight } return 0 } @@ -135,24 +135,24 @@ func init() { } var fileDescriptor_ff9e447351cb4a8a = []byte{ - // 292 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xdf, 0x4a, 0xc3, 0x30, - 0x14, 0xc6, 0xe9, 0x9c, 0xfb, 0x73, 0x9c, 0x4c, 0xa2, 0xcc, 0x0a, 0x0a, 0x53, 0x10, 0xea, 0x4d, - 0x23, 0x0c, 0x5f, 0x60, 0x57, 0xee, 0x46, 0xa4, 0x17, 0x5e, 0x78, 0x53, 0x6c, 0x93, 0xb6, 0x61, - 0x6d, 0xce, 0x48, 0xb3, 0xf9, 0x64, 0xbe, 0x9f, 0xf4, 0xa4, 0x11, 0xd4, 0x9b, 0xc0, 0xf9, 0xbe, - 0xdf, 0x97, 0x93, 0x73, 0x02, 0xf7, 0x45, 0x8d, 0x9f, 0x5c, 0x6a, 0xab, 0xac, 0x92, 0x2d, 0xd7, - 0x28, 0x64, 0x7a, 0x90, 0xa6, 0x55, 0xa8, 0x53, 0xa5, 0x0b, 0x8c, 0x77, 0x06, 0x2d, 0xb2, 0xd3, - 0x0e, 0x8b, 0x3d, 0x76, 0xf7, 0x35, 0x80, 0xf9, 0x0b, 0x0a, 0xf9, 0xe6, 0xc8, 0x8d, 0x2e, 0x90, - 0x2d, 0x60, 0xd4, 0xca, 0xe6, 0x20, 0x4d, 0x18, 0x2c, 0x83, 0x68, 0x9a, 0xf4, 0x55, 0xa7, 0xe7, - 0xd8, 0x34, 0xca, 0x86, 0x03, 0xa7, 0xbb, 0x8a, 0x5d, 0xc1, 0xa4, 0xdd, 0xa1, 0xd9, 0xa6, 0x4a, - 0x84, 0x47, 0xcb, 0x20, 0x9a, 0x25, 0x63, 0xaa, 0x37, 0x82, 0x3d, 0xc0, 0x19, 0xb5, 0xcd, 0xb1, - 0xf6, 0x8f, 0x09, 0x87, 0xcb, 0x20, 0x1a, 0x26, 0x73, 0xaf, 0xf7, 0x9d, 0xd9, 0x13, 0x5c, 0xba, - 0x5b, 0x0c, 0xa2, 0x4d, 0xb3, 0x1a, 0xf3, 0x6d, 0x5a, 0x49, 0x55, 0x56, 0x36, 0x3c, 0xa6, 0xc4, - 0x05, 0xd9, 0x09, 0xa2, 0x5d, 0x77, 0xe6, 0x33, 0x79, 0x6c, 0x05, 0x0b, 0x1a, 0xf5, 0x7f, 0x6a, - 0x44, 0xa9, 0xf3, 0xce, 0xfd, 0x1b, 0xba, 0x85, 0x59, 0x6b, 0x3f, 0x8c, 0xf5, 0xe8, 0x98, 0xd0, - 0x13, 0xd2, 0x7a, 0xe4, 0x06, 0x40, 0x6a, 0xe1, 0x81, 0x09, 0x01, 0x53, 0xa9, 0x85, 0xb3, 0xd7, - 0xaf, 0x70, 0x8d, 0xa6, 0x8c, 0x51, 0xd3, 0x3a, 0x69, 0x96, 0x6c, 0x5f, 0xfc, 0xec, 0xf5, 0xfd, - 0xb1, 0x54, 0xb6, 0xda, 0x67, 0x71, 0x8e, 0x0d, 0x77, 0x10, 0xa7, 0xc3, 0x93, 0xbc, 0x44, 0xfe, - 0xeb, 0xc3, 0xb2, 0x11, 0x59, 0xab, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xe9, 0x03, 0x44, - 0xc8, 0x01, 0x00, 0x00, + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x4f, 0x4b, 0x03, 0x31, + 0x10, 0xc5, 0xd9, 0x5a, 0xdb, 0x1a, 0x94, 0x4a, 0x94, 0x1a, 0xff, 0x41, 0x11, 0x84, 0x7a, 0xd9, + 0x08, 0xc5, 0xa3, 0x07, 0x0b, 0x82, 0xbd, 0x88, 0xac, 0xe0, 0xc1, 0x4b, 0x70, 0x37, 0xd9,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0x76, 0x7c, 0xaf, 0x2d, 0x4d, 0xc4, 0x23, 0xb9, 0xdc, 0x89, 0x50, + 0x46, 0x86, 0x80, 0x01, 0x06, 0xb0, 0x56, 0xc0, 0xb3, 0x91, 0x1e, 0x9f, 0xbd, 0x91, 0x2b, 0xb0, + 0x45, 0x0c, 0x06, 0xcf, 0x81, 0xb6, 0x74, 0x93, 0xff, 0xdd, 0xe5, 0xf3, 0xbe, 0xd0, 0x6e, 0xb1, + 0x49, 0xe3, 0x0c, 0x4a, 0xee, 0x4d, 0x1c, 0x9f, 0xe0, 0xe4, 0x05, 0xf0, 0x7f, 0x07, 0x4f, 0x7b, + 0x28, 0x4d, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x1d, 0x5b, 0x26, 0x08, 0x02, 0x00, 0x00, } From 6ed311fd79893239350e26549da5353b53d33ab8 Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Tue, 6 Aug 2024 12:35:37 +0300 Subject: [PATCH 4/7] Updated naming for openapi --- openapi/access.yaml | 8 ++++---- openapi/go-client-generated/api/swagger.yaml | 12 ++++++------ openapi/go-client-generated/docs/NodeVersionInfo.md | 4 ++-- .../go-client-generated/model_node_version_info.go | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/openapi/access.yaml b/openapi/access.yaml index 3d920fc11..61872e2e1 100644 --- a/openapi/access.yaml +++ b/openapi/access.yaml @@ -1202,8 +1202,8 @@ components: - protocol_version - spork_root_block_height - node_root_block_height - - start_height - - end_height + - protocol_version_start_height + - protocol_version_end_height properties: semver: type: string @@ -1220,10 +1220,10 @@ components: node_root_block_height: type: string format: uint64 - start_height: + protocol_version_start_height: type: string format: uint64 - end_height: + protocol_version_end_height: type: string format: uint64 SubscribeEvents: diff --git a/openapi/go-client-generated/api/swagger.yaml b/openapi/go-client-generated/api/swagger.yaml index aa913fc0b..43d422544 100644 --- a/openapi/go-client-generated/api/swagger.yaml +++ b/openapi/go-client-generated/api/swagger.yaml @@ -2073,13 +2073,13 @@ components: NodeVersionInfo: required: - commit - - end_height - node_root_block_height - protocol_version + - protocol_version_end_height + - protocol_version_start_height - semver - spork_id - spork_root_block_height - - start_height type: object properties: semver: @@ -2097,19 +2097,19 @@ components: node_root_block_height: type: string format: uint64 - start_height: + protocol_version_start_height: type: string format: uint64 - end_height: + protocol_version_end_height: type: string format: uint64 example: protocol_version: protocol_version - end_height: end_height semver: semver commit: commit - start_height: start_height + protocol_version_start_height: protocol_version_start_height node_root_block_height: node_root_block_height + protocol_version_end_height: protocol_version_end_height spork_id: spork_id spork_root_block_height: spork_root_block_height SubscribeEvents: diff --git a/openapi/go-client-generated/docs/NodeVersionInfo.md b/openapi/go-client-generated/docs/NodeVersionInfo.md index 1e4487e3c..0cfe59df2 100644 --- a/openapi/go-client-generated/docs/NodeVersionInfo.md +++ b/openapi/go-client-generated/docs/NodeVersionInfo.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **ProtocolVersion** | **string** | | [default to null] **SporkRootBlockHeight** | **string** | | [default to null] **NodeRootBlockHeight** | **string** | | [default to null] -**StartHeight** | **string** | | [default to null] -**EndHeight** | **string** | | [default to null] +**ProtocolVersionStartHeight** | **string** | | [default to null] +**ProtocolVersionEndHeight** | **string** | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/go-client-generated/model_node_version_info.go b/openapi/go-client-generated/model_node_version_info.go index 9b29d3161..b8edb0310 100644 --- a/openapi/go-client-generated/model_node_version_info.go +++ b/openapi/go-client-generated/model_node_version_info.go @@ -15,6 +15,6 @@ type NodeVersionInfo struct { ProtocolVersion string `json:"protocol_version"` SporkRootBlockHeight string `json:"spork_root_block_height"` NodeRootBlockHeight string `json:"node_root_block_height"` - StartHeight string `json:"start_height"` - EndHeight string `json:"end_height"` + ProtocolVersionStartHeight string `json:"protocol_version_start_height"` + ProtocolVersionEndHeight string `json:"protocol_version_end_height"` } From 832a677c3ec54be32c67346bafc6c758b128c597 Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Fri, 9 Aug 2024 14:36:43 +0300 Subject: [PATCH 5/7] Updated according to comments --- openapi/access.yaml | 22 +++++++++----- openapi/go-client-generated/README.md | 1 + openapi/go-client-generated/api/swagger.yaml | 30 ++++++++++++------- .../docs/CompatibleRange.md | 10 +++++++ .../docs/NodeVersionInfo.md | 3 +- .../model_compatible_range.go | 15 ++++++++++ .../model_node_version_info.go | 3 +- 7 files changed, 62 insertions(+), 22 deletions(-) create mode 100644 openapi/go-client-generated/docs/CompatibleRange.md create mode 100644 openapi/go-client-generated/model_compatible_range.go diff --git a/openapi/access.yaml b/openapi/access.yaml index 61872e2e1..92d084540 100644 --- a/openapi/access.yaml +++ b/openapi/access.yaml @@ -1193,6 +1193,17 @@ components: properties: chain_id: type: string + CompatibleRange: + type: object + description: A compatible version range. + required: + - start_height + - end_height + properties: + start_height: + type: string + end_height: + type: string NodeVersionInfo: type: object required: @@ -1202,8 +1213,7 @@ components: - protocol_version - spork_root_block_height - node_root_block_height - - protocol_version_start_height - - protocol_version_end_height + - execution_version_range properties: semver: type: string @@ -1220,12 +1230,8 @@ components: node_root_block_height: type: string format: uint64 - protocol_version_start_height: - type: string - format: uint64 - protocol_version_end_height: - type: string - format: uint64 + execution_version_range: + $ref: '#/components/schemas/CompatibleRange' SubscribeEvents: type: object properties: diff --git a/openapi/go-client-generated/README.md b/openapi/go-client-generated/README.md index 101ebd46a..e2bbbf779 100644 --- a/openapi/go-client-generated/README.md +++ b/openapi/go-client-generated/README.md @@ -55,6 +55,7 @@ Class | Method | HTTP request | Description - [Collection](docs/Collection.md) - [CollectionExpandable](docs/CollectionExpandable.md) - [CollectionGuarantee](docs/CollectionGuarantee.md) + - [CompatibleRange](docs/CompatibleRange.md) - [Event](docs/Event.md) - [ExecutionResult](docs/ExecutionResult.md) - [HashingAlgorithm](docs/HashingAlgorithm.md) diff --git a/openapi/go-client-generated/api/swagger.yaml b/openapi/go-client-generated/api/swagger.yaml index 43d422544..6465fd59d 100644 --- a/openapi/go-client-generated/api/swagger.yaml +++ b/openapi/go-client-generated/api/swagger.yaml @@ -2070,13 +2070,26 @@ components: type: string example: chain_id: chain_id + CompatibleRange: + required: + - end_height + - start_height + type: object + properties: + start_height: + type: string + end_height: + type: string + description: A compatible version range. + example: + end_height: end_height + start_height: start_height NodeVersionInfo: required: - commit + - execution_version_range - node_root_block_height - protocol_version - - protocol_version_end_height - - protocol_version_start_height - semver - spork_id - spork_root_block_height @@ -2097,19 +2110,16 @@ components: node_root_block_height: type: string format: uint64 - protocol_version_start_height: - type: string - format: uint64 - protocol_version_end_height: - type: string - format: uint64 + execution_version_range: + $ref: '#/components/schemas/CompatibleRange' example: protocol_version: protocol_version + execution_version_range: + end_height: end_height + start_height: start_height semver: semver commit: commit - protocol_version_start_height: protocol_version_start_height node_root_block_height: node_root_block_height - protocol_version_end_height: protocol_version_end_height spork_id: spork_id spork_root_block_height: spork_root_block_height SubscribeEvents: diff --git a/openapi/go-client-generated/docs/CompatibleRange.md b/openapi/go-client-generated/docs/CompatibleRange.md new file mode 100644 index 000000000..3c5b2f7a2 --- /dev/null +++ b/openapi/go-client-generated/docs/CompatibleRange.md @@ -0,0 +1,10 @@ +# CompatibleRange + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StartHeight** | **string** | | [default to null] +**EndHeight** | **string** | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/go-client-generated/docs/NodeVersionInfo.md b/openapi/go-client-generated/docs/NodeVersionInfo.md index 0cfe59df2..52643b8bf 100644 --- a/openapi/go-client-generated/docs/NodeVersionInfo.md +++ b/openapi/go-client-generated/docs/NodeVersionInfo.md @@ -9,8 +9,7 @@ Name | Type | Description | Notes **ProtocolVersion** | **string** | | [default to null] **SporkRootBlockHeight** | **string** | | [default to null] **NodeRootBlockHeight** | **string** | | [default to null] -**ProtocolVersionStartHeight** | **string** | | [default to null] -**ProtocolVersionEndHeight** | **string** | | [default to null] +**ExecutionVersionRange** | [***CompatibleRange**](CompatibleRange.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/go-client-generated/model_compatible_range.go b/openapi/go-client-generated/model_compatible_range.go new file mode 100644 index 000000000..0d7af94b5 --- /dev/null +++ b/openapi/go-client-generated/model_compatible_range.go @@ -0,0 +1,15 @@ +/* + * Access API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +// A compatible version range. +type CompatibleRange struct { + StartHeight string `json:"start_height"` + EndHeight string `json:"end_height"` +} diff --git a/openapi/go-client-generated/model_node_version_info.go b/openapi/go-client-generated/model_node_version_info.go index b8edb0310..6dc96b95f 100644 --- a/openapi/go-client-generated/model_node_version_info.go +++ b/openapi/go-client-generated/model_node_version_info.go @@ -15,6 +15,5 @@ type NodeVersionInfo struct { ProtocolVersion string `json:"protocol_version"` SporkRootBlockHeight string `json:"spork_root_block_height"` NodeRootBlockHeight string `json:"node_root_block_height"` - ProtocolVersionStartHeight string `json:"protocol_version_start_height"` - ProtocolVersionEndHeight string `json:"protocol_version_end_height"` + ExecutionVersionRange *CompatibleRange `json:"execution_version_range"` } From 7e9b700f1ac56f9db457dfbf8bc98f696541dcec Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Fri, 9 Aug 2024 14:37:45 +0300 Subject: [PATCH 6/7] Updated rpc call according to comment --- .../flow/entities/node_version_info.proto | 13 +- .../go/flow/entities/node_version_info.pb.go | 120 ++++++++++++------ 2 files changed, 91 insertions(+), 42 deletions(-) diff --git a/protobuf/flow/entities/node_version_info.proto b/protobuf/flow/entities/node_version_info.proto index c704a1d33..f8c57fd70 100644 --- a/protobuf/flow/entities/node_version_info.proto +++ b/protobuf/flow/entities/node_version_info.proto @@ -5,6 +5,13 @@ package flow.entities; option go_package = "github.com/onflow/flow/protobuf/go/flow/entities"; option java_package = "org.onflow.protobuf.entities"; +message CompatibleRange { + // The first block that the version supports. + uint64 start_height = 1; + // The last block that the version supports. + uint64 end_height = 2; +} + message NodeVersionInfo { // The currently running node software version. string semver = 1; @@ -21,8 +28,6 @@ message NodeVersionInfo { // If the node started after the beginning of the spork, it is the height of the first sealed block // indexed. uint64 node_root_block_height = 6; - // The first block that the node's version supports. - uint64 protocol_version_start_height = 7; - // The last block the node's version supports. - uint64 protocol_version_end_height = 8; + // The compatible execution version range. + CompatibleRange execution_version_range = 7; } diff --git a/protobuf/go/flow/entities/node_version_info.pb.go b/protobuf/go/flow/entities/node_version_info.pb.go index 08b9609c3..b57f1599a 100644 --- a/protobuf/go/flow/entities/node_version_info.pb.go +++ b/protobuf/go/flow/entities/node_version_info.pb.go @@ -20,6 +20,55 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +type CompatibleRange struct { + // The first block that the version supports. + StartHeight uint64 `protobuf:"varint,1,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` + // The last block that the version supports. + EndHeight uint64 `protobuf:"varint,2,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CompatibleRange) Reset() { *m = CompatibleRange{} } +func (m *CompatibleRange) String() string { return proto.CompactTextString(m) } +func (*CompatibleRange) ProtoMessage() {} +func (*CompatibleRange) Descriptor() ([]byte, []int) { + return fileDescriptor_ff9e447351cb4a8a, []int{0} +} + +func (m *CompatibleRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CompatibleRange.Unmarshal(m, b) +} +func (m *CompatibleRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CompatibleRange.Marshal(b, m, deterministic) +} +func (m *CompatibleRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_CompatibleRange.Merge(m, src) +} +func (m *CompatibleRange) XXX_Size() int { + return xxx_messageInfo_CompatibleRange.Size(m) +} +func (m *CompatibleRange) XXX_DiscardUnknown() { + xxx_messageInfo_CompatibleRange.DiscardUnknown(m) +} + +var xxx_messageInfo_CompatibleRange proto.InternalMessageInfo + +func (m *CompatibleRange) GetStartHeight() uint64 { + if m != nil { + return m.StartHeight + } + return 0 +} + +func (m *CompatibleRange) GetEndHeight() uint64 { + if m != nil { + return m.EndHeight + } + return 0 +} + type NodeVersionInfo struct { // The currently running node software version. Semver string `protobuf:"bytes,1,opt,name=semver,proto3" json:"semver,omitempty"` @@ -36,20 +85,18 @@ type NodeVersionInfo struct { // If the node started after the beginning of the spork, it is the height of the first sealed block // indexed. NodeRootBlockHeight uint64 `protobuf:"varint,6,opt,name=node_root_block_height,json=nodeRootBlockHeight,proto3" json:"node_root_block_height,omitempty"` - // The first block that the node's version supports. - ProtocolVersionStartHeight uint64 `protobuf:"varint,7,opt,name=protocol_version_start_height,json=protocolVersionStartHeight,proto3" json:"protocol_version_start_height,omitempty"` - // The last block the node's version supports. - ProtocolVersionEndHeight uint64 `protobuf:"varint,8,opt,name=protocol_version_end_height,json=protocolVersionEndHeight,proto3" json:"protocol_version_end_height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // The compatible execution version range. + ExecutionVersionRange *CompatibleRange `protobuf:"bytes,7,opt,name=execution_version_range,json=executionVersionRange,proto3" json:"execution_version_range,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *NodeVersionInfo) Reset() { *m = NodeVersionInfo{} } func (m *NodeVersionInfo) String() string { return proto.CompactTextString(m) } func (*NodeVersionInfo) ProtoMessage() {} func (*NodeVersionInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ff9e447351cb4a8a, []int{0} + return fileDescriptor_ff9e447351cb4a8a, []int{1} } func (m *NodeVersionInfo) XXX_Unmarshal(b []byte) error { @@ -112,21 +159,15 @@ func (m *NodeVersionInfo) GetNodeRootBlockHeight() uint64 { return 0 } -func (m *NodeVersionInfo) GetProtocolVersionStartHeight() uint64 { +func (m *NodeVersionInfo) GetExecutionVersionRange() *CompatibleRange { if m != nil { - return m.ProtocolVersionStartHeight + return m.ExecutionVersionRange } - return 0 -} - -func (m *NodeVersionInfo) GetProtocolVersionEndHeight() uint64 { - if m != nil { - return m.ProtocolVersionEndHeight - } - return 0 + return nil } func init() { + proto.RegisterType((*CompatibleRange)(nil), "flow.entities.CompatibleRange") proto.RegisterType((*NodeVersionInfo)(nil), "flow.entities.NodeVersionInfo") } @@ -135,24 +176,27 @@ func init() { } var fileDescriptor_ff9e447351cb4a8a = []byte{ - // 304 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x4f, 0x4b, 0x03, 0x31, - 0x10, 0xc5, 0xd9, 0x5a, 0xdb, 0x1a, 0x94, 0x4a, 0x94, 0x1a, 0xff, 0x41, 0x11, 0x84, 0x7a, 0xd9, - 0x08, 0xc5, 0xa3, 0x07, 0x0b, 0x82, 0xbd, 0x88, 0xac, 0xe0, 0xc1, 0x4b, 0x70, 0x37, 0xd9, 0x6d, - 0x68, 0x37, 0x53, 0xb2, 0x69, 0xfd, 0xe4, 0xde, 0x65, 0x27, 0x1b, 0xc1, 0xed, 0x25, 0x30, 0xf3, - 0xde, 0xef, 0xcd, 0x84, 0x21, 0xb7, 0xf9, 0x0a, 0xbe, 0xb9, 0x32, 0x4e, 0x3b, 0xad, 0x2a, 0x6e, - 0x40, 0x2a, 0xb1, 0x55, 0xb6, 0xd2, 0x60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 0xd0, 0x6e, 0xb1, - 0x49, 0xe3, 0x0c, 0x4a, 0xee, 0x4d, 0x1c, 0x9f, 0xe0, 0xe4, 0x05, 0xf0, 0x7f, 0x07, 0x4f, 0x7b, - 0x28, 0x4d, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x1d, 0x5b, 0x26, 0x08, 0x02, 0x00, 0x00, + // 341 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0xcf, 0x4e, 0xfa, 0x40, + 0x10, 0x4e, 0xf9, 0xf1, 0x03, 0x59, 0x30, 0x98, 0x55, 0xa1, 0x26, 0x6a, 0x90, 0xc4, 0x04, 0x2f, + 0xad, 0x91, 0xf8, 0x02, 0x78, 0x91, 0x8b, 0x31, 0x6b, 0xc2, 0xc1, 0x4b, 0x43, 0xdb, 0x69, 0xd9, + 0xd0, 0xee, 0x90, 0xed, 0x82, 0xbe, 0xa3, 0x2f, 0x65, 0x3a, 0xed, 0x92, 0x80, 0x97, 0x26, 0xf3, + 0xfd, 0x99, 0x9d, 0xef, 0x4b, 0xd9, 0x7d, 0x92, 0xe1, 0x97, 0x0f, 0xca, 0x48, 0x23, 0xa1, 0xf0, + 0x15, 0xc6, 0x10, 0xec, 0x40, 0x17, 0x12, 0x55, 0x20, 0x55, 0x82, 0xde, 0x46, 0xa3, 0x41, 0x7e, + 0x5a, 0xca, 0x3c, 0x2b, 0x1b, 0x7f, 0xb0, 0xfe, 0x0b, 0xe6, 0x9b, 0xa5, 0x91, 0x61, 0x06, 0x62, + 0xa9, 0x52, 0xe0, 0x77, 0xac, 0x57, 0x98, 0xa5, 0x36, 0xc1, 0x0a, 0x64, 0xba, 0x32, 0xae, 0x33, + 0x72, 0x26, 0x4d, 0xd1, 0x25, 0xec, 0x95, 0x20, 0x7e, 0xc3, 0x18, 0xa8, 0xd8, 0x0a, 0x1a, 0x24, + 0xe8, 0x80, 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d3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x25, 0xf3, + 0xba, 0x33, 0x02, 0x00, 0x00, } From 72fdc9e2dcffb3af6c4444c102e50df6220afc47 Mon Sep 17 00:00:00 2001 From: UlyanaAndrukhiv Date: Mon, 12 Aug 2024 13:59:51 +0300 Subject: [PATCH 7/7] Renamed according to comment --- openapi/access.yaml | 3 +- openapi/go-client-generated/api/swagger.yaml | 7 +-- .../docs/NodeVersionInfo.md | 2 +- .../model_node_version_info.go | 2 +- .../flow/entities/node_version_info.proto | 4 +- .../go/flow/entities/node_version_info.pb.go | 59 +++++++++---------- 6 files changed, 37 insertions(+), 40 deletions(-) diff --git a/openapi/access.yaml b/openapi/access.yaml index 92d084540..441fbaae4 100644 --- a/openapi/access.yaml +++ b/openapi/access.yaml @@ -1213,7 +1213,6 @@ components: - protocol_version - spork_root_block_height - node_root_block_height - - execution_version_range properties: semver: type: string @@ -1230,7 +1229,7 @@ components: node_root_block_height: type: string format: uint64 - execution_version_range: + compatible_range: $ref: '#/components/schemas/CompatibleRange' SubscribeEvents: type: object diff --git a/openapi/go-client-generated/api/swagger.yaml b/openapi/go-client-generated/api/swagger.yaml index 6465fd59d..3f4abf614 100644 --- a/openapi/go-client-generated/api/swagger.yaml +++ b/openapi/go-client-generated/api/swagger.yaml @@ -2087,7 +2087,6 @@ components: NodeVersionInfo: required: - commit - - execution_version_range - node_root_block_height - protocol_version - semver @@ -2110,14 +2109,14 @@ components: node_root_block_height: type: string format: uint64 - execution_version_range: + compatible_range: $ref: '#/components/schemas/CompatibleRange' example: protocol_version: protocol_version - execution_version_range: + semver: semver + compatible_range: end_height: end_height start_height: start_height - semver: semver commit: commit node_root_block_height: node_root_block_height spork_id: spork_id diff --git a/openapi/go-client-generated/docs/NodeVersionInfo.md b/openapi/go-client-generated/docs/NodeVersionInfo.md index 52643b8bf..4a06efc68 100644 --- a/openapi/go-client-generated/docs/NodeVersionInfo.md +++ b/openapi/go-client-generated/docs/NodeVersionInfo.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **ProtocolVersion** | **string** | | [default to null] **SporkRootBlockHeight** | **string** | | [default to null] **NodeRootBlockHeight** | **string** | | [default to null] -**ExecutionVersionRange** | [***CompatibleRange**](CompatibleRange.md) | | [default to null] +**CompatibleRange** | [***CompatibleRange**](CompatibleRange.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/go-client-generated/model_node_version_info.go b/openapi/go-client-generated/model_node_version_info.go index 6dc96b95f..3e550a191 100644 --- a/openapi/go-client-generated/model_node_version_info.go +++ b/openapi/go-client-generated/model_node_version_info.go @@ -15,5 +15,5 @@ type NodeVersionInfo struct { ProtocolVersion string `json:"protocol_version"` SporkRootBlockHeight string `json:"spork_root_block_height"` NodeRootBlockHeight string `json:"node_root_block_height"` - ExecutionVersionRange *CompatibleRange `json:"execution_version_range"` + CompatibleRange *CompatibleRange `json:"compatible_range,omitempty"` } diff --git a/protobuf/flow/entities/node_version_info.proto b/protobuf/flow/entities/node_version_info.proto index f8c57fd70..90c8edd89 100644 --- a/protobuf/flow/entities/node_version_info.proto +++ b/protobuf/flow/entities/node_version_info.proto @@ -28,6 +28,6 @@ message NodeVersionInfo { // If the node started after the beginning of the spork, it is the height of the first sealed block // indexed. uint64 node_root_block_height = 6; - // The compatible execution version range. - CompatibleRange execution_version_range = 7; + // The compatible version range. + CompatibleRange compatible_range = 7; } diff --git a/protobuf/go/flow/entities/node_version_info.pb.go b/protobuf/go/flow/entities/node_version_info.pb.go index b57f1599a..d50ecfa9f 100644 --- a/protobuf/go/flow/entities/node_version_info.pb.go +++ b/protobuf/go/flow/entities/node_version_info.pb.go @@ -85,11 +85,11 @@ type NodeVersionInfo struct { // If the node started after the beginning of the spork, it is the height of the first sealed block // indexed. NodeRootBlockHeight uint64 `protobuf:"varint,6,opt,name=node_root_block_height,json=nodeRootBlockHeight,proto3" json:"node_root_block_height,omitempty"` - // The compatible execution version range. - ExecutionVersionRange *CompatibleRange `protobuf:"bytes,7,opt,name=execution_version_range,json=executionVersionRange,proto3" json:"execution_version_range,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // The compatible version range. + CompatibleRange *CompatibleRange `protobuf:"bytes,7,opt,name=compatible_range,json=compatibleRange,proto3" json:"compatible_range,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *NodeVersionInfo) Reset() { *m = NodeVersionInfo{} } @@ -159,9 +159,9 @@ func (m *NodeVersionInfo) GetNodeRootBlockHeight() uint64 { return 0 } -func (m *NodeVersionInfo) GetExecutionVersionRange() *CompatibleRange { +func (m *NodeVersionInfo) GetCompatibleRange() *CompatibleRange { if m != nil { - return m.ExecutionVersionRange + return m.CompatibleRange } return nil } @@ -176,27 +176,26 @@ func init() { } var fileDescriptor_ff9e447351cb4a8a = []byte{ - // 341 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0xcf, 0x4e, 0xfa, 0x40, - 0x10, 0x4e, 0xf9, 0xf1, 0x03, 0x59, 0x30, 0x98, 0x55, 0xa1, 0x26, 0x6a, 0x90, 0xc4, 0x04, 0x2f, - 0xad, 0x91, 0xf8, 0x02, 0x78, 0x91, 0x8b, 0x31, 0x6b, 0xc2, 0xc1, 0x4b, 0x43, 0xdb, 0x69, 0xd9, - 0xd0, 0xee, 0x90, 0xed, 0x82, 0xbe, 0xa3, 0x2f, 0x65, 0x3a, 0xed, 0x92, 0x80, 0x97, 0x26, 0xf3, - 0xfd, 0x99, 0x9d, 0xef, 0x4b, 0xd9, 0x7d, 0x92, 0xe1, 0x97, 0x0f, 0xca, 0x48, 0x23, 0xa1, 0xf0, - 0x15, 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 0xaf, 0xcb, 0x4a, 0xdd, 0xf6, 0xc8, 0x99, - 0x74, 0x9f, 0x6e, 0xbd, 0x83, 0xee, 0xbd, 0xa3, 0xe2, 0xc5, 0xe5, 0xde, 0x5e, 0x9f, 0x4f, 0xf0, - 0xec, 0x9d, 0x5d, 0xa3, 0x4e, 0x3d, 0x54, 0xe4, 0xa6, 0x84, 0xe1, 0x36, 0xd9, 0xaf, 0xf9, 0x7c, - 0x4c, 0xa5, 0x59, 0x6d, 0x43, 0x2f, 0xc2, 0xdc, 0xaf, 0x44, 0x3e, 0x7d, 0xac, 0xd2, 0x4f, 0xd1, - 0x3f, 0xf8, 0x37, 0xc2, 0x16, 0x51, 0xd3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x25, 0xf3, - 0xba, 0x33, 0x02, 0x00, 0x00, + // 331 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0xcd, 0x4a, 0xc3, 0x40, + 0x10, 0x26, 0xb5, 0xb6, 0x76, 0x5a, 0x49, 0x59, 0xa5, 0x46, 0x50, 0xa9, 0x05, 0xa1, 0x5e, 0x12, + 0xb1, 0xf8, 0x02, 0xf5, 0x62, 0x2f, 0x22, 0x2b, 0x78, 0xf0, 0x12, 0x9a, 0x64, 0x93, 0x2e, 0x4d, + 0x76, 0xca, 0x66, 0x5b, 0xdf, 0xce, 0x67, 0x93, 0x4c, 0xb2, 0x85, 0xd6, 0x4b, 0x60, 0xbe, 0x9f, + 0xd9, 0xf9, 0x3e, 0x02, 0x0f, 0x69, 0x8e, 0x3f, 0x81, 0x50, 0x46, 0x1a, 0x29, 0xca, 0x40, 0x61, + 0x22, 0xc2, 0x9d, 0xd0, 0xa5, 0x44, 0x15, 0x4a, 0x95, 0xa2, 0xbf, 0xd1, 0x68, 0x90, 0x9d, 0x57, + 0x32, 0xdf, 0xca, 0x26, 0x9f, 0xe0, 0x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