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

fix: renterd remove min max collateral #533

Merged
merged 1 commit into from
Mar 21, 2024
Merged
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
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 configuration 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
Loading