Skip to content

Commit

Permalink
fix: hostd remove max registry size
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Jan 31, 2024
1 parent 7d191f0 commit 1479d3b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 34 deletions.
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.
18 changes: 0 additions & 18 deletions apps/hostd/contexts/config/fields.tsx
Original file line number Diff line number Diff line change
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

0 comments on commit 1479d3b

Please sign in to comment.