From d69cff61cbd863bd97e85861c648e6155053a0ac Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Fri, 16 Jun 2023 18:59:26 +0200 Subject: [PATCH] feat: add AddToBootstrapBlacklist --- doc/api.html | 58 ++++++++++++++++++++++++++- doc/api.md | 30 +++++++++++++- proto/apis/massa/api/v1/private.proto | 19 ++++++++- 3 files changed, 104 insertions(+), 3 deletions(-) diff --git a/doc/api.html b/doc/api.html index 2d6c159..c5af577 100644 --- a/doc/api.html +++ b/doc/api.html @@ -186,6 +186,14 @@

Table of Contents

MAddStakingSecretKeysResponse +
  • + MAddToBootstrapBlacklistRequest +
  • + +
  • + MAddToBootstrapBlacklistResponse +
  • +
  • MAddToBootstrapWhitelistRequest
  • @@ -626,6 +634,37 @@

    AddStakingSecretKeysResponse< +

    AddToBootstrapBlacklistRequest

    +

    AddToBootstrapBlacklistRequest holds the request for AddToBootstrapBlacklist

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    ipsstringrepeated

    IP addresses to add to bootstrap blacklist

    + + + + + +

    AddToBootstrapBlacklistResponse

    +

    AddToBootstrapBlacklistResponse holds the response from AddToBootstrapBlacklist

    + + + + +

    AddToBootstrapWhitelistRequest

    AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist

    @@ -640,7 +679,7 @@

    AddToBootstrapWhitelistRequ ips string repeated -

    IP addresses to add to peers whitelist

    +

    IP addresses to add to bootstrap whitelist

    @@ -1060,6 +1099,13 @@

    MassaPrivateService

    + + AddToBootstrapBlacklist + AddToBootstrapBlacklistRequest + AddToBootstrapBlacklistResponse +

    Add IP addresses to node bootstrap whitelist.

    + + AddToBootstrapWhitelist AddToBootstrapWhitelistRequest @@ -1172,6 +1218,16 @@

    Methods with HTTP bindings

    + + AddToBootstrapBlacklist + POST + /v1/add_to_boostrap_blacklist + * + + + + + AddToBootstrapWhitelist POST diff --git a/doc/api.md b/doc/api.md index 91dc4f9..667864a 100644 --- a/doc/api.md +++ b/doc/api.md @@ -6,6 +6,8 @@ - [massa/api/v1/private.proto](#massa_api_v1_private-proto) - [AddStakingSecretKeysRequest](#massa-api-v1-AddStakingSecretKeysRequest) - [AddStakingSecretKeysResponse](#massa-api-v1-AddStakingSecretKeysResponse) + - [AddToBootstrapBlacklistRequest](#massa-api-v1-AddToBootstrapBlacklistRequest) + - [AddToBootstrapBlacklistResponse](#massa-api-v1-AddToBootstrapBlacklistResponse) - [AddToBootstrapWhitelistRequest](#massa-api-v1-AddToBootstrapWhitelistRequest) - [AddToBootstrapWhitelistResponse](#massa-api-v1-AddToBootstrapWhitelistResponse) - [AddToPeersWhitelistRequest](#massa-api-v1-AddToPeersWhitelistRequest) @@ -143,6 +145,31 @@ AddStakingSecretKeysResponse holds the response from AddStakingSecretKeys + + +### AddToBootstrapBlacklistRequest +AddToBootstrapBlacklistRequest holds the request for AddToBootstrapBlacklist + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ips | [string](#string) | repeated | IP addresses to add to bootstrap blacklist | + + + + + + + + +### AddToBootstrapBlacklistResponse +AddToBootstrapBlacklistResponse holds the response from AddToBootstrapBlacklist + + + + + + ### AddToBootstrapWhitelistRequest @@ -151,7 +178,7 @@ AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| ips | [string](#string) | repeated | IP addresses to add to peers whitelist | +| ips | [string](#string) | repeated | IP addresses to add to bootstrap whitelist | @@ -468,6 +495,7 @@ 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. | | 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 | diff --git a/proto/apis/massa/api/v1/private.proto b/proto/apis/massa/api/v1/private.proto index e8950d2..0770071 100644 --- a/proto/apis/massa/api/v1/private.proto +++ b/proto/apis/massa/api/v1/private.proto @@ -17,6 +17,14 @@ option swift_prefix = "MAPI"; // Massa private gRPC service service MassaPrivateService { + // Add IP addresses to node bootstrap whitelist. + rpc AddToBootstrapBlacklist(AddToBootstrapBlacklistRequest) returns (AddToBootstrapBlacklistResponse) { + option (google.api.http) = { + post: "/v1/add_to_boostrap_blacklist" + body: "*" + }; + } + // Add IP addresses to node bootstrap whitelist. rpc AddToBootstrapWhitelist(AddToBootstrapWhitelistRequest) returns (AddToBootstrapWhitelistResponse) { option (google.api.http) = { @@ -123,9 +131,18 @@ service MassaPrivateService { } } +// AddToBootstrapBlacklistRequest holds the request for AddToBootstrapBlacklist +message AddToBootstrapBlacklistRequest { + // IP addresses to add to bootstrap blacklist + repeated string ips = 1; +} + +// AddToBootstrapBlacklistResponse holds the response from AddToBootstrapBlacklist +message AddToBootstrapBlacklistResponse {} + // AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist message AddToBootstrapWhitelistRequest { - // IP addresses to add to peers whitelist + // IP addresses to add to bootstrap whitelist repeated string ips = 1; }