Skip to content

Commit

Permalink
feat: add AddToBootstrapBlacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef committed Jun 23, 2023
1 parent 4ec5b26 commit d69cff6
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 3 deletions.
58 changes: 57 additions & 1 deletion doc/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ <h2>Table of Contents</h2>
<a href="#massa.api.v1.AddStakingSecretKeysResponse"><span class="badge">M</span>AddStakingSecretKeysResponse</a>
</li>

<li>
<a href="#massa.api.v1.AddToBootstrapBlacklistRequest"><span class="badge">M</span>AddToBootstrapBlacklistRequest</a>
</li>

<li>
<a href="#massa.api.v1.AddToBootstrapBlacklistResponse"><span class="badge">M</span>AddToBootstrapBlacklistResponse</a>
</li>

<li>
<a href="#massa.api.v1.AddToBootstrapWhitelistRequest"><span class="badge">M</span>AddToBootstrapWhitelistRequest</a>
</li>
Expand Down Expand Up @@ -626,6 +634,37 @@ <h3 id="massa.api.v1.AddStakingSecretKeysResponse">AddStakingSecretKeysResponse<



<h3 id="massa.api.v1.AddToBootstrapBlacklistRequest">AddToBootstrapBlacklistRequest</h3>
<p>AddToBootstrapBlacklistRequest holds the request for AddToBootstrapBlacklist</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>ips</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
<td><p>IP addresses to add to bootstrap blacklist </p></td>
</tr>

</tbody>
</table>





<h3 id="massa.api.v1.AddToBootstrapBlacklistResponse">AddToBootstrapBlacklistResponse</h3>
<p>AddToBootstrapBlacklistResponse holds the response from AddToBootstrapBlacklist</p>





<h3 id="massa.api.v1.AddToBootstrapWhitelistRequest">AddToBootstrapWhitelistRequest</h3>
<p>AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist</p>

Expand All @@ -640,7 +679,7 @@ <h3 id="massa.api.v1.AddToBootstrapWhitelistRequest">AddToBootstrapWhitelistRequ
<td>ips</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
<td><p>IP addresses to add to peers whitelist </p></td>
<td><p>IP addresses to add to bootstrap whitelist </p></td>
</tr>

</tbody>
Expand Down Expand Up @@ -1060,6 +1099,13 @@ <h3 id="massa.api.v1.MassaPrivateService">MassaPrivateService</h3>
</thead>
<tbody>

<tr>
<td>AddToBootstrapBlacklist</td>
<td><a href="#massa.api.v1.AddToBootstrapBlacklistRequest">AddToBootstrapBlacklistRequest</a></td>
<td><a href="#massa.api.v1.AddToBootstrapBlacklistResponse">AddToBootstrapBlacklistResponse</a></td>
<td><p>Add IP addresses to node bootstrap whitelist.</p></td>
</tr>

<tr>
<td>AddToBootstrapWhitelist</td>
<td><a href="#massa.api.v1.AddToBootstrapWhitelistRequest">AddToBootstrapWhitelistRequest</a></td>
Expand Down Expand Up @@ -1172,6 +1218,16 @@ <h4>Methods with HTTP bindings</h4>



<tr>
<td>AddToBootstrapBlacklist</td>
<td>POST</td>
<td>/v1/add_to_boostrap_blacklist</td>
<td>*</td>
</tr>




<tr>
<td>AddToBootstrapWhitelist</td>
<td>POST</td>
Expand Down
30 changes: 29 additions & 1 deletion doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -143,6 +145,31 @@ AddStakingSecretKeysResponse holds the response from AddStakingSecretKeys



<a name="massa-api-v1-AddToBootstrapBlacklistRequest"></a>

### AddToBootstrapBlacklistRequest
AddToBootstrapBlacklistRequest holds the request for AddToBootstrapBlacklist


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| ips | [string](#string) | repeated | IP addresses to add to bootstrap blacklist |






<a name="massa-api-v1-AddToBootstrapBlacklistResponse"></a>

### AddToBootstrapBlacklistResponse
AddToBootstrapBlacklistResponse holds the response from AddToBootstrapBlacklist






<a name="massa-api-v1-AddToBootstrapWhitelistRequest"></a>

### AddToBootstrapWhitelistRequest
Expand All @@ -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 |



Expand Down Expand Up @@ -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 |
Expand Down
19 changes: 18 additions & 1 deletion proto/apis/massa/api/v1/private.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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) = {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d69cff6

Please sign in to comment.