siafoundation / hostd Goto Github PK
View Code? Open in Web Editor NEWThe next-generation of Sia storage providing software. More performant. More stable. Support for larger nodes.
Home Page: https://sia.tech/software/hostd
License: MIT License
The next-generation of Sia storage providing software. More performant. More stable. Support for larger nodes.
Home Page: https://sia.tech/software/hostd
License: MIT License
Add an embedded web UI. Requires #1
The move from internal/mux
to core/mux
broke the registry subscription RPC. core/mux
will need changes before it can be readded.
when I hit the browser refresh button, the page refreshes to home but the URL still says whatever page you were at before you hit refresh.
Hitting refresh should show you the same page your are currently on.you
clicked on config
then clicked on the refresh button on the chrome browser.
URL says config but the home page is displayed. (see above image)
0.1.0 Alpha 1
windows 10, chrome browser
No response
Migrate from the siad
package to the core
package
The current time is 9:53 AM, but looking at the graphs, I can only see up to 9:30. Displaying the current period (9:45-10:00 AM) would provide more up-to-date information.
No response
No response
No response
internal/test
and cmd/hostd
packages to use SQLite storesAdd the ability for hosts to block sectors by root, preventing them from being stored.
This change would add a new table, 4 new methods on the volume manager, and 4 new endpoints.
persist/sqlite
changes
init.sql
migrations.go
Store
host/storage
changes
Store
interface in persist.goVolumeManager
.VolumeManager.Write
and return an error.api
changes
/sectors/blocklist
New hostd
MDM instructions:
Implemented siad
MDM instructions:
Missing siad
MDM instructions:
It is currently impossible to implement RegistrySubscribe
since migrating from hostd
's internal/mux
to core/mux
macOS users cannot currently run hostd
without jumping through hoops. Add workflow to sign and notarize the macOS builds. We can copy the workflow from siafoundation/embarcadero.
Add UI for global alerts https://api.sia.tech/hostd#baee3e48-fa37-4926-a21c-bf58608dccec
No response
No response
No response
The "Location" in the create volume dialog is currently read-only. Make the location writable to enter custom locations. This will make it easier to access specific folders quickly.
v0.1.0-alpha.1
No response
The UX can be confusing to first-time users:
https://discord.com/channels/809849352516141067/1086016314419712020/1110479836251701269
https://discord.com/channels/809849352516141067/1086016314419712020/1110495574039474247
I'm not sure if it would be better to combine Name + Location or validate that Name
does not contain /
and show an error.
Currently, contracts can be sorted by "timeline" (negotiationHeight
) or status. Add an additional sort option for expiration height; the sort field is expirationHeight
. An additional column on the graph for blocks remaining might be useful too.
No response
No response
No response
Add tracing to hostd, most likely using open telemetry.
I'm unsure if there's anywhere else, but the "Contracts" page says: "There are currently no active contracts. Configure autopilot or manually form contracts to get started." in hostd
when there are no contracts.
hostd
nodeNo response
v0.1.0-alpha.2
all
No response
Tracking issue for a feature request. I'm not sure we will implement it, but getting additional feedback on some of the constraints would be good.
It would be beneficial if users could view and search their logs from the UI instead of manually parsing them on disk. Searchability might require moving the logs to the database instead of a local text file which could introduce performance concerns.
Add basic filters to the contracts endpoint. The contracts are already paginated, but filtering and sorting within those results is not currently possible.
Potential filters:
Sort:
Enable migration from siad
to hostd
Tracking issue for overall improvements to test coverage. PRs and additional issues should be referenced here
Packages that could use improvement:
Package | Coverage | Notes |
---|---|---|
go.sia.tech/hostd/host/contracts | 50% | full contract lifecycle and cleanup tests |
go.sia.tech/hostd/host/settings | 40% | |
go.sia.tech/hostd/host/storage | 64% | there are pretty good tests on migration and resizing, but they could be improved |
go.sia.tech/hostd/internal/persist/sqlite | 51% | |
go.sia.tech/hostd/rhp/v2 | 58.0% | |
go.sia.tech/hostd/rhp/v3 | 44.4% |
In the case of showing locked collateral, it would be nice to show the total locked collateral at the top (maybe as an option in the view option).
0.1.0 Alpha 3
Ubuntu 22.04, windows 10 chrome.
No response
The Volume Manager is the default implementation of a storage
manager. It is responsible for managing the storage of sectors on a physical disk. It
stores metadata in the host's SQLite database and sector data in a flat file.
In the contracts page right now there is no list of contracts with start and end date (an important feature) without moving over the contract.
0.1.0 Alpha 3
Ubuntu 22.04, windows 10 chrome.
No response
Add web socket support to RHP3 so hosts can communicate directly with browsers. This feature was started in siad
, but had some unresolved problems with the implementation preventing actual use.
Unresolved:
Tasks:
9984/tcp
Extra:
It be nice to have a slider to select the amount of space to allocate to a volume. Sia Host manager had that and it made it much easier to allocate space.
0.1.0 Alpha 1
Ubuntu 22.04, windows 10 chrome.
No response
I've made some changes to the API that break the UI.
minStoragePrice
-> storagePrice
minEgressPrice
-> egressPrice
minIngressPrice
-> ingressPrice
dyndns
-> ddns
[POST] /settings
has been changed to [PATCH] /settings
[PUT] /settings/dyndns/update
has been changed to [PUT] /settings/ddns/update
It would be nice to be able to configure where the logs go to. More common in Linux is somewhere under /var/log rather than in the --dir location.
I have not checked but it would be nice if logging would survive a logrotate or have a postrotate option to restart logging. Otherwise you have to use the copytruncate
option in logrotate which is not so neat.
Can the hostd.env be leveraged to hold this parameter rather than a bigger and bigger command line.
v0.1.0-alpha.1 with fix at d4c887f
Ubuntu 22.04
No response
Add a configurable LRU cache for sectors.
Edit: add implementation details
The cache needs to link the sector's root (types.Hash256
) with the sector's data (*[rhpv2.SectorSize]byte
). Older sectors should be ejected as more sectors are added. The cache should be disabled if the setting is zero.
There are a couple of moving parts here. My recommendation is to start with a static LRU cache in the volume manager, write some tests, then move on to making it configured via the host's settings. Each part can be together or separate PRs.
Lines 63 to 78 in 16d5e8e
Lines 844 to 871 in 16d5e8e
Lines 901 to 927 in 16d5e8e
int
or uint32
is fine. Each sector is 4MiB. hostd/host/settings/settings.go
Lines 39 to 76 in 16d5e8e
Lines 184 to 209 in 16d5e8e
hostd/persist/sqlite/settings.go
Lines 17 to 112 in 16d5e8e
Lines 956 to 979 in 16d5e8e
ResizeCache(sectors int) error
func to the volume manager and call it from the settings API handler. Lines 116 to 153 in 16d5e8e
RPCRenew is currently commented out due to incompatibility with siad
. Need to bring it inline with the rest of the RPC
Add DynDNS support through various DNS providers. Much of the work has already been completed in the internal/dyndns
package
Currently in the hostd Overview screen, all graph use the US date format (mm/dd/yyyy). Please can they display in the localized date format. The format should be taken from either the server (better) or from the browser (best).
Guessing, but if you use the localized date format, you can also use the localised time?
v0.1.0-alpha.1 with fix at d4c887f
Ubuntu 22.04
No response
The values on the pricing graph should line up with the values on the configuration page:
No response
No response
No response
Will need updates to both the backend and the frontend to periodically grab the host's used storage
when adding a volume, it does not accurately indicate the amount of used space.
You will note in the screen shot that I already have 9 TB of space used in two folders on the mounted volume but it is still offering me to create a 9 tb volume.
as volume folders are created the amount of available space should drop.
No response
0.1.0 Alpha 1
Ubuntu 22.04
No response
All endpoints are authenticated and prefixed by /api
Method | Path | Description |
---|---|---|
GET | / | summary of host's current state: synced height, wallet balance, earnings, collateral, storage, contracts, etc |
GET | /syncer | get the current gateway state |
GET | /syncer/peers | get the current list of peers |
PUT | /syncer/peers/:address | connect to a peer |
DELETE | /syncer/peers/:address | disconnect from a peer |
POST | /announce | announce the host to the network |
GET | /settings | get the current settings |
PUT | /settings | update the current settings |
GET | /financials/:period | financial breakdown -- daily, weekly, monthly, yearly totals |
GET | /contracts | paginated list of active contracts, sorted by expiration height asc |
GET | /contracts/:id | get a specific contract |
DELETE | /sectors/:root | delete a sector |
GET | /volumes | list of added storage volumes, stats per volume |
POST | /volumes | add a new volume to the host |
GET | /volumes/:id | get current state of a volume |
PUT | /volumes/:id | change settings of a volume |
DELETE | /volumes/:id | remove a volume from the host |
PUT | /volumes/:id/resize | resize a volume |
GET | /wallet | summary of wallet, including balance and address |
GET | /wallet/transactions | paginated list of transactions sorted by block height desc |
POST | /wallet/send | send a transaction |
To-Do:
internal/test
packagecmd/hostd
Replace the financial manager with a statistics manager. This module will be responsible for keeping track of all time-based statistics for the host. Statistics should be saved in 15-minute intervals to limit database growth but provide sufficient drill-down. This also includes #23
The financial statistics will need to handle reorgs and contract failures. Especially when dealing with accounts. The other statistics are significantly easier to implement.
Stats to track:
I created a new volume of 10TB. Initially, the volume is added to /volumes
with a status
of "creating". The maxSectors
field is updated as the volume initializes. Once the volume is finished, the status
changes to "ready".
From a UX perspective, we should be able to close the volume and perform other tasks while the volume initializes in the background. Manually closing the dialog works but may hide a potential error.
I don't know if this can be done easily in the UI alone. We might need to update the API to return immediately if the volume is successfully created and continue initializing it in the background. An alerts endpoint to track errors may be necessary. Thoughts?
Add financial metrics to the host's tracked statistics:
Statistics will need to be reverted in case of contract failures or rejections.
There is too much blank space between columns and at the same time it is not showing the full contract address when there is more than enough space on the screen for it.
It would be nice if there was an option to add more columns of data (not sure what at this point but I would suggest looking to host manager as a guide) and has full display of the contract id.
No response
0.1.0 Alpha 3
Ubuntu 22.04, windows 10 chrome.
No response
We've added an integrity check endpoint to manually check the integrity of contracts and their stored sectors, but automating this would be helpful in detecting issues early.
An automated check needs to be very careful of additional IO overhead. We don't want to cause excessive wear on the host's disks or bottlenecks for renters trying to access their data.
Includes #85
I have a large screen, the contract id is not completely shown even though there is lots of space to do so. It seems like the website does not take full advantage of bigger screens.
I would expect on bigger screens that as much of a field is being shown as can be.
No response
0.1.0 Alpha 1
windows 10, chrome browser
No response
It would be nice if there was the ability to move panes on the sia hostd web windows.
Right now at the to is revenue so it would be nice to move the contract pane to the top rather than have revenue at the top.
it would also be nice if we could ad some widgets similar to the ones that show up at the bottom of the sia host manager apps.
0.1.0 Alpha 1
Ubuntu 22.04, windows 10 chrome.
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.