Disable json-rpc trace API's (#40)

Signed-off-by: Meredith Baxter <meredith.baxter@consensys.net>
pull/43/head
mbaxter 5 years ago committed by GitHub
parent 72941508c3
commit a16df352d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcMethodsFactory.java
  2. 8
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcApis.java

@ -74,7 +74,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.NetPeerCount;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.NetServices;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.NetVersion;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.RpcModules;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.TraceReplayBlockTransactions;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.TxPoolBesuStatistics;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.TxPoolBesuTransactions;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.Web3ClientVersion;
@ -338,19 +337,20 @@ public class JsonRpcMethodsFactory {
new AdminChangeLogLevel(parameter));
}
if (rpcApis.contains(RpcApis.TRACE)) {
addMethods(
enabledMethods,
new TraceReplayBlockTransactions(
parameter,
new BlockTracer(
new BlockReplay(
protocolSchedule,
blockchainQueries.getBlockchain(),
blockchainQueries.getWorldStateArchive())),
blockchainQueries,
protocolSchedule));
}
// Disable TRACE functionality while under development
// if (rpcApis.contains(RpcApis.TRACE)) {
// addMethods(
// enabledMethods,
// new TraceReplayBlockTransactions(
// parameter,
// new BlockTracer(
// new BlockReplay(
// protocolSchedule,
// blockchainQueries.getBlockchain(),
// blockchainQueries.getWorldStateArchive())),
// blockchainQueries,
// protocolSchedule));
// }
final boolean eea = rpcApis.contains(RpcApis.EEA);
final boolean priv = rpcApis.contains(RpcApis.PRIV);

@ -30,7 +30,8 @@ public class RpcApis {
public static final RpcApi EEA = new RpcApi("EEA");
public static final RpcApi PRIV = new RpcApi("PRIV");
public static final RpcApi TX_POOL = new RpcApi("TXPOOL");
public static final RpcApi TRACE = new RpcApi("TRACE");
// Disable TRACE functionality while under development
// public static final RpcApi TRACE = new RpcApi("TRACE");
public static final List<RpcApi> DEFAULT_JSON_RPC_APIS = Arrays.asList(ETH, NET, WEB3);
@ -55,8 +56,9 @@ public class RpcApis {
return Optional.of(PRIV);
} else if (name.equals(TX_POOL.getCliValue())) {
return Optional.of(TX_POOL);
} else if (name.equals(TRACE.getCliValue())) {
return Optional.of(TRACE);
// Disable TRACE functionality while under development
// } else if (name.equals(TRACE.getCliValue())) {
// return Optional.of(TRACE);
} else {
return Optional.empty();
}

Loading…
Cancel
Save