Skip to content

Commit 3a1b3d4

Browse files
committed
fix: renterd remove min max collateral
1 parent fa3f89e commit 3a1b3d4

File tree

6 files changed

+5
-26
lines changed

6 files changed

+5
-26
lines changed

.changeset/unlucky-points-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'renterd': minor
3+
---
4+
5+
Removed the min max collateral configuration setting. Closes https://github.com/SiaFoundation/renterd/issues/1079

apps/renterd/contexts/config/fields.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -492,21 +492,6 @@ export function getFields({
492492
}
493493
: {},
494494
},
495-
minMaxCollateral: {
496-
category: 'gouging',
497-
type: 'siacoin',
498-
title: 'Min max collateral',
499-
description: (
500-
<>The min value for max collateral in the host's price settings.</>
501-
),
502-
decimalsLimitSc: scDecimalPlaces,
503-
hidden: !showAdvanced,
504-
validation: showAdvanced
505-
? {
506-
required: 'required',
507-
}
508-
: {},
509-
},
510495
hostBlockHeightLeeway: {
511496
category: 'gouging',
512497
type: 'number',

apps/renterd/contexts/config/transform.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ describe('tansforms', () => {
5151
maxStoragePrice: '210531181019',
5252
maxUploadPrice: '1000232323000000000000000000',
5353
minAccountExpiry: 86400000000000,
54-
minMaxCollateral: '10000000000000000000000000',
5554
minMaxEphemeralAccountBalance: '1000000000000000000000000',
5655
minPriceTableValidity: 300000000000,
5756
migrationSurchargeMultiplier: 10,
@@ -83,7 +82,6 @@ describe('tansforms', () => {
8382
maxStoragePriceTBMonth: new BigNumber('909.494702'),
8483
maxUploadPriceTB: new BigNumber('1000.232323'),
8584
minAccountExpiryDays: new BigNumber(1),
86-
minMaxCollateral: new BigNumber('10'),
8785
minMaxEphemeralAccountBalance: new BigNumber('1'),
8886
minPriceTableValidityMinutes: new BigNumber(5),
8987
migrationSurchargeMultiplier: new BigNumber(10),
@@ -108,7 +106,6 @@ describe('tansforms', () => {
108106
maxStoragePrice: '210531181019',
109107
maxUploadPrice: '1000232323000000000000000000',
110108
minAccountExpiry: 86400000000000,
111-
minMaxCollateral: '10000000000000000000000000',
112109
minMaxEphemeralAccountBalance: '1000000000000000000000000',
113110
minPriceTableValidity: 300000000000,
114111
migrationSurchargeMultiplier: 10,
@@ -148,7 +145,6 @@ describe('tansforms', () => {
148145
maxStoragePrice: '210531181019',
149146
maxUploadPrice: '1000232323000000000000000000',
150147
minAccountExpiry: 86400000000000,
151-
minMaxCollateral: '10000000000000000000000000',
152148
minMaxEphemeralAccountBalance: '1000000000000000000000000',
153149
minPriceTableValidity: 300000000000,
154150
migrationSurchargeMultiplier: 10,
@@ -348,7 +344,6 @@ describe('tansforms', () => {
348344
maxStoragePriceTBMonth: new BigNumber('909.494702'),
349345
maxUploadPriceTB: new BigNumber('1000.232323'),
350346
minAccountExpiryDays: new BigNumber(1),
351-
minMaxCollateral: new BigNumber('10'),
352347
minMaxEphemeralAccountBalance: new BigNumber('1'),
353348
minPriceTableValidityMinutes: new BigNumber(5),
354349
minShards: new BigNumber(10),
@@ -370,7 +365,6 @@ describe('tansforms', () => {
370365
maxStoragePrice: '210531181019',
371366
maxUploadPrice: '1000232323000000000000000000',
372367
minAccountExpiry: 86400000000000,
373-
minMaxCollateral: '10000000000000000000000000',
374368
minMaxEphemeralAccountBalance: '1000000000000000000000000',
375369
minPriceTableValidity: 300000000000,
376370
migrationSurchargeMultiplier: 10,
@@ -512,7 +506,6 @@ function buildAllResponses() {
512506
maxStoragePrice: '210531181019',
513507
maxUploadPrice: '1000232323000000000000000000',
514508
minAccountExpiry: 86400000000000,
515-
minMaxCollateral: '10000000000000000000000000',
516509
minMaxEphemeralAccountBalance: '1000000000000000000000000',
517510
minPriceTableValidity: 300000000000,
518511
migrationSurchargeMultiplier: 10,

apps/renterd/contexts/config/transform.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ export function transformUpGouging(
136136
maxUploadPrice: toHastings(values.maxUploadPriceTB).toString(),
137137
maxDownloadPrice: toHastings(values.maxDownloadPriceTB).toString(),
138138
maxContractPrice: toHastings(values.maxContractPrice).toString(),
139-
minMaxCollateral: toHastings(values.minMaxCollateral).toString(),
140139
hostBlockHeightLeeway: Math.round(values.hostBlockHeightLeeway.toNumber()),
141140
minPriceTableValidity: Math.round(
142141
minutesInNanoseconds(values.minPriceTableValidityMinutes.toNumber())
@@ -278,7 +277,6 @@ export function transformDownGouging({
278277
maxRpcPriceMillion: toSiacoins(gouging.maxRPCPrice, scDecimalPlaces).times(
279278
1_000_000
280279
),
281-
minMaxCollateral: toSiacoins(gouging.minMaxCollateral, scDecimalPlaces),
282280
hostBlockHeightLeeway: new BigNumber(gouging.hostBlockHeightLeeway),
283281
minPriceTableValidityMinutes: new BigNumber(
284282
nanosecondsInMinutes(gouging.minPriceTableValidity)

apps/renterd/contexts/config/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const defaultGouging = {
3434
maxContractPrice: undefined as BigNumber | undefined,
3535
maxDownloadPriceTB: undefined as BigNumber | undefined,
3636
maxUploadPriceTB: undefined as BigNumber | undefined,
37-
minMaxCollateral: undefined as BigNumber | undefined,
3837
hostBlockHeightLeeway: undefined as BigNumber | undefined,
3938
minPriceTableValidityMinutes: undefined as BigNumber | undefined,
4039
minAccountExpiryDays: undefined as BigNumber | undefined,

libs/react-renterd/src/siaTypes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ export type GougingSettings = {
128128
maxUploadPrice: string
129129
maxContractPrice: string
130130
maxRPCPrice: string
131-
minMaxCollateral: string
132131
hostBlockHeightLeeway: number
133132
minPriceTableValidity: number
134133
minAccountExpiry: number

0 commit comments

Comments
 (0)