Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Only use authenticated endpoints during EE integration testing #3253

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions testing/execution_engine_integration/src/execution_engine.rs
Expand Up @@ -22,7 +22,6 @@ pub struct ExecutionEngine<E> {
engine: E,
#[allow(dead_code)]
datadir: TempDir,
http_port: u16,
http_auth_port: u16,
child: Child,
}
Expand All @@ -46,16 +45,11 @@ impl<E: GenericExecutionEngine> ExecutionEngine<E> {
Self {
engine,
datadir,
http_port,
http_auth_port,
child,
}
}

pub fn http_url(&self) -> SensitiveUrl {
SensitiveUrl::parse(&format!("http://127.0.0.1:{}", self.http_port)).unwrap()
}

pub fn http_auth_url(&self) -> SensitiveUrl {
SensitiveUrl::parse(&format!("http://127.0.0.1:{}", self.http_auth_port)).unwrap()
}
Expand Down
2 changes: 1 addition & 1 deletion testing/execution_engine_integration/src/main.rs
Expand Up @@ -15,7 +15,7 @@ use nethermind::NethermindEngine;
use test_rig::TestRig;

/// Set to `false` to send logs to the console during tests. Logs are useful when debugging.
const SUPPRESS_LOGS: bool = true;
const SUPPRESS_LOGS: bool = false;

fn main() {
if cfg!(windows) {
Expand Down
9 changes: 6 additions & 3 deletions testing/execution_engine_integration/src/nethermind.rs
Expand Up @@ -75,7 +75,7 @@ impl GenericExecutionEngine for NethermindEngine {

fn start_client(
datadir: &TempDir,
http_port: u16,
_http_port: u16,
http_auth_port: u16,
jwt_secret_path: PathBuf,
) -> Child {
Expand All @@ -89,11 +89,14 @@ impl GenericExecutionEngine for NethermindEngine {
.arg("--Merge.TerminalTotalDifficulty")
.arg("0")
.arg("--JsonRpc.AdditionalRpcUrls")
.arg(format!("http://localhost:{}|http;ws|net;eth;subscribe;engine;web3;client|no-auth,http://localhost:{}|http;ws|net;eth;subscribe;engine;web3;client", http_port, http_auth_port))
.arg(format!(
"http://localhost:{}|http;ws|net;eth;subscribe;engine;web3;client",
http_auth_port
))
.arg("--JsonRpc.EnabledModules")
.arg("net,eth,subscribe,web3,admin,engine")
.arg("--JsonRpc.Port")
.arg(http_port.to_string())
.arg(http_auth_port.to_string())
.arg("--Network.DiscoveryPort")
.arg(network_port.to_string())
.arg("--Network.P2PPort")
Expand Down
2 changes: 1 addition & 1 deletion testing/execution_engine_integration/src/test_rig.rs
Expand Up @@ -68,7 +68,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {

let ee_b = {
let execution_engine = ExecutionEngine::new(generic_engine);
let urls = vec![execution_engine.http_url()];
let urls = vec![execution_engine.http_auth_url()];

let config = execution_layer::Config {
execution_endpoints: urls,
Expand Down