2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-11-29 18:39:27 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
option go_package = "pb";
|
|
|
|
|
|
|
|
package node;
|
|
|
|
|
|
|
|
import "gogo.proto";
|
2019-04-04 17:34:36 +01:00
|
|
|
import "google/protobuf/timestamp.proto";
|
2018-11-29 18:39:27 +00:00
|
|
|
|
2018-12-04 20:18:26 +00:00
|
|
|
// TODO move statdb.Update() stuff out of here
|
2018-11-29 18:39:27 +00:00
|
|
|
// Node represents a node in the overlay network
|
|
|
|
// Node is info for a updating a single storagenode, used in the Update rpc calls
|
|
|
|
message Node {
|
|
|
|
bytes id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
|
|
NodeAddress address = 2;
|
|
|
|
NodeType type = 3;
|
|
|
|
NodeRestrictions restrictions = 4;
|
2018-12-04 20:18:26 +00:00
|
|
|
NodeStats reputation = 5;
|
|
|
|
NodeMetadata metadata = 6;
|
|
|
|
repeated int64 latency_list = 7;
|
|
|
|
bool audit_success = 8;
|
|
|
|
bool is_up = 9;
|
|
|
|
bool update_latency = 10;
|
|
|
|
bool update_audit_success = 11;
|
|
|
|
bool update_uptime = 12;
|
2019-04-10 07:04:24 +01:00
|
|
|
NodeVersion version = 13;
|
2018-11-29 18:39:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NodeType is an enum of possible node types
|
|
|
|
enum NodeType {
|
2019-01-02 18:47:34 +00:00
|
|
|
INVALID = 0;
|
|
|
|
SATELLITE = 1;
|
|
|
|
STORAGE = 2;
|
|
|
|
UPLINK = 3;
|
2019-01-09 15:59:51 +00:00
|
|
|
BOOTSTRAP = 4;
|
2018-11-29 18:39:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NodeAddress contains the information needed to communicate with a node on the network
|
|
|
|
message NodeAddress {
|
|
|
|
NodeTransport transport = 1;
|
|
|
|
string address = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// NodeTransport is an enum of possible transports for the overlay network
|
|
|
|
enum NodeTransport {
|
|
|
|
TCP_TLS_GRPC = 0;
|
|
|
|
}
|
2018-12-03 13:23:12 +00:00
|
|
|
// NodeStats is the reputation characteristics of a node
|
2018-11-29 18:39:27 +00:00
|
|
|
message NodeStats {
|
2019-04-04 17:34:36 +01:00
|
|
|
bytes node_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; // TODO: remove
|
2018-11-29 18:39:27 +00:00
|
|
|
int64 latency_90 = 2; // 90th percentile measure of storagenode latency
|
|
|
|
double audit_success_ratio = 3; // (auditSuccessCount / totalAuditCount)
|
|
|
|
double uptime_ratio = 4; // (uptimeCount / totalUptimeCheckCount)
|
|
|
|
int64 audit_count = 5;
|
|
|
|
int64 audit_success_count = 6;
|
|
|
|
int64 uptime_count = 7;
|
|
|
|
int64 uptime_success_count = 8;
|
2019-04-04 17:34:36 +01:00
|
|
|
google.protobuf.Timestamp last_contact_success = 9;
|
|
|
|
google.protobuf.Timestamp last_contact_failure = 10;
|
2018-11-29 18:39:27 +00:00
|
|
|
}
|
|
|
|
|
2019-02-25 18:41:51 +00:00
|
|
|
// NodeOperator contains info about the storage node operator
|
|
|
|
message NodeOperator {
|
2018-11-29 18:39:27 +00:00
|
|
|
string email = 1;
|
|
|
|
string wallet = 2;
|
|
|
|
}
|
|
|
|
|
2019-02-25 18:41:51 +00:00
|
|
|
// NodeCapacity contains all relevant data about a nodes ability to store data
|
|
|
|
message NodeCapacity {
|
|
|
|
int64 free_bandwidth = 1;
|
|
|
|
int64 free_disk = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: use NodeOperator instead
|
|
|
|
message NodeMetadata {
|
|
|
|
string email = 1;
|
|
|
|
string wallet = 2;
|
|
|
|
}
|
2018-11-29 18:39:27 +00:00
|
|
|
|
2019-02-25 18:41:51 +00:00
|
|
|
// Deprecated: use NodeCapacity instead
|
|
|
|
message NodeRestrictions {
|
|
|
|
int64 free_bandwidth = 1;
|
|
|
|
int64 free_disk = 2;
|
|
|
|
}
|
2019-04-10 07:04:24 +01:00
|
|
|
|
|
|
|
// NodeVersion contains
|
|
|
|
message NodeVersion {
|
|
|
|
string version = 1; // must be semver formatted
|
|
|
|
string commit_hash = 2;
|
|
|
|
google.protobuf.Timestamp timestamp = 3;
|
|
|
|
bool release = 4;
|
|
|
|
}
|