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: hostd remove max registry size #478

Merged
merged 1 commit into from
Jan 31, 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
6 changes: 6 additions & 0 deletions .changeset/red-phones-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'hostd': minor
'@siafoundation/react-hostd': minor
---

Removed the maximum registry size configuration option.
20 changes: 1 addition & 19 deletions apps/hostd/contexts/config/fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { dnsProviderOptions, initialValues, scDecimalPlaces } from './types'
import { SiaCentralExchangeRates } from '@siafoundation/sia-central'
import { calculateMaxCollateral } from './transform'

type Categories = 'host' | 'pricing' | 'DNS' | 'bandwidth' | 'registry' | 'RHP3'
type Categories = 'host' | 'pricing' | 'DNS' | 'bandwidth' | 'RHP3'

type GetFields = {
showAdvanced: boolean
Expand Down Expand Up @@ -201,24 +201,6 @@ export function getFields({
},
},

// Registry
maxRegistryEntries: {
title: 'Maximum registry size',
type: 'number',
category: 'registry',
units: 'entries',
suggestion: new BigNumber(1_000),
suggestionTip: 'The suggested maximum registry size.',
decimalsLimit: 0,
description: (
<>{`The maximum number of registry entries that the host will store. Each registry entry is up to 113 bytes.`}</>
),
hidden: !showAdvanced,
validation: {
required: 'required',
},
},

// RHP3 settings
accountExpiry: {
title: 'Expiry',
Expand Down
4 changes: 0 additions & 4 deletions apps/hostd/contexts/config/transform.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ describe('data transforms', () => {
egressPrice: '227373675443232',
ingressPrice: '9094947017729',
priceTableValidity: 1800000000000,
maxRegistryEntries: 100000,
accountExpiry: 2592000000000000,
maxAccountBalance: '10000000000000000000000000',
ingressLimit: 0,
Expand Down Expand Up @@ -49,7 +48,6 @@ describe('data transforms', () => {
egressPrice: new BigNumber('227.373675'),
ingressPrice: new BigNumber('9.094947'),
priceTableValidity: new BigNumber('30'),
maxRegistryEntries: new BigNumber('100000'),
accountExpiry: new BigNumber('30'),
maxAccountBalance: new BigNumber('10'),
ingressLimit: new BigNumber('0'),
Expand Down Expand Up @@ -79,7 +77,6 @@ describe('data transforms', () => {
egressPrice: new BigNumber('250'),
ingressPrice: new BigNumber('10'),
priceTableValidity: new BigNumber('30'),
maxRegistryEntries: new BigNumber('100000'),
accountExpiry: new BigNumber('30'),
maxAccountBalance: new BigNumber('10'),
ingressLimit: new BigNumber('0'),
Expand Down Expand Up @@ -120,7 +117,6 @@ describe('data transforms', () => {
egressPrice: '250000000000000',
ingressPrice: '10000000000000',
priceTableValidity: 1800000000000,
maxRegistryEntries: 100000,
accountExpiry: 2592000000000000,
maxAccountBalance: '10000000000000000000000000',
ingressLimit: 0,
Expand Down
6 changes: 0 additions & 6 deletions apps/hostd/contexts/config/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ export function transformUp(
.toFixed(0)
),

// Registry settings
maxRegistryEntries: Number(values.maxRegistryEntries.toFixed(0)),

// RHP3 settings
accountExpiry: Number(
values.accountExpiry
Expand Down Expand Up @@ -202,9 +199,6 @@ export function transformDown({
.div(1_000_000_000) // nanoseconds to seconds
.div(60), // seconds to minutes

// Registry settings
maxRegistryEntries: new BigNumber(settings.maxRegistryEntries),

// RHP3 settings
accountExpiry: new BigNumber(settings.accountExpiry)
.div(1_000_000_000) // nanoseconds to seconds
Expand Down
3 changes: 0 additions & 3 deletions apps/hostd/contexts/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ export const initialValues = {

priceTableValidity: undefined as BigNumber | undefined,

// Registry settings
maxRegistryEntries: undefined as BigNumber | undefined,

// RHP3 settings
accountExpiry: undefined as BigNumber | undefined,
maxAccountBalance: undefined as BigNumber | undefined,
Expand Down
3 changes: 0 additions & 3 deletions libs/react-hostd/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,6 @@ export type HostSettings = {

priceTableValidity: number

// Registry settings
maxRegistryEntries: number

// RHP3 settings
accountExpiry: number
maxAccountBalance: Currency
Expand Down
Loading