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

feat: for v0.59.x or greater set the internal IP address to 127.0.0.1 to avoid an ISS, in config.txt #1162

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/config/local_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class LocalConfig implements LocalConfigData {
title: 'Prompt local configuration',
skip: this.skipPromptTask,
task: async (_: any, task: SoloListrTaskWrapper<any>): Promise<void> => {
if (self.configFileExists) {
if (self.configFileExists()) {
self.configManager.setFlag(flags.userEmailAddress, self.userEmailAddress);
}

Expand Down
31 changes: 28 additions & 3 deletions src/core/profile_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import type {AnyObject, DirPath, NodeAlias, NodeAliases, Path} from '../types/al
import type {Optional} from '../types/index.js';
import {inject, injectable} from 'tsyringe-neo';
import {patchInject} from './container_helper.js';
import {HEDERA_PLATFORM_VERSION} from '../../version.js';
import * as versions from '../../version.js';

@injectable()
export class ProfileManager {
Expand Down Expand Up @@ -473,7 +473,7 @@ export class ProfileManager {
throw new MissingArgumentError('nodeAccountMap the map of node IDs to account IDs is required');
}

if (!releaseTag) releaseTag = HEDERA_PLATFORM_VERSION;
if (!releaseTag) releaseTag = versions.HEDERA_PLATFORM_VERSION;

if (!fs.existsSync(destPath)) {
throw new IllegalArgumentError(`config destPath does not exist: ${destPath}`, destPath);
Expand All @@ -494,7 +494,32 @@ export class ProfileManager {

let nodeSeq = 0;
for (const nodeAlias of nodeAccountMap.keys()) {
const internalIP = Templates.renderFullyQualifiedNetworkPodName(namespace, nodeAlias);
let internalIP: string;

//? Explanation: for v0.59.x the internal IP address is set to 127.0.0.1 to avoid an ISS

// for versions that satisfy 0.59.x
if (semver.satisfies(releaseVersion, '^0.59.0', {includePrerelease: true})) {
internalIP = '127.0.0.1';
}

// versions less than 0.59.0
else if (
semver.lt(
releaseVersion,
'0.59.0',
// @ts-expect-error TS2353: Object literal may only specify known properties
{includePrerelease: true},
)
) {
internalIP = Templates.renderFullyQualifiedNetworkPodName(namespace, nodeAlias);
}

// versions greater than 0.59.0
else {
internalIP = '127.0.0.1';
}

const externalIP = Templates.renderFullyQualifiedNetworkSvcName(namespace, nodeAlias);
const account = nodeAccountMap.get(nodeAlias);

Expand Down
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

export const HELM_VERSION = 'v3.14.2';
export const SOLO_CHART_VERSION = '0.42.4';
export const HEDERA_PLATFORM_VERSION = 'v0.58.3';
export const HEDERA_PLATFORM_VERSION = 'v0.59.0-main.x5322bdc';
export const MIRROR_NODE_VERSION = '0.120.1';
export const HEDERA_EXPLORER_VERSION = '0.2.1';
export const HEDERA_JSON_RPC_RELAY_VERSION = 'v0.63.2';
Loading