2022-02-23 16:23:39 -08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
2025-07-20 08:38:06 +00:00
|
|
|
option go_package = "github.com/luxfi/netrunner;rpcpb";
|
2022-02-23 16:23:39 -08:00
|
|
|
|
|
|
|
|
package rpcpb;
|
|
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
|
|
service PingService {
|
|
|
|
|
rpc Ping(PingRequest) returns (PingResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/ping"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message PingRequest {}
|
|
|
|
|
|
|
|
|
|
message PingResponse {
|
|
|
|
|
int32 pid = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
service ControlService {
|
2023-04-03 13:33:21 -03:00
|
|
|
rpc RPCVersion(RPCVersionRequest) returns (RPCVersionResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/rpcversion"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
rpc Start(StartRequest) returns (StartResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/start"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-10 12:27:57 -03:00
|
|
|
rpc CreateBlockchains(CreateBlockchainsRequest) returns (CreateBlockchainsResponse) {
|
2022-06-02 21:55:45 -03:00
|
|
|
option (google.api.http) = {
|
2022-06-10 12:27:57 -03:00
|
|
|
post: "/v1/control/createblockchains"
|
2022-06-02 21:55:45 -03:00
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
rpc TransformElasticChains(TransformElasticChainsRequest) returns (TransformElasticChainsResponse) {
|
2023-04-13 10:30:43 -04:00
|
|
|
option (google.api.http) = {
|
2025-12-19 07:11:06 -08:00
|
|
|
post: "/v1/control/transformelasticchains"
|
2023-04-13 10:30:43 -04:00
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-22 17:56:39 -04:00
|
|
|
rpc AddPermissionlessValidator(AddPermissionlessValidatorRequest) returns (AddPermissionlessValidatorResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/addpermissionlessvalidator"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
rpc RemoveChainValidator(RemoveChainValidatorRequest) returns (RemoveChainValidatorResponse) {
|
2023-05-25 17:19:49 -04:00
|
|
|
option (google.api.http) = {
|
2025-12-19 07:11:06 -08:00
|
|
|
post: "/v1/control/removechainvalidator"
|
2023-05-25 17:19:49 -04:00
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
rpc CreateChains(CreateChainsRequest) returns (CreateChainsResponse) {
|
2022-06-03 23:43:04 -03:00
|
|
|
option (google.api.http) = {
|
2025-12-19 07:11:06 -08:00
|
|
|
post: "/v1/control/createchains"
|
2022-06-03 23:43:04 -03:00
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
rpc Health(HealthRequest) returns (HealthResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/health"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc URIs(URIsRequest) returns (URIsResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/uris"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-25 19:01:56 -03:00
|
|
|
rpc WaitForHealthy(WaitForHealthyRequest) returns (WaitForHealthyResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/waitforhealthy"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
rpc Status(StatusRequest) returns (StatusResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/status"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc StreamStatus(StreamStatusRequest) returns (stream StreamStatusResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/streamstatus"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc RemoveNode(RemoveNodeRequest) returns (RemoveNodeResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/removenode"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-20 10:36:13 -05:00
|
|
|
rpc AddNode(AddNodeRequest) returns (AddNodeResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/addnode"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
rpc RestartNode(RestartNodeRequest) returns (RestartNodeResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/restartnode"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-10 12:16:21 -03:00
|
|
|
rpc PauseNode(PauseNodeRequest) returns (PauseNodeResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/pausenode"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc ResumeNode(ResumeNodeRequest) returns (ResumeNodeResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/resumenode"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
rpc Stop(StopRequest) returns (StopResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/stop"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
2022-04-06 11:19:29 -07:00
|
|
|
|
|
|
|
|
rpc AttachPeer(AttachPeerRequest) returns (AttachPeerResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/attachpeer"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc SendOutboundMessage(SendOutboundMessageRequest) returns (SendOutboundMessageResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/sendoutboundmessage"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
2022-05-18 17:11:44 -03:00
|
|
|
|
|
|
|
|
rpc SaveSnapshot(SaveSnapshotRequest) returns (SaveSnapshotResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/savesnapshot"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-29 10:07:43 -08:00
|
|
|
// SaveHotSnapshot saves a snapshot without stopping the network
|
|
|
|
|
// Uses Copy-on-Write on APFS (macOS) for instant snapshots
|
|
|
|
|
rpc SaveHotSnapshot(SaveSnapshotRequest) returns (SaveSnapshotResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/savehotsnapshot"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-18 17:11:44 -03:00
|
|
|
rpc LoadSnapshot(LoadSnapshotRequest) returns (LoadSnapshotResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/loadsnapshot"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc RemoveSnapshot(RemoveSnapshotRequest) returns (RemoveSnapshotResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/removesnapshot"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rpc GetSnapshotNames(GetSnapshotNamesRequest) returns (GetSnapshotNamesResponse) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
post: "/v1/control/getsnapshotnames"
|
|
|
|
|
body: "*"
|
|
|
|
|
};
|
|
|
|
|
}
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message ChainParticipants {
|
2023-04-11 15:26:28 -04:00
|
|
|
repeated string node_names = 1;
|
2023-04-10 19:39:54 -04:00
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
message ClusterInfo {
|
|
|
|
|
repeated string node_names = 1;
|
|
|
|
|
map<string, NodeInfo> node_infos = 2;
|
|
|
|
|
int32 pid = 3;
|
|
|
|
|
string root_data_dir = 4;
|
|
|
|
|
bool healthy = 5;
|
2022-04-06 11:19:29 -07:00
|
|
|
|
|
|
|
|
// Maps from the node ID to its attached peer infos.
|
|
|
|
|
map<string, ListOfAttachedPeerInfo> attached_peer_infos = 6;
|
2022-04-19 10:24:55 -07:00
|
|
|
|
2022-07-28 12:29:43 -03:00
|
|
|
// Set to "true" once custom blockchains are ready.
|
|
|
|
|
bool custom_chains_healthy = 7;
|
2022-08-02 11:15:20 -03:00
|
|
|
// The map of blockchain IDs in "ids.ID" format to its blockchain information.
|
2022-07-28 12:29:43 -03:00
|
|
|
map<string, CustomChainInfo> custom_chains = 8;
|
2025-12-19 07:11:06 -08:00
|
|
|
map<string, ChainInfo> chains = 9;
|
2022-04-19 10:24:55 -07:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message ChainInfo {
|
|
|
|
|
// If Chain is an Elastic Chain
|
2023-05-03 10:14:09 -03:00
|
|
|
bool is_elastic = 1;
|
2023-04-13 19:45:50 -04:00
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
// TXID for the elastic chain transform
|
|
|
|
|
string elastic_chain_id = 2;
|
2023-05-29 20:03:38 -03:00
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
// node validators of chain
|
|
|
|
|
ChainParticipants chain_participants = 3;
|
2022-04-19 10:24:55 -07:00
|
|
|
}
|
|
|
|
|
|
2022-07-28 12:29:43 -03:00
|
|
|
message CustomChainInfo {
|
|
|
|
|
// Blockchain name given to the create blockchain TX
|
|
|
|
|
// Currently used to keep a record of the VM name,
|
|
|
|
|
// which is not saved anywhere and can't be recovered from VM ID
|
|
|
|
|
string chain_name = 1;
|
2022-04-19 10:24:55 -07:00
|
|
|
|
|
|
|
|
// VM ID in "ids.ID" format.
|
|
|
|
|
string vm_id = 2;
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
// Create chain transaction ID -- P-Chain chain ID.
|
|
|
|
|
// The chain ID must be whitelisted by the lux node.
|
|
|
|
|
string pchain_id = 3;
|
2022-04-19 10:24:55 -07:00
|
|
|
|
|
|
|
|
// Create blockchain transaction ID -- blockchain ID>
|
2022-07-28 12:29:43 -03:00
|
|
|
// The blockchain ID is used for RPC endpoints.
|
2025-12-19 07:11:06 -08:00
|
|
|
string blockchain_id = 4;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message NodeInfo {
|
|
|
|
|
string name = 1;
|
|
|
|
|
string exec_path = 2;
|
|
|
|
|
string uri = 3;
|
|
|
|
|
string id = 4;
|
|
|
|
|
string log_dir = 5;
|
|
|
|
|
string db_dir = 6;
|
2022-04-19 10:24:55 -07:00
|
|
|
string plugin_dir = 7;
|
2025-12-19 07:11:06 -08:00
|
|
|
string whitelisted_chains = 8;
|
2023-02-10 17:21:37 -03:00
|
|
|
bytes config = 9;
|
|
|
|
|
bool paused = 10;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
2022-04-06 11:19:29 -07:00
|
|
|
message AttachedPeerInfo {
|
|
|
|
|
string id = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ListOfAttachedPeerInfo {
|
|
|
|
|
repeated AttachedPeerInfo peers = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
message StartRequest {
|
2026-01-08 19:35:37 -08:00
|
|
|
// Network identifier - name or ID
|
|
|
|
|
// Supported values: "mainnet" (1), "testnet" (2), "devnet" (3), "custom" (1337)
|
|
|
|
|
// or any custom network name
|
|
|
|
|
string network_name = 1;
|
|
|
|
|
|
|
|
|
|
// Node consensus engine type
|
|
|
|
|
// Supported values: "luxd", "avalanchego", "geth", "op-node", "custom"
|
|
|
|
|
string node_type = 2;
|
|
|
|
|
|
|
|
|
|
string exec_path = 4;
|
|
|
|
|
optional uint32 num_nodes = 5;
|
|
|
|
|
optional string whitelisted_chains = 6;
|
|
|
|
|
optional string global_node_config = 7;
|
2022-04-19 10:24:55 -07:00
|
|
|
// Used for both database and log files.
|
2026-01-08 19:35:37 -08:00
|
|
|
optional string root_data_dir = 8;
|
2022-04-19 10:24:55 -07:00
|
|
|
|
2023-01-06 02:30:05 -03:00
|
|
|
// Plugin dir from which to load all custom VM executables.
|
2026-01-08 19:35:37 -08:00
|
|
|
string plugin_dir = 9;
|
2022-04-19 10:24:55 -07:00
|
|
|
|
2022-10-22 11:53:04 -03:00
|
|
|
// The list of:
|
|
|
|
|
// - custom chain's VM name
|
|
|
|
|
// - genesis file path
|
2025-12-19 07:11:06 -08:00
|
|
|
// - (optional) chain id to use.
|
2022-10-22 11:53:04 -03:00
|
|
|
// - chain config file path
|
|
|
|
|
// - network upgrade file path
|
2022-07-28 12:29:43 -03:00
|
|
|
//
|
2025-12-19 07:11:06 -08:00
|
|
|
// chain id must be always nil when using StartRequest, as the network is empty and has no preloaded
|
|
|
|
|
// chain ids available.
|
2022-04-19 10:24:55 -07:00
|
|
|
//
|
|
|
|
|
// The matching file with the name in "ids.ID" format must exist.
|
2025-12-19 07:11:06 -08:00
|
|
|
// e.g., ids.ToID(hashing.ComputeHash256("chainevm")).String()
|
|
|
|
|
// e.g., chain-cli create VMID chainevm
|
2022-04-19 10:24:55 -07:00
|
|
|
//
|
|
|
|
|
// If this field is set to none (by default), the node/network-runner
|
2025-12-19 07:11:06 -08:00
|
|
|
// does not install the custom chain and does not create the chain,
|
2022-04-19 10:24:55 -07:00
|
|
|
// even if the VM binary exists on the local plugins directory.
|
2026-01-08 19:35:37 -08:00
|
|
|
repeated BlockchainSpec blockchain_specs = 10;
|
2022-04-20 20:24:04 -05:00
|
|
|
|
2026-01-08 19:35:37 -08:00
|
|
|
map<string, string> custom_node_configs = 11;
|
2022-07-04 14:16:22 -03:00
|
|
|
|
2022-04-20 20:24:04 -05:00
|
|
|
// Map of chain name to config file contents.
|
|
|
|
|
// If specified, will create a file "chainname/config.json" with
|
|
|
|
|
// the contents provided here.
|
2026-01-08 19:35:37 -08:00
|
|
|
map<string, string> chain_configs = 12;
|
2022-07-29 08:42:21 -07:00
|
|
|
|
|
|
|
|
// Map of chain name to upgrade file contents.
|
|
|
|
|
// If specified, will create a file "chainname/upgrade.json" with
|
|
|
|
|
// the contents provided here.
|
2026-01-08 19:35:37 -08:00
|
|
|
map<string, string> upgrade_configs = 13;
|
2022-09-23 19:23:35 -03:00
|
|
|
|
2022-09-26 17:48:35 -03:00
|
|
|
// reassign default/custom ports if they are already taken
|
2026-01-08 19:35:37 -08:00
|
|
|
optional bool reassign_ports_if_used = 14;
|
2022-09-26 17:48:35 -03:00
|
|
|
|
|
|
|
|
// use dynamic ports instead of default ones
|
2026-01-08 19:35:37 -08:00
|
|
|
optional bool dynamic_ports = 15;
|
2022-11-11 14:49:25 -03:00
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
// Map of chain id to chain config file contents.
|
|
|
|
|
// If specified, will create a file "chainid.json" under chains config dir with
|
2022-11-11 14:49:25 -03:00
|
|
|
// the contents provided here.
|
2026-01-08 19:35:37 -08:00
|
|
|
map<string, string> chain_config_files = 16;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
2023-04-03 13:33:21 -03:00
|
|
|
message RPCVersionRequest {}
|
|
|
|
|
|
|
|
|
|
message RPCVersionResponse {
|
|
|
|
|
uint32 version = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
message StartResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
2023-04-11 18:28:50 -03:00
|
|
|
repeated string chain_ids = 2;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message ChainSpec {
|
2023-04-05 15:26:54 -03:00
|
|
|
// if empty, assumes all nodes should be participants
|
|
|
|
|
repeated string participants = 1;
|
2023-04-27 12:00:01 -03:00
|
|
|
// either file path or file contents
|
2025-12-19 07:11:06 -08:00
|
|
|
string chain_config_file = 2;
|
2023-04-05 15:26:54 -03:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message ElasticChainSpec {
|
|
|
|
|
string chain_id = 1;
|
2023-04-13 10:30:43 -04:00
|
|
|
string asset_name = 2;
|
|
|
|
|
string asset_symbol = 3;
|
|
|
|
|
uint64 initial_supply = 4;
|
|
|
|
|
uint64 max_supply = 5;
|
|
|
|
|
uint64 min_consumption_rate = 6;
|
|
|
|
|
uint64 max_consumption_rate = 7;
|
|
|
|
|
uint64 min_validator_stake = 8;
|
|
|
|
|
uint64 max_validator_stake = 9;
|
|
|
|
|
uint64 min_stake_duration = 10;
|
|
|
|
|
uint64 max_stake_duration = 11;
|
|
|
|
|
uint32 min_delegation_fee = 12;
|
|
|
|
|
uint64 min_delegator_stake = 13;
|
|
|
|
|
uint32 max_validator_weight_factor = 14;
|
|
|
|
|
uint32 uptime_requirement = 15;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message TransformElasticChainsRequest {
|
|
|
|
|
repeated ElasticChainSpec elastic_chain_spec = 1;
|
2023-04-13 10:30:43 -04:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message TransformElasticChainsResponse {
|
2023-04-13 10:30:43 -04:00
|
|
|
ClusterInfo cluster_info = 1;
|
2023-04-13 18:03:53 -04:00
|
|
|
repeated string tx_ids = 2;
|
2023-05-23 17:46:49 -04:00
|
|
|
repeated string asset_ids = 3;
|
2023-04-13 10:30:43 -04:00
|
|
|
}
|
|
|
|
|
|
2023-05-22 17:56:39 -04:00
|
|
|
message PermissionlessValidatorSpec {
|
2025-12-19 07:11:06 -08:00
|
|
|
string chain_id = 1;
|
2023-05-24 17:42:45 -04:00
|
|
|
string node_name = 2;
|
2023-05-22 17:56:39 -04:00
|
|
|
uint64 staked_token_amount = 3;
|
|
|
|
|
string asset_id = 4;
|
|
|
|
|
string start_time = 5;
|
|
|
|
|
uint64 stake_duration = 6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AddPermissionlessValidatorRequest {
|
|
|
|
|
repeated PermissionlessValidatorSpec validator_spec = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AddPermissionlessValidatorResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message RemoveChainValidatorSpec {
|
|
|
|
|
string chain_id = 1;
|
2023-05-25 17:19:49 -04:00
|
|
|
repeated string node_names = 2;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message RemoveChainValidatorRequest {
|
|
|
|
|
repeated RemoveChainValidatorSpec validator_spec = 1;
|
2023-05-25 17:19:49 -04:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message RemoveChainValidatorResponse {
|
2023-05-25 17:19:49 -04:00
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-03 09:40:22 -03:00
|
|
|
message BlockchainSpec {
|
|
|
|
|
string vm_name = 1;
|
2023-04-27 12:00:01 -03:00
|
|
|
// either file path or file contents
|
2022-06-03 09:40:22 -03:00
|
|
|
string genesis = 2;
|
2025-12-19 07:11:06 -08:00
|
|
|
// either a chain_id is given for a previously created chain,
|
|
|
|
|
// or a chain specification is given for a new chain generation
|
|
|
|
|
optional string chain_id = 3;
|
|
|
|
|
optional ChainSpec chain_spec = 4;
|
2023-04-27 12:00:01 -03:00
|
|
|
// General chain config, either file path or file contents
|
2023-04-07 13:43:09 -03:00
|
|
|
string chain_config = 5;
|
2023-04-27 12:00:01 -03:00
|
|
|
// either file path or file contents
|
2023-04-07 13:43:09 -03:00
|
|
|
string network_upgrade = 6;
|
2022-12-15 10:39:47 +01:00
|
|
|
string blockchain_alias = 7;
|
2023-04-27 12:00:01 -03:00
|
|
|
// Per node chain config, either file path or file contents
|
2022-12-15 14:40:10 -03:00
|
|
|
string per_node_chain_config = 8;
|
2022-06-03 09:40:22 -03:00
|
|
|
}
|
|
|
|
|
|
2022-06-10 12:27:57 -03:00
|
|
|
message CreateBlockchainsRequest {
|
2022-10-22 11:53:04 -03:00
|
|
|
// The list of:
|
|
|
|
|
// - custom chain's VM name
|
|
|
|
|
// - genesis file path
|
2025-12-19 07:11:06 -08:00
|
|
|
// - (optional) chain id to use.
|
2022-10-22 11:53:04 -03:00
|
|
|
// - chain config file path
|
|
|
|
|
// - network upgrade file path
|
2025-12-19 07:11:06 -08:00
|
|
|
// - chain config file path
|
2022-12-12 12:43:32 -03:00
|
|
|
// - chain config file path for specific nodes
|
2022-06-02 21:55:45 -03:00
|
|
|
//
|
|
|
|
|
// The matching file with the name in "ids.ID" format must exist.
|
2025-12-19 07:11:06 -08:00
|
|
|
// e.g., ids.ToID(hashing.ComputeHash256("chainevm")).String()
|
|
|
|
|
// e.g., chain-cli create VMID chainevm
|
2022-06-02 21:55:45 -03:00
|
|
|
//
|
|
|
|
|
// If this field is set to none (by default), the node/network-runner
|
2022-06-10 17:05:30 -03:00
|
|
|
// will return error
|
|
|
|
|
repeated BlockchainSpec blockchain_specs = 1;
|
2022-06-02 21:55:45 -03:00
|
|
|
}
|
|
|
|
|
|
2022-06-10 12:27:57 -03:00
|
|
|
message CreateBlockchainsResponse {
|
2022-06-02 21:55:45 -03:00
|
|
|
ClusterInfo cluster_info = 1;
|
2023-04-11 18:11:26 -03:00
|
|
|
repeated string chain_ids = 2;
|
2022-06-02 21:55:45 -03:00
|
|
|
}
|
2022-06-03 09:40:22 -03:00
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message CreateChainsRequest {
|
|
|
|
|
repeated ChainSpec chain_specs = 1;
|
2022-06-03 23:43:04 -03:00
|
|
|
}
|
|
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
message CreateChainsResponse {
|
2022-06-03 23:43:04 -03:00
|
|
|
ClusterInfo cluster_info = 1;
|
2025-12-19 07:11:06 -08:00
|
|
|
repeated string chain_ids = 2;
|
2022-06-03 23:43:04 -03:00
|
|
|
}
|
|
|
|
|
|
2026-01-08 19:35:37 -08:00
|
|
|
message HealthRequest {
|
|
|
|
|
// Network name to check health for
|
|
|
|
|
// If empty, checks overall server health
|
|
|
|
|
optional string network_name = 1;
|
|
|
|
|
}
|
2022-02-23 16:23:39 -08:00
|
|
|
|
|
|
|
|
message HealthResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
2026-01-08 19:35:37 -08:00
|
|
|
// Network-specific health information
|
|
|
|
|
optional NetworkHealth network_health = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message NetworkHealth {
|
|
|
|
|
string network_name = 1;
|
|
|
|
|
uint32 network_id = 2;
|
|
|
|
|
bool healthy = 3;
|
|
|
|
|
repeated string healthy_nodes = 4;
|
|
|
|
|
repeated string unhealthy_nodes = 5;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message URIsRequest {}
|
|
|
|
|
|
|
|
|
|
message URIsResponse {
|
|
|
|
|
repeated string uris = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-08 19:35:37 -08:00
|
|
|
message WaitForHealthyRequest {
|
|
|
|
|
// Network name to wait for
|
|
|
|
|
// If empty, waits for any network to be healthy
|
|
|
|
|
optional string network_name = 1;
|
|
|
|
|
}
|
2023-01-25 19:01:56 -03:00
|
|
|
|
|
|
|
|
message WaitForHealthyResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-08 19:35:37 -08:00
|
|
|
message StatusRequest {
|
|
|
|
|
// Network name to get status for
|
|
|
|
|
// If empty, returns overall server status
|
|
|
|
|
optional string network_name = 1;
|
|
|
|
|
}
|
2022-02-23 16:23:39 -08:00
|
|
|
|
|
|
|
|
message StatusResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
2026-01-08 19:35:37 -08:00
|
|
|
// Network-specific status information
|
|
|
|
|
optional NetworkStatus network_status = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message NetworkStatus {
|
|
|
|
|
string network_name = 1;
|
|
|
|
|
uint32 network_id = 2;
|
|
|
|
|
string status = 3; // "running", "stopped", "starting", "error"
|
|
|
|
|
uint32 num_nodes = 4;
|
|
|
|
|
repeated rpcpb.NodeInfo nodes = 5;
|
|
|
|
|
repeated rpcpb.ChainInfo chains = 6;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message StreamStatusRequest {
|
|
|
|
|
int64 push_interval = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message StreamStatusResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RestartNodeRequest {
|
2022-04-19 10:24:55 -07:00
|
|
|
// Must be a valid node name.
|
|
|
|
|
string name = 1;
|
|
|
|
|
|
|
|
|
|
// Optional fields are set to the previous values if empty.
|
|
|
|
|
optional string exec_path = 2;
|
2025-12-19 07:11:06 -08:00
|
|
|
optional string whitelisted_chains = 3;
|
2022-04-19 10:24:55 -07:00
|
|
|
|
2022-07-29 08:42:21 -07:00
|
|
|
// Map of chain name to config file contents.
|
|
|
|
|
// If specified, will create a file "chainname/config.json" with
|
|
|
|
|
// the contents provided here.
|
2022-08-16 07:13:57 -07:00
|
|
|
map<string, string> chain_configs = 4;
|
2022-07-29 08:42:21 -07:00
|
|
|
|
|
|
|
|
// Map of chain name to config file contents.
|
|
|
|
|
// If specified, will create a file "chainname/upgrade.json" with
|
|
|
|
|
// the contents provided here.
|
2022-08-17 13:13:39 -07:00
|
|
|
map<string, string> upgrade_configs = 5;
|
2022-11-11 14:49:25 -03:00
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
// Map of chain id to chain config file contents.
|
|
|
|
|
// If specified, will create a file "chainid.json" under chains config dir with
|
2022-11-11 14:49:25 -03:00
|
|
|
// the contents provided here.
|
2025-12-19 07:11:06 -08:00
|
|
|
map<string, string> chain_config_files = 6;
|
2023-01-06 02:30:05 -03:00
|
|
|
|
|
|
|
|
// Plugin dir from which to load all custom VM executables.
|
2023-01-06 16:48:41 -03:00
|
|
|
string plugin_dir = 7;
|
2022-02-23 16:23:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RestartNodeResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RemoveNodeRequest {
|
|
|
|
|
string name = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RemoveNodeResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-10 12:16:21 -03:00
|
|
|
message PauseNodeRequest {
|
|
|
|
|
string name = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message PauseNodeResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ResumeNodeRequest {
|
|
|
|
|
string name = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ResumeNodeResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-20 10:36:13 -05:00
|
|
|
message AddNodeRequest {
|
2022-07-22 09:45:48 -05:00
|
|
|
string name = 1;
|
|
|
|
|
string exec_path = 2;
|
|
|
|
|
optional string node_config = 3;
|
2022-08-17 13:13:39 -07:00
|
|
|
|
|
|
|
|
// Map of chain name to config file contents.
|
|
|
|
|
// If specified, will create a file "chainname/config.json" with
|
|
|
|
|
// the contents provided here.
|
2022-07-22 09:45:48 -05:00
|
|
|
map<string, string> chain_configs = 4;
|
2022-08-17 13:13:39 -07:00
|
|
|
|
|
|
|
|
// Map of chain name to config file contents.
|
|
|
|
|
// If specified, will create a file "chainname/upgrade.json" with
|
|
|
|
|
// the contents provided here.
|
|
|
|
|
map<string, string> upgrade_configs = 5;
|
2022-11-11 14:49:25 -03:00
|
|
|
|
2025-12-19 07:11:06 -08:00
|
|
|
// Map of chain id to chain config file contents.
|
|
|
|
|
// If specified, will create a file "chainid.json" under chains config dir with
|
2022-11-11 14:49:25 -03:00
|
|
|
// the contents provided here.
|
2025-12-19 07:11:06 -08:00
|
|
|
map<string, string> chain_config_files = 6;
|
2023-01-06 02:30:05 -03:00
|
|
|
|
|
|
|
|
// Plugin dir from which to load all custom VM executables.
|
2023-01-06 16:48:41 -03:00
|
|
|
string plugin_dir = 7;
|
2022-04-20 10:36:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AddNodeResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 16:23:39 -08:00
|
|
|
message StopRequest {}
|
|
|
|
|
|
|
|
|
|
message StopResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
}
|
2022-04-06 11:19:29 -07:00
|
|
|
|
|
|
|
|
message AttachPeerRequest {
|
|
|
|
|
string node_name = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message AttachPeerResponse {
|
|
|
|
|
ClusterInfo cluster_info = 1;
|
|
|
|
|
AttachedPeerInfo attached_peer_info = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message SendOutboundMessageRequest {
|
|
|
|
|
string node_name = 1;
|
|
|
|
|
string peer_id = 2;
|
|
|
|
|
uint32 op = 3;
|
|
|
|
|
bytes bytes = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message SendOutboundMessageResponse {
|
|
|
|
|
bool sent = 1;
|
|
|
|
|
}
|
2022-05-18 17:11:44 -03:00
|
|
|
|
|
|
|
|
message SaveSnapshotRequest {
|
2026-01-08 19:35:37 -08:00
|
|
|
string network_name = 1;
|
|
|
|
|
string snapshot_name = 2;
|
2022-05-18 17:11:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message SaveSnapshotResponse {
|
2022-05-26 11:10:01 -03:00
|
|
|
string snapshot_path = 1;
|
2022-05-18 17:11:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message LoadSnapshotRequest {
|
2026-01-08 19:35:37 -08:00
|
|
|
string network_name = 1;
|
|
|
|
|
string snapshot_name = 2;
|
|
|
|
|
optional string exec_path = 3;
|
|
|
|
|
string plugin_dir = 4;
|
|
|
|
|
optional string root_data_dir = 5;
|
|
|
|
|
map<string, string> chain_configs = 6;
|
|
|
|
|
map<string, string> upgrade_configs = 7;
|
|
|
|
|
optional string global_node_config = 8;
|
|
|
|
|
optional bool reassign_ports_if_used = 9;
|
|
|
|
|
map<string, string> chain_config_files = 10;
|
2022-05-18 17:11:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message LoadSnapshotResponse {
|
2022-05-18 22:36:48 -03:00
|
|
|
ClusterInfo cluster_info = 1;
|
2022-05-18 17:11:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RemoveSnapshotRequest {
|
2026-01-08 19:35:37 -08:00
|
|
|
string network_name = 1;
|
|
|
|
|
string snapshot_name = 2;
|
2022-05-18 17:11:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RemoveSnapshotResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message GetSnapshotNamesRequest {
|
2026-01-08 19:35:37 -08:00
|
|
|
string network_name = 1;
|
2022-05-18 17:11:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message GetSnapshotNamesResponse {
|
|
|
|
|
repeated string snapshot_names = 1;
|
|
|
|
|
}
|