Puts geth websocket and http on same port.

This commit is contained in:
benbierens 2023-04-21 09:57:52 +02:00
parent dc9577613f
commit f5a1be34c6
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
3 changed files with 2 additions and 5 deletions

View File

@ -42,7 +42,7 @@ namespace DistTestCore.Codex
Additional(companionNode); Additional(companionNode);
var ip = companionNode.RunningContainer.Pod.Ip; var ip = companionNode.RunningContainer.Pod.Ip;
var port = companionNode.RunningContainer.Recipe.GetPortByTag(GethContainerRecipe.WsPortTag).Number; var port = companionNode.RunningContainer.Recipe.GetPortByTag(GethContainerRecipe.HttpPortTag).Number;
AddEnvVar("ETH_PROVIDER", $"ws://{ip}:{port}"); AddEnvVar("ETH_PROVIDER", $"ws://{ip}:{port}");
AddEnvVar("ETH_ACCOUNT", companionNode.Account); AddEnvVar("ETH_ACCOUNT", companionNode.Account);

View File

@ -1,6 +1,5 @@
using KubernetesWorkflow; using KubernetesWorkflow;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Text;
namespace DistTestCore.Marketplace namespace DistTestCore.Marketplace
{ {

View File

@ -6,7 +6,6 @@ namespace DistTestCore.Marketplace
{ {
public const string DockerImage = "thatbenbierens/geth-confenv:latest"; public const string DockerImage = "thatbenbierens/geth-confenv:latest";
public const string HttpPortTag = "http_port"; public const string HttpPortTag = "http_port";
public const string WsPortTag = "ws_port";
public const string DiscoveryPortTag = "disc_port"; public const string DiscoveryPortTag = "disc_port";
public const string AccountFilename = "account_string.txt"; public const string AccountFilename = "account_string.txt";
public const string BootstrapPrivateKeyFilename = "bootstrap_private.key"; public const string BootstrapPrivateKeyFilename = "bootstrap_private.key";
@ -46,14 +45,13 @@ namespace DistTestCore.Marketplace
var port = AddInternalPort(); var port = AddInternalPort();
var authRpc = AddInternalPort(); var authRpc = AddInternalPort();
var httpPort = AddInternalPort(tag: HttpPortTag); var httpPort = AddInternalPort(tag: HttpPortTag);
var wsPort = AddInternalPort(tag: WsPortTag);
var bootPubKey = config.BootstrapNode.PubKey; var bootPubKey = config.BootstrapNode.PubKey;
var bootIp = config.BootstrapNode.RunningContainers.Containers[0].Pod.Ip; var bootIp = config.BootstrapNode.RunningContainers.Containers[0].Pod.Ip;
var bootPort = config.BootstrapNode.DiscoveryPort.Number; var bootPort = config.BootstrapNode.DiscoveryPort.Number;
var bootstrapArg = $"--bootnodes enode://{bootPubKey}@{bootIp}:{bootPort}"; var bootstrapArg = $"--bootnodes enode://{bootPubKey}@{bootIp}:{bootPort}";
return $"--port {port.Number} --discovery.port {discovery.Number} --authrpc.port {authRpc.Number} --http.port {httpPort.Number} --ws --ws.addr 0.0.0.0 --ws.port {wsPort.Number} {bootstrapArg}"; return $"--port {port.Number} --discovery.port {discovery.Number} --authrpc.port {authRpc.Number} --http.addr 0.0.0.0 --http.port {httpPort.Number} --ws --ws.addr 0.0.0.0 --ws.port {httpPort.Number} {bootstrapArg}";
} }
} }
} }