Skip to content

Commit

Permalink
Simplify default engine RPC config
Browse files Browse the repository at this point in the history
Signed-off-by: Wetitpig <[email protected]>
  • Loading branch information
Wetitpig committed Dec 8, 2023
1 parent 7f1f44c commit 91e804c
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class JsonRpcConfiguration extends HttpConfiguration {
public static final int DEFAULT_ENGINE_JSON_RPC_PORT = 8551;
private static final List<String> DEFAULT_HOST_ALLOWLIST =
Arrays.asList("localhost", "127.0.0.1");
private static final List<String> DEFAULT_ENGINE_RPC_APIS = Arrays.asList("ENGINE", "ETH");
public static final int DEFAULT_MAX_ACTIVE_CONNECTIONS = 80;
public static final int DEFAULT_MAX_BATCH_SIZE = 1024;
public static final long DEFAULT_MAX_REQUEST_CONTENT_LENGTH = 5 * 1024 * 1024; // 5MB
Expand Down Expand Up @@ -72,12 +73,8 @@ public static JsonRpcConfiguration createDefault() {

public static JsonRpcConfiguration createEngineDefault() {
final JsonRpcConfiguration config = createDefault();
config.setEnabled(false);
config.setPort(DEFAULT_ENGINE_JSON_RPC_PORT);
List<String> engineMethodGroup = new ArrayList<>(2);
engineMethodGroup.add(RpcApis.ENGINE.name());
engineMethodGroup.add(RpcApis.ETH.name());
config.setRpcApis(engineMethodGroup);
config.setRpcApis(DEFAULT_ENGINE_RPC_APIS);
config.setAuthenticationEnabled(true);
config.setAuthenticationAlgorithm(JwtAlgorithm.HS256);
config.setAuthenticationPublicKeyFile(null); // ephemeral key will be generated on startup.
Expand Down

0 comments on commit 91e804c

Please sign in to comment.