Skip to content

Commit

Permalink
fix: renterd remove min max collateral
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Mar 21, 2024
1 parent fa3f89e commit 1997a0f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-points-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

Removed the min max collateral configuaration setting. Closes https://github.com/SiaFoundation/renterd/issues/1079
15 changes: 0 additions & 15 deletions apps/renterd/contexts/config/fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -492,21 +492,6 @@ export function getFields({
}
: {},
},
minMaxCollateral: {
category: 'gouging',
type: 'siacoin',
title: 'Min max collateral',
description: (
<>The min value for max collateral in the host's price settings.</>
),
decimalsLimitSc: scDecimalPlaces,
hidden: !showAdvanced,
validation: showAdvanced
? {
required: 'required',
}
: {},
},
hostBlockHeightLeeway: {
category: 'gouging',
type: 'number',
Expand Down
7 changes: 0 additions & 7 deletions apps/renterd/contexts/config/transform.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe('tansforms', () => {
maxStoragePrice: '210531181019',
maxUploadPrice: '1000232323000000000000000000',
minAccountExpiry: 86400000000000,
minMaxCollateral: '10000000000000000000000000',
minMaxEphemeralAccountBalance: '1000000000000000000000000',
minPriceTableValidity: 300000000000,
migrationSurchargeMultiplier: 10,
Expand Down Expand Up @@ -83,7 +82,6 @@ describe('tansforms', () => {
maxStoragePriceTBMonth: new BigNumber('909.494702'),
maxUploadPriceTB: new BigNumber('1000.232323'),
minAccountExpiryDays: new BigNumber(1),
minMaxCollateral: new BigNumber('10'),
minMaxEphemeralAccountBalance: new BigNumber('1'),
minPriceTableValidityMinutes: new BigNumber(5),
migrationSurchargeMultiplier: new BigNumber(10),
Expand All @@ -108,7 +106,6 @@ describe('tansforms', () => {
maxStoragePrice: '210531181019',
maxUploadPrice: '1000232323000000000000000000',
minAccountExpiry: 86400000000000,
minMaxCollateral: '10000000000000000000000000',
minMaxEphemeralAccountBalance: '1000000000000000000000000',
minPriceTableValidity: 300000000000,
migrationSurchargeMultiplier: 10,
Expand Down Expand Up @@ -148,7 +145,6 @@ describe('tansforms', () => {
maxStoragePrice: '210531181019',
maxUploadPrice: '1000232323000000000000000000',
minAccountExpiry: 86400000000000,
minMaxCollateral: '10000000000000000000000000',
minMaxEphemeralAccountBalance: '1000000000000000000000000',
minPriceTableValidity: 300000000000,
migrationSurchargeMultiplier: 10,
Expand Down Expand Up @@ -348,7 +344,6 @@ describe('tansforms', () => {
maxStoragePriceTBMonth: new BigNumber('909.494702'),
maxUploadPriceTB: new BigNumber('1000.232323'),
minAccountExpiryDays: new BigNumber(1),
minMaxCollateral: new BigNumber('10'),
minMaxEphemeralAccountBalance: new BigNumber('1'),
minPriceTableValidityMinutes: new BigNumber(5),
minShards: new BigNumber(10),
Expand All @@ -370,7 +365,6 @@ describe('tansforms', () => {
maxStoragePrice: '210531181019',
maxUploadPrice: '1000232323000000000000000000',
minAccountExpiry: 86400000000000,
minMaxCollateral: '10000000000000000000000000',
minMaxEphemeralAccountBalance: '1000000000000000000000000',
minPriceTableValidity: 300000000000,
migrationSurchargeMultiplier: 10,
Expand Down Expand Up @@ -512,7 +506,6 @@ function buildAllResponses() {
maxStoragePrice: '210531181019',
maxUploadPrice: '1000232323000000000000000000',
minAccountExpiry: 86400000000000,
minMaxCollateral: '10000000000000000000000000',
minMaxEphemeralAccountBalance: '1000000000000000000000000',
minPriceTableValidity: 300000000000,
migrationSurchargeMultiplier: 10,
Expand Down
2 changes: 0 additions & 2 deletions apps/renterd/contexts/config/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export function transformUpGouging(
maxUploadPrice: toHastings(values.maxUploadPriceTB).toString(),
maxDownloadPrice: toHastings(values.maxDownloadPriceTB).toString(),
maxContractPrice: toHastings(values.maxContractPrice).toString(),
minMaxCollateral: toHastings(values.minMaxCollateral).toString(),
hostBlockHeightLeeway: Math.round(values.hostBlockHeightLeeway.toNumber()),
minPriceTableValidity: Math.round(
minutesInNanoseconds(values.minPriceTableValidityMinutes.toNumber())
Expand Down Expand Up @@ -278,7 +277,6 @@ export function transformDownGouging({
maxRpcPriceMillion: toSiacoins(gouging.maxRPCPrice, scDecimalPlaces).times(
1_000_000
),
minMaxCollateral: toSiacoins(gouging.minMaxCollateral, scDecimalPlaces),
hostBlockHeightLeeway: new BigNumber(gouging.hostBlockHeightLeeway),
minPriceTableValidityMinutes: new BigNumber(
nanosecondsInMinutes(gouging.minPriceTableValidity)
Expand Down
1 change: 0 additions & 1 deletion apps/renterd/contexts/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const defaultGouging = {
maxContractPrice: undefined as BigNumber | undefined,
maxDownloadPriceTB: undefined as BigNumber | undefined,
maxUploadPriceTB: undefined as BigNumber | undefined,
minMaxCollateral: undefined as BigNumber | undefined,
hostBlockHeightLeeway: undefined as BigNumber | undefined,
minPriceTableValidityMinutes: undefined as BigNumber | undefined,
minAccountExpiryDays: undefined as BigNumber | undefined,
Expand Down
1 change: 0 additions & 1 deletion libs/react-renterd/src/siaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export type GougingSettings = {
maxUploadPrice: string
maxContractPrice: string
maxRPCPrice: string
minMaxCollateral: string
hostBlockHeightLeeway: number
minPriceTableValidity: number
minAccountExpiry: number
Expand Down

0 comments on commit 1997a0f

Please sign in to comment.