ceremonyclient/node/protobufs/node.proto
luk 1a1ef542d0
Adding GetNodeInfo (#41)
* proto,rpc_server: added NodeInfo that replaces PeerID and also yields max_frame

* proto,rpc_server: added peer_score and added another source for maxframe

---------

Co-authored-by: 0xluk <luk@luktech.dev>
2024-02-13 01:00:50 -06:00

91 lines
2.4 KiB
Protocol Buffer

syntax = "proto3";
package quilibrium.node.node.pb;
option go_package = "source.quilibrium.com/quilibrium/monorepo/node/protobufs";
import "clock.proto";
message GetFramesRequest {
bytes filter = 1;
uint64 from_frame_number = 2;
uint64 to_frame_number = 3;
bool include_candidates = 4;
}
message GetFrameInfoRequest {
bytes filter = 1;
uint64 frame_number = 2;
bytes selector = 3;
}
message GetPeerInfoRequest {}
message GetNodeInfoRequest {}
message GetNetworkInfoRequest {}
message FramesResponse {
repeated quilibrium.node.clock.pb.ClockFrame truncated_clock_frames = 1;
}
message FrameInfoResponse {
quilibrium.node.clock.pb.ClockFrame clock_frame = 1;
}
message PeerInfo {
bytes peer_id = 1;
repeated string multiaddrs = 2;
uint64 max_frame = 3;
int64 timestamp = 4;
bytes version = 5;
bytes signature = 6;
bytes public_key = 7;
}
message PeerInfoResponse {
repeated PeerInfo peer_info = 1;
repeated PeerInfo uncooperative_peer_info = 2;
}
message NetworkInfo {
bytes peer_id = 1;
repeated string multiaddrs = 2;
double peer_score = 3;
}
message NodeInfoResponse {
string peer_id = 1;
uint64 max_frame = 2;
uint64 peer_score = 3;
}
message NetworkInfoResponse {
repeated NetworkInfo network_info = 1;
}
message GetTokenInfoRequest {}
message TokenInfoResponse {
// Total active token supply, as a 256 bit integer representing maximum
// divisble units. 1 QUIL = 8000000000 units, 50 QUIL would be represented by
// 0x0000000000000000000000000000000000000000000000000000005D21DBA000
bytes confirmed_token_supply = 1;
// Total token supply, including unconfirmed frame data, as a 256 bit integer.
bytes unconfirmed_token_supply = 2;
// The total number of tokens owned by the prover address associated with the
// node.
bytes owned_tokens = 3;
// The total number of tokens owned by the prover address associated with the
// node, including unconfirmed frame data.
bytes unconfirmed_owned_tokens = 4;
}
service NodeService {
rpc GetFrames(GetFramesRequest) returns (FramesResponse);
rpc GetFrameInfo(GetFrameInfoRequest) returns (FrameInfoResponse);
rpc GetPeerInfo(GetPeerInfoRequest) returns (PeerInfoResponse);
rpc GetNodeInfo(GetNodeInfoRequest) returns (NodeInfoResponse);
rpc GetNetworkInfo(GetNetworkInfoRequest) returns (NetworkInfoResponse);
rpc GetTokenInfo(GetTokenInfoRequest) returns (TokenInfoResponse);
}