diff --git a/.changeset/unlucky-points-report.md b/.changeset/unlucky-points-report.md new file mode 100644 index 000000000..3f631da4e --- /dev/null +++ b/.changeset/unlucky-points-report.md @@ -0,0 +1,5 @@ +--- +'renterd': minor +--- + +Removed the min max collateral configuration setting. Closes https://github.com/SiaFoundation/renterd/issues/1079 diff --git a/apps/renterd/contexts/config/fields.tsx b/apps/renterd/contexts/config/fields.tsx index ed727108d..b2ed63344 100644 --- a/apps/renterd/contexts/config/fields.tsx +++ b/apps/renterd/contexts/config/fields.tsx @@ -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', diff --git a/apps/renterd/contexts/config/transform.spec.ts b/apps/renterd/contexts/config/transform.spec.ts index f9c588351..416cdac64 100644 --- a/apps/renterd/contexts/config/transform.spec.ts +++ b/apps/renterd/contexts/config/transform.spec.ts @@ -51,7 +51,6 @@ describe('tansforms', () => { maxStoragePrice: '210531181019', maxUploadPrice: '1000232323000000000000000000', minAccountExpiry: 86400000000000, - minMaxCollateral: '10000000000000000000000000', minMaxEphemeralAccountBalance: '1000000000000000000000000', minPriceTableValidity: 300000000000, migrationSurchargeMultiplier: 10, @@ -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), @@ -108,7 +106,6 @@ describe('tansforms', () => { maxStoragePrice: '210531181019', maxUploadPrice: '1000232323000000000000000000', minAccountExpiry: 86400000000000, - minMaxCollateral: '10000000000000000000000000', minMaxEphemeralAccountBalance: '1000000000000000000000000', minPriceTableValidity: 300000000000, migrationSurchargeMultiplier: 10, @@ -148,7 +145,6 @@ describe('tansforms', () => { maxStoragePrice: '210531181019', maxUploadPrice: '1000232323000000000000000000', minAccountExpiry: 86400000000000, - minMaxCollateral: '10000000000000000000000000', minMaxEphemeralAccountBalance: '1000000000000000000000000', minPriceTableValidity: 300000000000, migrationSurchargeMultiplier: 10, @@ -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), @@ -370,7 +365,6 @@ describe('tansforms', () => { maxStoragePrice: '210531181019', maxUploadPrice: '1000232323000000000000000000', minAccountExpiry: 86400000000000, - minMaxCollateral: '10000000000000000000000000', minMaxEphemeralAccountBalance: '1000000000000000000000000', minPriceTableValidity: 300000000000, migrationSurchargeMultiplier: 10, @@ -512,7 +506,6 @@ function buildAllResponses() { maxStoragePrice: '210531181019', maxUploadPrice: '1000232323000000000000000000', minAccountExpiry: 86400000000000, - minMaxCollateral: '10000000000000000000000000', minMaxEphemeralAccountBalance: '1000000000000000000000000', minPriceTableValidity: 300000000000, migrationSurchargeMultiplier: 10, diff --git a/apps/renterd/contexts/config/transform.ts b/apps/renterd/contexts/config/transform.ts index c6cebed00..f1edae708 100644 --- a/apps/renterd/contexts/config/transform.ts +++ b/apps/renterd/contexts/config/transform.ts @@ -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()) @@ -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) diff --git a/apps/renterd/contexts/config/types.ts b/apps/renterd/contexts/config/types.ts index 75b212eef..b48688d56 100644 --- a/apps/renterd/contexts/config/types.ts +++ b/apps/renterd/contexts/config/types.ts @@ -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, diff --git a/libs/react-renterd/src/siaTypes.ts b/libs/react-renterd/src/siaTypes.ts index 804361ac7..91bea33a3 100644 --- a/libs/react-renterd/src/siaTypes.ts +++ b/libs/react-renterd/src/siaTypes.ts @@ -128,7 +128,6 @@ export type GougingSettings = { maxUploadPrice: string maxContractPrice: string maxRPCPrice: string - minMaxCollateral: string hostBlockHeightLeeway: number minPriceTableValidity: number minAccountExpiry: number