Skip to content

Commit

Permalink
1.0.0-beta release
Browse files Browse the repository at this point in the history
- update protos
- update README.md
- update CHANGELOG.md
  • Loading branch information
Kamil Triščík committed Aug 10, 2023
1 parent fab36cb commit 994fc51
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [1.0.0-beta] - 2023-05-11
The latest release, version 1.0.0-beta, introduces a significant addition: the all-new BOS+ License feature.

### Added
* Introduction of a new `braiins.bos.v1.LicenseService::GetLicenseState()` streaming method to fetch BOS Licence state.

**Important:** This version remained in a private state for a duration, attributed to the testing phase of the novel licenses approach.

---

## [1.0.0-alpha] - 2023-05-25
The first release for the new Braiins OS+ Public API, which introduces the first batch of features.

Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ This repository contains protocol buffers for the new Braiins OS+ Public API, wh

### Versions

| Public API Version | BOS+ version|
|---------------------|-------------|
| 1.0.0-alpha(latest) |23.03|
| Public API Version | BOS+ version |
|---------------------|--------------|
| 1.0.0-beta (latest) | 23.04 |
| 1.0.0-alpha | 23.03 |

### Overview

Expand Down Expand Up @@ -71,6 +72,7 @@ braiins.bos.v1.ActionsService
braiins.bos.v1.AuthenticationService
braiins.bos.v1.ConfigurationService
braiins.bos.v1.CoolingService
braiins.bos.v1.LicenseService
braiins.bos.v1.MinerService
braiins.bos.v1.PoolService
braiins.bos.v1.TunerService
Expand Down Expand Up @@ -172,7 +174,7 @@ $ grpcurl -plaintext miner:50051 braiins.bos.ApiVersionService/GetApiVersion
"pre": "alpha"
}
```
Note: this is actually `1.0.0-alpha`. `0` as default value was dropped during serialization.
**Note**: Version `1.0.0-<ver>` is actually `1.0.0-<ver>.0`. `0` as default value was dropped during serialization.


### Proto files
Expand Down Expand Up @@ -207,32 +209,36 @@ Contains cooling related messages and **CoolingService** with various methods to
* **GetCoolingState** - method to read current temperature measurements and fans states,
* **SetImmersionMode** - method to set/toggle immersion mode.

#### 7. proto/bos/v1/miner.proto
#### 7. proto/bos/v1/license.proto
Contains license related messages and **LicenseService** with method to read license state:
* **GetLicenseState** - method to read current license state.

#### 8. proto/bos/v1/miner.proto
Contains miner related messages and **MinerService** with various methods to read info about miner:
* **GetMinerDetails** - method to read miner details info like model, IP, uptime, etc.,
* **GetMinerStats** - method to read aggregated miner stats,
* **GetHashboards** - method to read miner hashboards state and statistics.

#### 8. proto/bos/v1/pool.proto
#### 9. proto/bos/v1/pool.proto
Contains pools related messages and **PoolService** with various methods to read or modify pool settings:
* **GetPoolGroups** - method to read current pools state and statistics,
* **UpdatePoolGroup** - method to update default pool group.

#### 9. proto/bos/v1/tuner.proto
#### 10. proto/bos/v1/tuner.proto
Contains tuner related messages and **TunerService** with various methods to read or modify tuner:
* **GetTunerState** - method to read current tuner state and available tuner profiles,
* **SetDefaultPowerTarget** - method to set default power target,
* **SetAbsolutePowerTarget** - method to set specific power target,
* **IncrementPowerTarget** - method to increment currently configured power target by a specific value,
* **DecrementPowerTarget** - method to decrement current configured power target by a specific value.

#### 10. proto/bos/v1/units.proto
#### 11. proto/bos/v1/units.proto
Contains protobuf messages representing various units like Voltage, Frequency, etc.

#### 11. proto/bos/v1/work.proto
#### 12. proto/bos/v1/work.proto
Contains mining work related protobuf messages.

#### 12. proto/bos/version.proto
#### 13. proto/bos/version.proto
Contains **ApiVersionService** service with **GetApiVersion** to be able to read current Public API version available for communication with miner


Expand Down
77 changes: 77 additions & 0 deletions proto/bos/v1/license.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Copyright (C) 2023 Braiins Systems s.r.o.
//
// This file is part of Braiins Open-Source Initiative (BOSI).
//
// BOSI is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
// Please, keep in mind that we may also license BOSI or any part thereof
// under a proprietary license. For more information on the terms and conditions
// of such proprietary license or if you have any other questions, please
// contact us at [email protected].

syntax = "proto3";

package braiins.bos.v1;

import "bos/v1/units.proto";

enum LicenseType {
LICENSE_TYPE_UNSPECIFIED = 0;
LICENSE_TYPE_STANDARD = 1;
LICENSE_TYPE_CUSTOM = 2;
}

message NoneLicense {
// BOS Initialization timeout - number of seconds elapsed since bosminer start
// i.e., number of seconds BOS will start mining in restricted mode burning 15% of hashrate
uint32 time_to_restricted = 1;
}

message LimitedLicense {}

message ValidLicense {
// License type
LicenseType type = 1;
// Contract name
string contract_name = 2;
// Current license expiration - number of seconds since the moment the license was received
// i.e., number of seconds BOS will start mining in restricted mode burning 15% of hashrate
uint32 time_to_restricted = 3;
// Defines how much DevFee should be generated by the device.
bos.v1.BasesPoints dev_fee = 4;
}

message ExpiredLicense {
// License type
LicenseType type = 1;
// Contract name
string contract_name = 2;
// Defines how much DevFee should be generated by the device.
bos.v1.BasesPoints dev_fee = 3;
}

message GetLicenseStateRequest {}

message GetLicenseStateResponse {
oneof state {
NoneLicense none = 1;
LimitedLicense limited = 2;
ValidLicense valid = 3;
ExpiredLicense expired = 4;
}
}

service LicenseService {
rpc GetLicenseState(GetLicenseStateRequest) returns (GetLicenseStateResponse);
}
7 changes: 7 additions & 0 deletions proto/bos/v1/units.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ message Power {
message Temperature {
double degree_c = 1;
}

// Structure representing Basis Points
message BasesPoints {
// A basis point is one hundredth of 1 percentage point.
// For example: 1bps = 0.01%, 250bps = 2.5%
uint32 bsp = 1;
}
2 changes: 1 addition & 1 deletion proto/bos/version.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ package braiins.bos;
// proto3 extensions and proto3 does not allow specifying custom
// default values. Value follows semver format.

// LATEST_API_VERSION=1.0.0-alpha
// LATEST_API_VERSION=1.0.0-beta
message ApiVersion {
uint64 major = 1;
uint64 minor = 2;
Expand Down

0 comments on commit 994fc51

Please sign in to comment.