Skip to content

Commit

Permalink
1.0.0-alpha.1 release (#3)
Browse files Browse the repository at this point in the history
- updated protos
- updated README.md
  • Loading branch information
bossqone authored Jul 28, 2023
1 parent 0b10e69 commit 57ca7ab
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 6 deletions.
11 changes: 7 additions & 4 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-alpha.1 (latest) | 23.03.3 |
| 1.0.0-alpha | 23.03 |

### Overview

Expand Down Expand Up @@ -186,7 +187,9 @@ Contains miner actions related protobuf messages and **ActionsService** with var
* **Reboot** - method to reboot whole miner.

#### 2. proto/bos/v1/authentication.proto
Contains **AuthenticationService** with **login** method to log in and get auth. token.
Contains authentication related messages and **AuthenticationService** with various methods:
* **Login** - method to log in and get auth. token,
* **SetPassword** - method to set new password.

#### 3. proto/bos/v1/common.proto
Contains **SaveAction** enumeration used for setting configuration. Options:
Expand Down
19 changes: 19 additions & 0 deletions proto/bos/v1/actions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ message ResumeMiningResponse {
bool already_mining = 1;
}

// Request message to enable/disable locate device
message SetLocateDeviceStatusRequest {
bool enable = 1;
}

// Response with locate device status
message LocateDeviceStatusResponse {
bool enabled = 1;
}

// Request for locate device status action.
message GetLocateDeviceStatusRequest {}

service ActionsService {
// Method to start bosminer
rpc Start(StartRequest) returns (StartResponse);
Expand All @@ -93,4 +106,10 @@ service ActionsService {

// Method to reboot whole miner
rpc Reboot(RebootRequest) returns (RebootResponse);

// Method to enable/disable locate device mode
rpc SetLocateDeviceStatus(SetLocateDeviceStatusRequest) returns (LocateDeviceStatusResponse);

// Method to retrieve the locate device mode status
rpc GetLocateDeviceStatus(GetLocateDeviceStatusRequest) returns (LocateDeviceStatusResponse);
}
13 changes: 13 additions & 0 deletions proto/bos/v1/authentication.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,26 @@ syntax = "proto3";

package braiins.bos.v1;

// Request for login action.
message LoginRequest {
string username = 1;
string password = 2;
}

// Response for login action.
message LoginResponse {}

// Request for set password action.
message SetPasswordRequest {
optional string password = 1;
}

// Response for set password action.
message SetPasswordResponse {}

service AuthenticationService {
// Method to login and retrieve authentication token
rpc Login(LoginRequest) returns (LoginResponse);
// Method to set password
rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse);
}
1 change: 0 additions & 1 deletion proto/bos/v1/cooling.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// Copyright (C) 2023 Braiins Systems s.r.o.
//
// This file is part of Braiins Open-Source Initiative (BOSI).
Expand Down
24 changes: 24 additions & 0 deletions proto/bos/v1/miner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ message GetMinerDetailsResponse {
string mac_address = 7;
// System uptime
uint64 system_uptime = 8;
// Miner hashrate declared by manufacturer
braiins.bos.v1.GigaHashrate sticker_hashrate = 9;
}

message GetMinerStatsRequest {}
Expand Down Expand Up @@ -140,6 +142,25 @@ message Hashboard {
braiins.bos.v1.WorkSolverStats stats = 7;
}

// Enumeration for support archive format
enum SupportArchiveFormat {
SUPPORT_ARCHIVE_FORMAT_UNSPECIFIED = 0;
// Compressed zip format
SUPPORT_ARCHIVE_FORMAT_ZIP = 1;
// BOS custom format
SUPPORT_ARCHIVE_FORMAT_BOS = 2;
}

message GetSupportArchiveRequest {
// Support archive format.
SupportArchiveFormat format = 1;
}

message GetSupportArchiveResponse {
// Support archive data
bytes chunk_data = 1;
}

message GetHashboardsRequest {}

message GetHashboardsResponse {
Expand All @@ -154,4 +175,7 @@ service MinerService {
rpc GetMinerStats(GetMinerStatsRequest) returns (GetMinerStatsResponse);
// Method to get miner hashboards state and statistics.
rpc GetHashboards(GetHashboardsRequest) returns (GetHashboardsResponse);
// Method to download BOS support archive
// Method returns stream of messages with binary chunks that needs to be concatenated on the caller side
rpc GetSupportArchive(GetSupportArchiveRequest) returns (stream GetSupportArchiveResponse);
}
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-alpha.1
message ApiVersion {
uint64 major = 1;
uint64 minor = 2;
Expand Down

0 comments on commit 57ca7ab

Please sign in to comment.