From 3175620518365ecf916b6c5365f428106fe6d2d3 Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Fri, 16 Jun 2023 19:13:10 +0200 Subject: [PATCH] fix: responses issues --- doc/api.html | 34 ++++++++++++++++++++++++--- doc/api.md | 10 +++++--- proto/apis/massa/api/v1/private.proto | 24 ++++++++++++------- 3 files changed, 54 insertions(+), 14 deletions(-) diff --git a/doc/api.html b/doc/api.html index c5af577..de20313 100644 --- a/doc/api.html +++ b/doc/api.html @@ -761,6 +761,13 @@

GetBootstrapBlacklistRespons + + id + string + +

Request id

+ + ips string @@ -823,6 +830,13 @@

GetBootstrapWhitelistRespons + + id + string + +

Request id

+ + ips string @@ -871,6 +885,13 @@

GetPeersWhitelistResponse

+ + id + string + +

Request id

+ + ips string @@ -1064,6 +1085,13 @@

SignMessagesResponse

+ + id + string + +

Request id

+ + public_key string @@ -1103,14 +1131,14 @@

MassaPrivateService

AddToBootstrapBlacklist AddToBootstrapBlacklistRequest AddToBootstrapBlacklistResponse -

Add IP addresses to node bootstrap whitelist.

+

Add IP addresses to node bootstrap blacklist

AddToBootstrapWhitelist AddToBootstrapWhitelistRequest AddToBootstrapWhitelistResponse -

Add IP addresses to node bootstrap whitelist.

+

Add IP addresses to node bootstrap whitelist

@@ -1146,7 +1174,7 @@

MassaPrivateService

GetBootstrapWhitelistAllowAll GetBootstrapWhitelistAllowAllRequest GetBootstrapWhitelistAllowAllResponse -

Allow everyone to bootstrap from the node by removing bootstrap whitelist configuration file.

+

Allow everyone to bootstrap from the node by removing bootstrap whitelist configuration file

diff --git a/doc/api.md b/doc/api.md index 667864a..a78a14a 100644 --- a/doc/api.md +++ b/doc/api.md @@ -243,6 +243,7 @@ GetBootstrapBlacklistResponse holds the response from GetBootstrapBlacklist | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| id | [string](#string) | | Request id | | ips | [string](#string) | repeated | Bootstrap blacklisted IP addresses | @@ -293,6 +294,7 @@ GetBootstrapWhitelistResponse holds the response from GetBootstrapWhitelist | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| id | [string](#string) | | Request id | | ips | [string](#string) | repeated | Bootstrap whitelisted IP addresses | @@ -323,6 +325,7 @@ GetPeersWhitelistResponse holds the response from GetPeersWhitelist | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| id | [string](#string) | | Request id | | ips | [string](#string) | repeated | Whitelisted IP addresses | @@ -474,6 +477,7 @@ SignMessagesResponse holds the response from SignMessages | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| id | [string](#string) | | Request id | | public_key | [string](#string) | | Public key that signed the message | | signatures | [string](#string) | repeated | Signatures | @@ -495,13 +499,13 @@ Massa private gRPC service | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| AddToBootstrapBlacklist | [AddToBootstrapBlacklistRequest](#massa-api-v1-AddToBootstrapBlacklistRequest) | [AddToBootstrapBlacklistResponse](#massa-api-v1-AddToBootstrapBlacklistResponse) | Add IP addresses to node bootstrap whitelist. | -| AddToBootstrapWhitelist | [AddToBootstrapWhitelistRequest](#massa-api-v1-AddToBootstrapWhitelistRequest) | [AddToBootstrapWhitelistResponse](#massa-api-v1-AddToBootstrapWhitelistResponse) | Add IP addresses to node bootstrap whitelist. | +| AddToBootstrapBlacklist | [AddToBootstrapBlacklistRequest](#massa-api-v1-AddToBootstrapBlacklistRequest) | [AddToBootstrapBlacklistResponse](#massa-api-v1-AddToBootstrapBlacklistResponse) | Add IP addresses to node bootstrap blacklist | +| AddToBootstrapWhitelist | [AddToBootstrapWhitelistRequest](#massa-api-v1-AddToBootstrapWhitelistRequest) | [AddToBootstrapWhitelistResponse](#massa-api-v1-AddToBootstrapWhitelistResponse) | Add IP addresses to node bootstrap whitelist | | AddToPeersWhitelist | [AddToPeersWhitelistRequest](#massa-api-v1-AddToPeersWhitelistRequest) | [AddToPeersWhitelistResponse](#massa-api-v1-AddToPeersWhitelistResponse) | Add IP addresses to node peers whitelist. No confirmation to expect. Note: If the ip was unknown it adds it to the known peers, otherwise it updates the peer type | | AddStakingSecretKeys | [AddStakingSecretKeysRequest](#massa-api-v1-AddStakingSecretKeysRequest) | [AddStakingSecretKeysResponse](#massa-api-v1-AddStakingSecretKeysResponse) | Add staking secret keys to wallet | | GetBootstrapBlacklist | [GetBootstrapBlacklistRequest](#massa-api-v1-GetBootstrapBlacklistRequest) | [GetBootstrapBlacklistResponse](#massa-api-v1-GetBootstrapBlacklistResponse) | Get node bootstrap blacklist IP addresses | | GetBootstrapWhitelist | [GetBootstrapWhitelistRequest](#massa-api-v1-GetBootstrapWhitelistRequest) | [GetBootstrapWhitelistResponse](#massa-api-v1-GetBootstrapWhitelistResponse) | Get node bootstrap whitelist IP addresses | -| GetBootstrapWhitelistAllowAll | [GetBootstrapWhitelistAllowAllRequest](#massa-api-v1-GetBootstrapWhitelistAllowAllRequest) | [GetBootstrapWhitelistAllowAllResponse](#massa-api-v1-GetBootstrapWhitelistAllowAllResponse) | Allow everyone to bootstrap from the node by removing bootstrap whitelist configuration file. | +| GetBootstrapWhitelistAllowAll | [GetBootstrapWhitelistAllowAllRequest](#massa-api-v1-GetBootstrapWhitelistAllowAllRequest) | [GetBootstrapWhitelistAllowAllResponse](#massa-api-v1-GetBootstrapWhitelistAllowAllResponse) | Allow everyone to bootstrap from the node by removing bootstrap whitelist configuration file | | GetPeersWhitelist | [GetPeersWhitelistRequest](#massa-api-v1-GetPeersWhitelistRequest) | [GetPeersWhitelistResponse](#massa-api-v1-GetPeersWhitelistResponse) | Get node peers whitelist IP addresses | | RemoveFromBootstrapBlacklist | [RemoveFromBootstrapBlacklistRequest](#massa-api-v1-RemoveFromBootstrapBlacklistRequest) | [RemoveFromBootstrapBlacklistResponse](#massa-api-v1-RemoveFromBootstrapBlacklistResponse) | Remove from bootstrap blacklist given IP addresses | | RemoveFromBootstrapWhitelist | [RemoveFromBootstrapWhitelistRequest](#massa-api-v1-RemoveFromBootstrapWhitelistRequest) | [RemoveFromBootstrapWhitelistResponse](#massa-api-v1-RemoveFromBootstrapWhitelistResponse) | Remove from bootstrap whitelist given IP addresses | diff --git a/proto/apis/massa/api/v1/private.proto b/proto/apis/massa/api/v1/private.proto index 0770071..e9f3ea4 100644 --- a/proto/apis/massa/api/v1/private.proto +++ b/proto/apis/massa/api/v1/private.proto @@ -17,7 +17,7 @@ option swift_prefix = "MAPI"; // Massa private gRPC service service MassaPrivateService { - // Add IP addresses to node bootstrap whitelist. + // Add IP addresses to node bootstrap blacklist rpc AddToBootstrapBlacklist(AddToBootstrapBlacklistRequest) returns (AddToBootstrapBlacklistResponse) { option (google.api.http) = { post: "/v1/add_to_boostrap_blacklist" @@ -25,7 +25,7 @@ service MassaPrivateService { }; } - // Add IP addresses to node bootstrap whitelist. + // Add IP addresses to node bootstrap whitelist rpc AddToBootstrapWhitelist(AddToBootstrapWhitelistRequest) returns (AddToBootstrapWhitelistResponse) { option (google.api.http) = { post: "/v1/add_to_boostrap_whitelist" @@ -66,7 +66,7 @@ service MassaPrivateService { }; } - // Allow everyone to bootstrap from the node by removing bootstrap whitelist configuration file. + // Allow everyone to bootstrap from the node by removing bootstrap whitelist configuration file rpc GetBootstrapWhitelistAllowAll(GetBootstrapWhitelistAllowAllRequest) returns (GetBootstrapWhitelistAllowAllResponse) { option (google.api.http) = { post: "/v1/get_bootstrap_whitelist_allow_all" @@ -175,8 +175,10 @@ message GetBootstrapBlacklistRequest { // GetBootstrapBlacklistResponse holds the response from GetBootstrapBlacklist message GetBootstrapBlacklistResponse { + // Request id + string id = 1; // Bootstrap blacklisted IP addresses - repeated string ips = 1; + repeated string ips = 2; } // GetBootstrapWhitelistRequest holds the request for GetBootstrapWhitelist @@ -187,8 +189,10 @@ message GetBootstrapWhitelistRequest { // GetBootstrapWhitelistResponse holds the response from GetBootstrapWhitelist message GetBootstrapWhitelistResponse { + // Request id + string id = 1; // Bootstrap whitelisted IP addresses - repeated string ips = 1; + repeated string ips = 2; } // GetBootstrapWhitelistAllowAllRequest holds the request for GetBootstrapWhitelistAllowAll @@ -205,8 +209,10 @@ message GetPeersWhitelistRequest { // GetPeersWhitelistResponse holds the response from GetPeersWhitelist message GetPeersWhitelistResponse { + // Request id + string id = 1; // Whitelisted IP addresses - repeated string ips = 1; + repeated string ips = 2; } // RemoveFromBootstrapBlacklistRequest holds the request for RemoveFromBootstrapBlacklist @@ -255,10 +261,12 @@ message SignMessagesRequest { // SignMessagesResponse holds the response from SignMessages message SignMessagesResponse { + // Request id + string id = 1; // Public key that signed the message - string public_key = 1; + string public_key = 2; // Signatures - repeated string signatures = 2; + repeated string signatures = 3; } // ShutdownNodeRequest holds the request for ShutdownNode