mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-06 22:13:59 -05:00
Chore!: Removed Deprecated --host-whitelist option (#8012)
* Chore:Removed Deprecated --host-whitelist option * chore: Update everything_config.toml and Updated upcoming Breaking Change in CHANGELOG.md file Signed-off-by: Preeti <35308865+pr9t@users.noreply.github.com> --------- Signed-off-by: Preeti <35308865+pr9t@users.noreply.github.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
## Unreleased
|
||||
|
||||
### Breaking Changes
|
||||
- `--host-whitelist` has been deprecated since 2020 and its related option will be removed in a future release.
|
||||
|
||||
### Upcoming Breaking Changes
|
||||
- Plugin API will be deprecating the BesuContext interface to be replaced with the ServiceManager interface.
|
||||
@@ -15,6 +16,8 @@
|
||||
- Proof of Work consensus
|
||||
- Fast Sync
|
||||
|
||||
|
||||
|
||||
### Additions and Improvements
|
||||
- Retrieve all transaction receipts for a block in one request [#6646](https://github.com/hyperledger/besu/pull/6646)
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ services:
|
||||
- --rpc-ws-enabled
|
||||
- --rpc-ws-apis=admin,eth,miner,web3,net,priv,eea
|
||||
- --rpc-ws-host=0.0.0.0
|
||||
- --host-whitelist=*
|
||||
- --host-allowlist=*
|
||||
- --graphql-http-enabled
|
||||
- --discovery-enabled=false
|
||||
- --privacy-enabled=true
|
||||
@@ -84,7 +84,7 @@ services:
|
||||
- --rpc-ws-enabled
|
||||
- --rpc-ws-apis=admin,eth,miner,web3,net,priv,eea
|
||||
- --rpc-ws-host=0.0.0.0
|
||||
- --host-whitelist=*
|
||||
- --host-allowlist=*
|
||||
- --graphql-http-enabled
|
||||
- --discovery-enabled=false
|
||||
- --privacy-enabled=true
|
||||
|
||||
@@ -610,14 +610,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
|
||||
defaultValue = "localhost,127.0.0.1")
|
||||
private final JsonRPCAllowlistHostsProperty hostsAllowlist = new JsonRPCAllowlistHostsProperty();
|
||||
|
||||
@Option(
|
||||
names = {"--host-whitelist"},
|
||||
hidden = true,
|
||||
paramLabel = "<hostname>[,<hostname>...]... or * or all",
|
||||
description =
|
||||
"Deprecated in favor of --host-allowlist. Comma separated list of hostnames to allow for RPC access, or * to accept any host (default: ${DEFAULT-VALUE})")
|
||||
private final JsonRPCAllowlistHostsProperty hostsWhitelist = new JsonRPCAllowlistHostsProperty();
|
||||
|
||||
@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"})
|
||||
@Option(
|
||||
names = {"--color-enabled"},
|
||||
@@ -1701,15 +1693,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
|
||||
unstableIpcOptions.getRpcIpcApis());
|
||||
inProcessRpcConfiguration = inProcessRpcOptions.toDomainObject();
|
||||
dataStorageConfiguration = getDataStorageConfiguration();
|
||||
// hostsWhitelist is a hidden option. If it is specified, add the list to hostAllowlist
|
||||
if (!hostsWhitelist.isEmpty()) {
|
||||
// if allowlist == default values, remove the default values
|
||||
if (hostsAllowlist.size() == 2
|
||||
&& hostsAllowlist.containsAll(List.of("localhost", "127.0.0.1"))) {
|
||||
hostsAllowlist.removeAll(List.of("localhost", "127.0.0.1"));
|
||||
}
|
||||
hostsAllowlist.addAll(hostsWhitelist);
|
||||
}
|
||||
|
||||
permissioningConfiguration = permissioningConfiguration();
|
||||
staticNodes = loadStaticNodes();
|
||||
|
||||
@@ -23,24 +23,6 @@ import org.mockito.Mockito;
|
||||
|
||||
public class HostAllowlistOptionsTest extends CommandTestAbstract {
|
||||
|
||||
/** test deprecated CLI option * */
|
||||
@Deprecated
|
||||
@Test
|
||||
public void rpcHttpHostWhitelistAcceptsSingleArgument() {
|
||||
parseCommand("--host-whitelist", "a");
|
||||
|
||||
verify(mockRunnerBuilder).jsonRpcConfiguration(jsonRpcConfigArgumentCaptor.capture());
|
||||
verify(mockRunnerBuilder).build();
|
||||
|
||||
assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist().size()).isEqualTo(1);
|
||||
assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist()).contains("a");
|
||||
assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist())
|
||||
.doesNotContain("localhost");
|
||||
|
||||
assertThat(commandOutput.toString(UTF_8)).isEmpty();
|
||||
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rpcHttpHostAllowlistAcceptsSingleArgument() {
|
||||
parseCommand("--host-allowlist", "a");
|
||||
@@ -89,23 +71,6 @@ public class HostAllowlistOptionsTest extends CommandTestAbstract {
|
||||
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Test
|
||||
public void rpcHttpHostWhitelistAllowlistAcceptsMultipleFlags() {
|
||||
parseCommand("--host-whitelist=a", "--host-allowlist=b");
|
||||
|
||||
verify(mockRunnerBuilder).jsonRpcConfiguration(jsonRpcConfigArgumentCaptor.capture());
|
||||
verify(mockRunnerBuilder).build();
|
||||
|
||||
assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist().size()).isEqualTo(2);
|
||||
assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist()).contains("a", "b");
|
||||
assertThat(jsonRpcConfigArgumentCaptor.getValue().getHostsAllowlist())
|
||||
.doesNotContain("*", "localhost");
|
||||
|
||||
assertThat(commandOutput.toString(UTF_8)).isEmpty();
|
||||
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rpcHttpHostAllowlistAcceptsMultipleFlags() {
|
||||
parseCommand("--host-allowlist=a", "--host-allowlist=b");
|
||||
|
||||
@@ -44,7 +44,6 @@ max-peers=42
|
||||
remote-connections-limit-enabled=true
|
||||
remote-connections-max-percentage=60
|
||||
random-peer-priority-enabled=false
|
||||
host-whitelist=["all"]
|
||||
host-allowlist=["all"]
|
||||
engine-host-allowlist=["all"]
|
||||
engine-rpc-enabled=true
|
||||
|
||||
Reference in New Issue
Block a user