Skip to content

Commit

Permalink
Fix nethermind cli args typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Aug 16, 2023
1 parent 2858c80 commit f150732
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions packages/cli/test/sim/backup_eth_provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const node2 = await env.createNodePair({
// we have to replace the IP with the local ip to connect to the geth
beacon: {
type: BeaconClient.Lodestar,
options: {engineUrls: [replaceIpFromUrl(env.nodes[0].execution.engineRpPublicUrl, "127.0.0.1")]},
options: {engineUrls: [replaceIpFromUrl(env.nodes[0].execution.engineRpcPublicUrl, "127.0.0.1")]},
},
execution: ExecutionClient.Geth,
keysCount: 32,
Expand All @@ -79,7 +79,7 @@ const node3 = await env.createNodePair({
// we have to replace the IP with the local ip to connect to the geth
beacon: {
type: BeaconClient.Lodestar,
options: {engineUrls: [replaceIpFromUrl(env.nodes[0].execution.engineRpPublicUrl, "127.0.0.1")]},
options: {engineUrls: [replaceIpFromUrl(env.nodes[0].execution.engineRpcPublicUrl, "127.0.0.1")]},
},
execution: ExecutionClient.Geth,
keysCount: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class SimulationEnvironment {
const beaconOptions = typeof beacon === "object" ? beacon.options : {};
const engineUrls = [
// As lodestar is running on host machine, need to connect through local exposed ports
beaconType === BeaconClient.Lodestar ? executionNode.engineRpPublicUrl : executionNode.engineRpPrivateUrl,
beaconType === BeaconClient.Lodestar ? executionNode.engineRpcPublicUrl : executionNode.engineRpcPrivateUrl,
...(beaconOptions?.engineUrls ?? []),
];
const beaconNode = await createBeaconNode(beaconType, {
Expand Down
20 changes: 10 additions & 10 deletions packages/cli/test/utils/simulation/execution_clients/geth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export const generateGethNode: ExecutionNodeGenerator<ExecutionClient.Geth> = (o
"/data",
isDocker
);
const engineRpPublicUrl = `http://127.0.0.1:${ports.execution.enginePort}`;
const engineRpPrivateUrl = `http://${address}:${ports.execution.enginePort}`;
const ethRpPublicUrl = `http://127.0.0.1:${ports.execution.httpPort}`;
const ethRpPrivateUrl = `http://${address}:${ports.execution.httpPort}`;
const engineRpcPublicUrl = `http://127.0.0.1:${ports.execution.enginePort}`;
const engineRpcPrivateUrl = `http://${address}:${ports.execution.enginePort}`;
const ethRpcPublicUrl = `http://127.0.0.1:${ports.execution.httpPort}`;
const ethRpcPrivateUrl = `http://${address}:${ports.execution.httpPort}`;

const skPath = path.join(rootDir, "sk.json");
const skPathMounted = path.join(rootDirMounted, "sk.json");
Expand Down Expand Up @@ -153,7 +153,7 @@ export const generateGethNode: ExecutionNodeGenerator<ExecutionClient.Geth> = (o
},
health: async () => {
try {
await got.post(ethRpPublicUrl, {json: {jsonrpc: "2.0", method: "net_version", params: [], id: 67}});
await got.post(ethRpcPublicUrl, {json: {jsonrpc: "2.0", method: "net_version", params: [], id: 67}});
return {ok: true};
} catch (err) {
return {ok: false, reason: (err as Error).message, checkId: "JSON RPC query net_version"};
Expand All @@ -166,16 +166,16 @@ export const generateGethNode: ExecutionNodeGenerator<ExecutionClient.Geth> = (o
const provider = new Eth1ProviderWithAdmin(
{DEPOSIT_CONTRACT_ADDRESS: ZERO_HASH},
// To allow admin_* RPC methods had to add "ethRpcUrl"
{providerUrls: [ethRpPublicUrl, engineRpPublicUrl], jwtSecretHex: SHARED_JWT_SECRET}
{providerUrls: [ethRpcPublicUrl, engineRpcPublicUrl], jwtSecretHex: SHARED_JWT_SECRET}
);

return {
client: ExecutionClient.Geth,
id,
engineRpPublicUrl,
engineRpPrivateUrl,
ethRpPublicUrl,
ethRpPrivateUrl,
engineRpcPublicUrl,
engineRpcPrivateUrl,
ethRpcPublicUrl,
ethRpcPrivateUrl,
ttd,
jwtSecretHex: SHARED_JWT_SECRET,
provider,
Expand Down
16 changes: 8 additions & 8 deletions packages/cli/test/utils/simulation/execution_clients/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import {getNodePorts} from "../utils/ports.js";
export const generateMockNode: ExecutionNodeGenerator<ExecutionClient.Mock> = (opts, runner) => {
const {id, ttd, nodeIndex} = opts;
const ports = getNodePorts(nodeIndex);
const engineRpPublicUrl = `http://127.0.0.1:${ports.execution.enginePort}`;
const engineRpPrivateUrl = engineRpPublicUrl;
const ethRpPublicUrl = `http://127.0.0.1:${ports.execution.httpPort}`;
const ethRpPrivateUrl = ethRpPublicUrl;
const engineRpcPublicUrl = `http://127.0.0.1:${ports.execution.enginePort}`;
const engineRpcPrivateUrl = engineRpcPublicUrl;
const ethRpcPublicUrl = `http://127.0.0.1:${ports.execution.httpPort}`;
const ethRpcPrivateUrl = ethRpcPublicUrl;

const job = runner.create([]);

return {
client: ExecutionClient.Mock,
id,
engineRpPublicUrl,
engineRpPrivateUrl,
ethRpPublicUrl,
ethRpPrivateUrl,
engineRpcPublicUrl,
engineRpcPrivateUrl,
ethRpcPublicUrl,
ethRpcPrivateUrl,
ttd,
jwtSecretHex: SHARED_JWT_SECRET,
provider: null,
Expand Down
22 changes: 11 additions & 11 deletions packages/cli/test/utils/simulation/execution_clients/nethermind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const generateNethermindNode: ExecutionNodeGenerator<ExecutionClient.Neth

// Docker will be executed on entrypoint automatically
const binaryPath = "";
const engineRpPublicUrl = `http://127.0.0.1:${ports.execution.enginePort}`;
const engineRpPrivateUrl = `http://${address}:${ports.execution.enginePort}`;
const ethRpPublicUrl = `http://127.0.0.1:${ports.execution.httpPort}`;
const ethRpPrivateUrl = `http://${address}:${ports.execution.httpPort}`;
const engineRpcPublicUrl = `http://127.0.0.1:${ports.execution.enginePort}`;
const engineRpcPrivateUrl = `http://${address}:${ports.execution.enginePort}`;
const ethRpcPublicUrl = `http://127.0.0.1:${ports.execution.httpPort}`;
const ethRpcPrivateUrl = `http://${address}:${ports.execution.httpPort}`;

const chainSpecPath = path.join(rootDir, "chain.json");
const chainSpecContainerPath = path.join(rootDirMounted, "chain.json");
Expand Down Expand Up @@ -65,7 +65,7 @@ export const generateNethermindNode: ExecutionNodeGenerator<ExecutionClient.Neth
String(ports.execution.httpPort as number),
"--JsonRpc.EngineHost",
"0.0.0.0",
"--JsonRpc.ports.execution.enginePort",
"--JsonRpc.EnginePort",
String(ports.execution.enginePort as number),
"--JsonRpc.EngineEnabledModules",
"Admin,Eth,Subscribe,Trace,TxPool,Web3,Personal,Proof,Net,Parity,Health,Rpc,Debug",
Expand Down Expand Up @@ -102,7 +102,7 @@ export const generateNethermindNode: ExecutionNodeGenerator<ExecutionClient.Neth
},
health: async () => {
try {
await got.post(ethRpPublicUrl, {json: {jsonrpc: "2.0", method: "net_version", params: [], id: 67}});
await got.post(ethRpcPublicUrl, {json: {jsonrpc: "2.0", method: "net_version", params: [], id: 67}});
return {ok: true};
} catch (err) {
return {ok: false, reason: (err as Error).message, checkId: "JSON RPC query net_version"};
Expand All @@ -115,16 +115,16 @@ export const generateNethermindNode: ExecutionNodeGenerator<ExecutionClient.Neth
const provider = new Eth1ProviderWithAdmin(
{DEPOSIT_CONTRACT_ADDRESS: ZERO_HASH},
// To allow admin_* RPC methods had to add "ethRpcUrl"
{providerUrls: [ethRpPublicUrl, engineRpPublicUrl], jwtSecretHex: SHARED_JWT_SECRET}
{providerUrls: [ethRpcPublicUrl, engineRpcPublicUrl], jwtSecretHex: SHARED_JWT_SECRET}
);

return {
client: ExecutionClient.Nethermind,
id,
engineRpPublicUrl,
engineRpPrivateUrl,
ethRpPublicUrl,
ethRpPrivateUrl,
engineRpcPublicUrl,
engineRpcPrivateUrl,
ethRpcPublicUrl,
ethRpcPrivateUrl,
ttd,
jwtSecretHex: SHARED_JWT_SECRET,
provider,
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/test/utils/simulation/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,19 @@ export interface ExecutionNode<E extends ExecutionClient = ExecutionClient> {
/**
* Engine URL accessible form the host machine if the process is running in private network inside docker
*/
readonly engineRpPublicUrl: string;
readonly engineRpcPublicUrl: string;
/**
* Engine URL accessible within private network inside docker
*/
readonly engineRpPrivateUrl: string;
readonly engineRpcPrivateUrl: string;
/**
* RPC URL accessible form the host machine if the process is running in private network inside docker
*/
readonly ethRpPublicUrl: string;
readonly ethRpcPublicUrl: string;
/**
* RPC URL accessible within private network inside docker
*/
readonly ethRpPrivateUrl: string;
readonly ethRpcPrivateUrl: string;
readonly jwtSecretHex: string;
readonly provider: E extends ExecutionClient.Mock ? null : Eth1ProviderWithAdmin;
readonly job: Job;
Expand Down

0 comments on commit f150732

Please sign in to comment.