Skip to content

Commit

Permalink
Merge pull request #1496 from The-K-R-O-K/UlyanaAndrukhiv/6248-compat…
Browse files Browse the repository at this point in the history
…ible-range-to-node-version

 [Access] Add compatible range to Node Version Info endpoint
  • Loading branch information
peterargue authored Aug 14, 2024
2 parents fa96374 + 72fdc9e commit 1cba659
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 23 deletions.
13 changes: 13 additions & 0 deletions openapi/access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -1218,6 +1229,8 @@ components:
node_root_block_height:
type: string
format: uint64
compatible_range:
$ref: '#/components/schemas/CompatibleRange'
SubscribeEvents:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions openapi/go-client-generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions openapi/go-client-generated/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions openapi/go-client-generated/docs/CompatibleRange.md
Original file line number Diff line number Diff line change
@@ -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)

1 change: 1 addition & 0 deletions openapi/go-client-generated/docs/NodeVersionInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

15 changes: 15 additions & 0 deletions openapi/go-client-generated/model_compatible_range.go
Original file line number Diff line number Diff line change
@@ -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"`
}
1 change: 1 addition & 0 deletions openapi/go-client-generated/model_node_version_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
9 changes: 9 additions & 0 deletions protobuf/flow/entities/node_version_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
109 changes: 86 additions & 23 deletions protobuf/go/flow/entities/node_version_info.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1cba659

Please sign in to comment.