ceremonyclient/node/protobufs/node.proto

242 lines
7.5 KiB
Protocol Buffer
Raw Normal View History

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;
2023-11-01 03:45:20 +00:00
bytes version = 5;
bytes signature = 6;
bytes public_key = 7;
2024-02-24 08:35:13 +00:00
bytes total_distance = 8;
}
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;
bytes version = 4;
}
2024-02-14 07:11:12 +00:00
message PutPeerInfoRequest {
repeated PeerInfo peer_info = 1;
repeated PeerInfo uncooperative_peer_info = 2;
}
message PutNodeInfoRequest {
string peer_id = 1;
uint64 max_frame = 2;
uint64 peer_score = 3;
bytes signature = 4;
}
message PutResponse {}
message NetworkInfoResponse {
repeated NetworkInfo network_info = 1;
}
2023-10-28 02:23:55 +00:00
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;
2024-01-15 04:32:28 +00:00
// The total number of tokens owned by the prover address associated with the
// node, including unconfirmed frame data.
bytes unconfirmed_owned_tokens = 4;
2023-10-28 02:23:55 +00:00
}
2024-03-01 07:12:31 +00:00
message Capability {
// A general protocol identifier as a uint32 this is expected to rarely
// iterate, and should be uniquely identifying both protocol and version.
// Pragmatically speaking, this implies that the least significant byte
// specifies version (which should iterate most minimally), and the three most
// significant bytes should specify protocol. Recipients SHOULD ignore
// messages with incompatible protocol identifiers, but also SHOULD warn on
// identifiers with versions higher than the supported protocol. A large
// number of unsupported protocol messages may indicate spam/some other
// attack, whereas a large number of unsupported protocol versions may
// indicate an out of date client, respective to which side is the maximum of
// the version number.
uint32 protocol_identifier = 1;
// An optional bundle of information specific to the capability used for
// extensibility in negotiating variations of a protocol e.g. Triple-Ratchet
// but only for certain curve types.
bytes additional_metadata = 2;
}
message SelfTestReport {
// The difficulty the self test was conducted under
uint32 difficulty = 1;
// The resulting local time of computing the VDF test under the difficulty
int64 difficulty_metric = 2;
// The resulting local time of computing a KZG commitment for a 16 degree
// polynomial
int64 commit_16_metric = 3;
// The resulting local time of computing a KZG commitment for a 128 degree
// polynomial
int64 commit_128_metric = 4;
// The resulting local time of computing a KZG commitment for a 1024 degree
// polynomial
int64 commit_1024_metric = 5;
// The resulting local time of computing a KZG commitment for a 65536 degree
// polynomial
int64 commit_65536_metric = 6;
// The resulting local time of computing a KZG proof for a 16 degree
// polynomial
int64 proof_16_metric = 7;
// The resulting local time of computing a KZG proof for a 128 degree
// polynomial
int64 proof_128_metric = 8;
// The resulting local time of computing a KZG proof for a 1024 degree
// polynomial
int64 proof_1024_metric = 9;
// The resulting local time of computing a KZG proof for a 65536 degree
// polynomial
int64 proof_65536_metric = 10;
// The number of reported accessible cores
uint32 cores = 11;
// The total available memory
bytes memory = 12;
// The total available storage
bytes storage = 13;
// The list of supported capabilities
repeated Capability capabilities = 14;
2024-03-08 05:05:04 +00:00
// The highest master frame the node has
uint64 master_head_frame = 15;
v1.4.18 (#193) * Remove bootstrap peer (#189) * Change bootstrap servers to DHT-only peers (#187) * support voucher file-based claims (#183) * Change bootstrap servers to DHT-only peers Changing my bootstrap servers to DHT-only peers with somewhat lower specs. One of the new ones is in the US and the other one is in Switzerland. Both use reliable providers and have 10Gbps network interfaces. --------- Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com> * Don't run self-test in DHT-only mode (#186) * support voucher file-based claims (#183) * Don't run self-test in DHT-only mode The node tries to create a self-test when ran with the `-dht-only` flag, but it doesn't load the KZG ceremony data in DHT-only mode which leads to a crash. Don't run self-test when the `-dht-only` flag is set. I tested by starting a node locally with and without existing self-test and with the `-dht-only` flag. --------- Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com> * Embed json files in binary (#182) * Embed ceremony.json in binary * Embed retroactive_peers.json in binary * Signers build and verification tasks (#181) * add signers specific Taskfile * add verify tasks * move signer task under signer folder * create docker image specific for signers * map current user into docker image and container * ignore node-tmp-* * add verify:build:internal * prevent tasks with docker commands from being run inside a container * rename *:internal to *:container * add README.md * add pem files to git * Updating Q Guide link (#173) * Update README.md Updated link to Quilibrium guide to new website * Update README.md * feat: network switching and namespaced announce strings/bitmasks (#190) * feat: network switching and namespaced announce strings/bitmasks * bump version name and logo * feat: mini pomw proofs as part of peer manifest (#191) * shift default config directory under current folder (#176) * feat: signature check (#192) * feat: signature check * adjust docker command so it doesn't invoke sigcheck * remove old version * add binaries and digests * fix bug, revert build * shasum has weird byte at end * proper binaries and digests * Signatory #13 added * Signatory #3 added * Signer 4 (#194) * Signatory #5 added * Signatory #9 added (#195) * Signatory #1 added * added sig.6 files (#196) * Signatories #8 and #16 added * Signatory #12 added * Add signature (#197) * reset build for v1.4.18 after testnet bug * updated build, resigned by #13 * Signatory #16 added * added sig.6 files (#198) * Signatory #8 added * Signatory #17 added * Signatory #1 added * Signatory #7 added * Signatory #4 added * Signatory #14 added * remove binaries, ready to ship --------- Co-authored-by: littleblackcloud <163544315+littleblackcloud@users.noreply.github.com> Co-authored-by: Agost Biro <5764438+agostbiro@users.noreply.github.com> Co-authored-by: Marius Scurtescu <marius.scurtescu@gmail.com> Co-authored-by: Demipoet <161999657+demipoet@users.noreply.github.com> Co-authored-by: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Co-authored-by: Freekers <1370857+Freekers@users.noreply.github.com>
2024-05-25 05:22:50 +00:00
// A challenge proof
bytes proof = 16;
2024-03-01 07:12:31 +00:00
}
message ValidationMessage {
bytes validation = 1;
}
2024-03-08 05:05:04 +00:00
message SyncRequest {
quilibrium.node.clock.pb.ClockFramesRequest frames_request = 1;
}
message SyncResponse {
quilibrium.node.clock.pb.ClockFramesResponse frames_response = 1;
}
2024-03-01 07:12:31 +00:00
service ValidationService {
rpc PerformValidation(ValidationMessage) returns (ValidationMessage);
2024-03-08 05:05:04 +00:00
rpc Sync(SyncRequest) returns (stream SyncResponse);
2024-03-01 07:12:31 +00:00
}
2024-03-04 03:20:24 +00:00
message GetPeerManifestsRequest {}
message PeerManifest {
bytes peer_id = 1;
// The difficulty the self test was conducted under
uint32 difficulty = 2;
// The resulting local time of computing the VDF test under the difficulty
int64 difficulty_metric = 3;
// The resulting local time of computing a KZG commitment for a 16 degree
// polynomial
int64 commit_16_metric = 4;
// The resulting local time of computing a KZG commitment for a 128 degree
// polynomial
int64 commit_128_metric = 5;
// The resulting local time of computing a KZG commitment for a 1024 degree
// polynomial
int64 commit_1024_metric = 6;
// The resulting local time of computing a KZG commitment for a 65536 degree
// polynomial
int64 commit_65536_metric = 7;
// The resulting local time of computing a KZG proof for a 16 degree
// polynomial
int64 proof_16_metric = 8;
// The resulting local time of computing a KZG proof for a 128 degree
// polynomial
int64 proof_128_metric = 9;
// The resulting local time of computing a KZG proof for a 1024 degree
// polynomial
int64 proof_1024_metric = 10;
// The resulting local time of computing a KZG proof for a 65536 degree
// polynomial
int64 proof_65536_metric = 11;
// The number of reported accessible cores
uint32 cores = 12;
// The total available memory
bytes memory = 13;
// The total available storage
bytes storage = 14;
// The list of supported capabilities
repeated Capability capabilities = 15;
2024-03-08 05:05:04 +00:00
// The highest master frame the node has
uint64 master_head_frame = 16;
v1.4.18 (#193) * Remove bootstrap peer (#189) * Change bootstrap servers to DHT-only peers (#187) * support voucher file-based claims (#183) * Change bootstrap servers to DHT-only peers Changing my bootstrap servers to DHT-only peers with somewhat lower specs. One of the new ones is in the US and the other one is in Switzerland. Both use reliable providers and have 10Gbps network interfaces. --------- Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com> * Don't run self-test in DHT-only mode (#186) * support voucher file-based claims (#183) * Don't run self-test in DHT-only mode The node tries to create a self-test when ran with the `-dht-only` flag, but it doesn't load the KZG ceremony data in DHT-only mode which leads to a crash. Don't run self-test when the `-dht-only` flag is set. I tested by starting a node locally with and without existing self-test and with the `-dht-only` flag. --------- Co-authored-by: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com> * Embed json files in binary (#182) * Embed ceremony.json in binary * Embed retroactive_peers.json in binary * Signers build and verification tasks (#181) * add signers specific Taskfile * add verify tasks * move signer task under signer folder * create docker image specific for signers * map current user into docker image and container * ignore node-tmp-* * add verify:build:internal * prevent tasks with docker commands from being run inside a container * rename *:internal to *:container * add README.md * add pem files to git * Updating Q Guide link (#173) * Update README.md Updated link to Quilibrium guide to new website * Update README.md * feat: network switching and namespaced announce strings/bitmasks (#190) * feat: network switching and namespaced announce strings/bitmasks * bump version name and logo * feat: mini pomw proofs as part of peer manifest (#191) * shift default config directory under current folder (#176) * feat: signature check (#192) * feat: signature check * adjust docker command so it doesn't invoke sigcheck * remove old version * add binaries and digests * fix bug, revert build * shasum has weird byte at end * proper binaries and digests * Signatory #13 added * Signatory #3 added * Signer 4 (#194) * Signatory #5 added * Signatory #9 added (#195) * Signatory #1 added * added sig.6 files (#196) * Signatories #8 and #16 added * Signatory #12 added * Add signature (#197) * reset build for v1.4.18 after testnet bug * updated build, resigned by #13 * Signatory #16 added * added sig.6 files (#198) * Signatory #8 added * Signatory #17 added * Signatory #1 added * Signatory #7 added * Signatory #4 added * Signatory #14 added * remove binaries, ready to ship --------- Co-authored-by: littleblackcloud <163544315+littleblackcloud@users.noreply.github.com> Co-authored-by: Agost Biro <5764438+agostbiro@users.noreply.github.com> Co-authored-by: Marius Scurtescu <marius.scurtescu@gmail.com> Co-authored-by: Demipoet <161999657+demipoet@users.noreply.github.com> Co-authored-by: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Co-authored-by: Freekers <1370857+Freekers@users.noreply.github.com>
2024-05-25 05:22:50 +00:00
// The last time seen tick
int64 last_seen = 17;
2024-03-04 03:20:24 +00:00
}
message PeerManifestsResponse {
repeated PeerManifest peer_manifests = 1;
}
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);
2023-10-28 02:23:55 +00:00
rpc GetTokenInfo(GetTokenInfoRequest) returns (TokenInfoResponse);
2024-03-04 03:20:24 +00:00
rpc GetPeerManifests(GetPeerManifestsRequest) returns (PeerManifestsResponse);
2024-02-14 07:11:12 +00:00
}
service NodeStats {
rpc PutNodeInfo(PutNodeInfoRequest) returns (PutResponse);
rpc PutPeerInfo(PutPeerInfoRequest) returns (PutResponse);
}