Skip to content

Commit

Permalink
feat: add AddToBootstrapWhitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef committed Jun 23, 2023
1 parent 0734f4e commit 4ec5b26
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.AddToBootstrapWhitelistRequest"><span class="badge">M</span>AddToBootstrapWhitelistRequest</a>
</li>

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

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



<h3 id="massa.api.v1.AddToBootstrapWhitelistRequest">AddToBootstrapWhitelistRequest</h3>
<p>AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist</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 peers whitelist </p></td>
</tr>

</tbody>
</table>





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





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

Expand Down Expand Up @@ -1021,11 +1060,18 @@ <h3 id="massa.api.v1.MassaPrivateService">MassaPrivateService</h3>
</thead>
<tbody>

<tr>
<td>AddToBootstrapWhitelist</td>
<td><a href="#massa.api.v1.AddToBootstrapWhitelistRequest">AddToBootstrapWhitelistRequest</a></td>
<td><a href="#massa.api.v1.AddToBootstrapWhitelistResponse">AddToBootstrapWhitelistResponse</a></td>
<td><p>Add IP addresses to node bootstrap whitelist.</p></td>
</tr>

<tr>
<td>AddToPeersWhitelist</td>
<td><a href="#massa.api.v1.AddToPeersWhitelistRequest">AddToPeersWhitelistRequest</a></td>
<td><a href="#massa.api.v1.AddToPeersWhitelistResponse">AddToPeersWhitelistResponse</a></td>
<td><p>Add IP address(es) to node peers whitelist. No confirmation to expect.
<td><p>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</p></td>
</tr>

Expand Down Expand Up @@ -1126,6 +1172,16 @@ <h4>Methods with HTTP bindings</h4>



<tr>
<td>AddToBootstrapWhitelist</td>
<td>POST</td>
<td>/v1/add_to_boostrap_whitelist</td>
<td>*</td>
</tr>




<tr>
<td>AddToPeersWhitelist</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)
- [AddToBootstrapWhitelistRequest](#massa-api-v1-AddToBootstrapWhitelistRequest)
- [AddToBootstrapWhitelistResponse](#massa-api-v1-AddToBootstrapWhitelistResponse)
- [AddToPeersWhitelistRequest](#massa-api-v1-AddToPeersWhitelistRequest)
- [AddToPeersWhitelistResponse](#massa-api-v1-AddToPeersWhitelistResponse)
- [GetBootstrapBlacklistRequest](#massa-api-v1-GetBootstrapBlacklistRequest)
Expand Down Expand Up @@ -141,6 +143,31 @@ AddStakingSecretKeysResponse holds the response from AddStakingSecretKeys



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

### AddToBootstrapWhitelistRequest
AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist


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






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

### AddToBootstrapWhitelistResponse
AddToBootstrapWhitelistResponse holds the response from AddToBootstrapWhitelist






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

### AddToPeersWhitelistRequest
Expand Down Expand Up @@ -441,7 +468,8 @@ Massa private gRPC service

| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| AddToPeersWhitelist | [AddToPeersWhitelistRequest](#massa-api-v1-AddToPeersWhitelistRequest) | [AddToPeersWhitelistResponse](#massa-api-v1-AddToPeersWhitelistResponse) | Add IP address(es) 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 |
| 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 |
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,7 +17,15 @@ option swift_prefix = "MAPI";

// Massa private gRPC service
service MassaPrivateService {
// Add IP address(es) to node peers whitelist. No confirmation to expect.
// Add IP addresses to node bootstrap whitelist.
rpc AddToBootstrapWhitelist(AddToBootstrapWhitelistRequest) returns (AddToBootstrapWhitelistResponse) {
option (google.api.http) = {
post: "/v1/add_to_boostrap_whitelist"
body: "*"
};
}

// 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
rpc AddToPeersWhitelist(AddToPeersWhitelistRequest) returns (AddToPeersWhitelistResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -115,6 +123,15 @@ service MassaPrivateService {
}
}

// AddToBootstrapWhitelistRequest holds the request for AddToBootstrapWhitelist
message AddToBootstrapWhitelistRequest {
// IP addresses to add to peers whitelist
repeated string ips = 1;
}

// AddToBootstrapWhitelistResponse holds the response from AddToBootstrapWhitelist
message AddToBootstrapWhitelistResponse {}

// AddToPeersWhitelistRequest holds the request for AddToPeersWhitelist
message AddToPeersWhitelistRequest {
// IP addresses to add to peers whitelist
Expand Down

0 comments on commit 4ec5b26

Please sign in to comment.