Skip to content

Commit

Permalink
refactor(renterd): remove allow redundant IPs setting
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Nov 21, 2024
1 parent 7e9720b commit b822630
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 34 deletions.
8 changes: 8 additions & 0 deletions .changeset/angry-dingos-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'renterd': minor
'@siafoundation/renterd-js': minor
'@siafoundation/renterd-react': minor
'@siafoundation/renterd-types': minor
---

Removed the allow redundant IPs setting.
1 change: 0 additions & 1 deletion apps/renterd-e2e/src/fixtures/configResetSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const configResetAllSettings = step(
await setSwitchByLabel(page, 'prune', false)

// hosts
await setSwitchByLabel(page, 'allowRedundantIPs', false)
await fillTextInputByName(page, 'maxDowntimeHours', '330')
await fillTextInputByName(page, 'maxConsecutiveScanFailures', '10')
await fillTextInputByName(page, 'minProtocolVersion', '1.6.0')
Expand Down
17 changes: 0 additions & 17 deletions apps/renterd/contexts/config/fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,23 +163,6 @@ export function getFields({
},

// hosts
allowRedundantIPs: {
type: 'boolean',
category: 'hosts',
title: 'Redundant IPs',
description: (
<>
Whether or not to allow forming contracts with multiple hosts in the
same IP subnet. The subnets used are /16 for IPv4, and /64 for IPv6.
</>
),
suggestion: advancedDefaults?.allowRedundantIPs,
suggestionTip: `Defaults to ${
advancedDefaults?.allowRedundantIPs ? 'on' : 'off'
}.`,
hidden: configViewMode === 'basic',
validation: {},
},
maxDowntimeHours: {
type: 'number',
category: 'hosts',
Expand Down
9 changes: 0 additions & 9 deletions apps/renterd/contexts/config/transform.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ describe('tansforms', () => {
uploadTBMonth: new BigNumber('0.79'),
storageTB: new BigNumber('1'),
prune: true,
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber('1440'),
maxConsecutiveScanFailures: new BigNumber('10'),
minProtocolVersion: '',
Expand Down Expand Up @@ -140,7 +139,6 @@ describe('tansforms', () => {
uploadTBMonth: new BigNumber('0.785714285714285714285714285714'),
storageTB: new BigNumber('1'),
prune: true,
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber('1440'),
maxConsecutiveScanFailures: new BigNumber('10'),
minProtocolVersion: '',
Expand All @@ -150,7 +148,6 @@ describe('tansforms', () => {
).toEqual({
enabled: true,
hosts: {
allowRedundantIPs: false,
maxDowntimeHours: 1440,
maxConsecutiveScanFailures: 10,
scoreOverrides: {},
Expand Down Expand Up @@ -181,7 +178,6 @@ describe('tansforms', () => {
uploadTBMonth: new BigNumber('0.785714285714285714285714285714'),
storageTB: new BigNumber('1'),
prune: true,
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber('1440'),
maxConsecutiveScanFailures: new BigNumber('10'),
minProtocolVersion: '1.7.0',
Expand All @@ -204,7 +200,6 @@ describe('tansforms', () => {
enabled: false,
hosts: {
foobar: 'value',
allowRedundantIPs: false,
maxDowntimeHours: 1440,
maxConsecutiveScanFailures: 10,
scoreOverrides: {},
Expand Down Expand Up @@ -236,7 +231,6 @@ describe('tansforms', () => {
uploadTBMonth: new BigNumber('0.785714285714285714285714285714'),
storageTB: new BigNumber('1'),
prune: true,
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber('1440'),
maxConsecutiveScanFailures: new BigNumber('10'),
minProtocolVersion: '1.7.0',
Expand All @@ -252,7 +246,6 @@ describe('tansforms', () => {
).toEqual({
enabled: true,
hosts: {
allowRedundantIPs: false,
maxDowntimeHours: 1440,
maxConsecutiveScanFailures: 10,
scoreOverrides: {},
Expand Down Expand Up @@ -285,7 +278,6 @@ describe('tansforms', () => {
uploadTBMonth: new BigNumber('0.785714285714285714285714285714'),
storageTB: new BigNumber('1'),
prune: true,
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber('1440'),
maxConsecutiveScanFailures: new BigNumber('10'),
minProtocolVersion: '1.7.0',
Expand Down Expand Up @@ -545,7 +537,6 @@ function buildAllResponses() {
autopilot: {
enabled: false,
hosts: {
allowRedundantIPs: false,
maxDowntimeHours: 1440,
maxConsecutiveScanFailures: 10,
scoreOverrides: {},
Expand Down
1 change: 0 additions & 1 deletion apps/renterd/contexts/config/transformDown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export function transformDownAutopilot(
storageTB,
prune,
// hosts
allowRedundantIPs: config.hosts.allowRedundantIPs,
maxDowntimeHours: new BigNumber(config.hosts.maxDowntimeHours),
maxConsecutiveScanFailures: new BigNumber(
config.hosts.maxConsecutiveScanFailures
Expand Down
1 change: 0 additions & 1 deletion apps/renterd/contexts/config/transformUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export function transformUpAutopilot(
...existingValues?.hosts,
maxDowntimeHours: v.maxDowntimeHours.toNumber(),
maxConsecutiveScanFailures: v.maxConsecutiveScanFailures.toNumber(),
allowRedundantIPs: v.allowRedundantIPs,
scoreOverrides: existingValues?.hosts.scoreOverrides || {},
minProtocolVersion: v.minProtocolVersion,
},
Expand Down
3 changes: 0 additions & 3 deletions apps/renterd/contexts/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const inputValuesAutopilot = {
storageTB: undefined as BigNumber | undefined,
prune: false,
// hosts
allowRedundantIPs: false,
maxDowntimeHours: undefined as BigNumber | undefined,
maxConsecutiveScanFailures: undefined as BigNumber | undefined,
minProtocolVersion: '',
Expand Down Expand Up @@ -135,7 +134,6 @@ export function getAdvancedDefaultsAutopilot(
periodWeeks: new BigNumber(6),
renewWindowWeeks: new BigNumber(2),
amountHosts: new BigNumber(50),
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber(336),
maxConsecutiveScanFailures: new BigNumber(10),
minProtocolVersion: '1.6.0',
Expand All @@ -145,7 +143,6 @@ export function getAdvancedDefaultsAutopilot(
periodWeeks: new BigNumber(6),
renewWindowWeeks: new BigNumber(2),
amountHosts: new BigNumber(12),
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber(336),
maxConsecutiveScanFailures: new BigNumber(10),
minProtocolVersion: '1.6.0',
Expand Down
1 change: 0 additions & 1 deletion apps/renterd/contexts/config/useAutopilotEvaluations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ export const valuesZeroDefaults: Values = {
uploadTBMonth: new BigNumber(0),
storageTB: new BigNumber(0),
prune: false,
allowRedundantIPs: false,
maxDowntimeHours: new BigNumber(0),
maxConsecutiveScanFailures: new BigNumber(0),
minProtocolVersion: '',
Expand Down
1 change: 0 additions & 1 deletion libs/renterd-types/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ export type SiacoinElement = {
}

export type AutopilotHostsConfig = {
allowRedundantIPs: boolean
scoreOverrides: { [key: PublicKey]: number }
maxDowntimeHours: number
maxConsecutiveScanFailures: number
Expand Down

0 comments on commit b822630

Please sign in to comment.