diff --git a/openapi/access.yaml b/openapi/access.yaml index 04a1463e4..441fbaae4 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: @@ -1218,6 +1229,8 @@ components: node_root_block_height: type: string format: uint64 + compatible_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 6759eb841..3f4abf614 100644 --- a/openapi/go-client-generated/api/swagger.yaml +++ b/openapi/go-client-generated/api/swagger.yaml @@ -2070,6 +2070,20 @@ 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 @@ -2095,9 +2109,14 @@ components: node_root_block_height: type: string format: uint64 + compatible_range: + $ref: '#/components/schemas/CompatibleRange' example: protocol_version: protocol_version semver: semver + compatible_range: + end_height: end_height + start_height: start_height commit: commit node_root_block_height: node_root_block_height spork_id: spork_id 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 c46323422..4a06efc68 100644 --- a/openapi/go-client-generated/docs/NodeVersionInfo.md +++ b/openapi/go-client-generated/docs/NodeVersionInfo.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **ProtocolVersion** | **string** | | [default to null] **SporkRootBlockHeight** | **string** | | [default to null] **NodeRootBlockHeight** | **string** | | [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_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 6e20865b9..3e550a191 100644 --- a/openapi/go-client-generated/model_node_version_info.go +++ b/openapi/go-client-generated/model_node_version_info.go @@ -15,4 +15,5 @@ type NodeVersionInfo struct { ProtocolVersion string `json:"protocol_version"` SporkRootBlockHeight string `json:"spork_root_block_height"` NodeRootBlockHeight string `json:"node_root_block_height"` + 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 a61378d4e..90c8edd89 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,4 +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 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 a998c3bf7..d50ecfa9f 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"` @@ -35,17 +84,19 @@ 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NodeRootBlockHeight uint64 `protobuf:"varint,6,opt,name=node_root_block_height,json=nodeRootBlockHeight,proto3" json:"node_root_block_height,omitempty"` + // 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{} } 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 { @@ -108,7 +159,15 @@ func (m *NodeVersionInfo) GetNodeRootBlockHeight() uint64 { return 0 } +func (m *NodeVersionInfo) GetCompatibleRange() *CompatibleRange { + if m != nil { + return m.CompatibleRange + } + return nil +} + func init() { + proto.RegisterType((*CompatibleRange)(nil), "flow.entities.CompatibleRange") proto.RegisterType((*NodeVersionInfo)(nil), "flow.entities.NodeVersionInfo") } @@ -117,22 +176,26 @@ 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, + // 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, 0xf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