tfchain
tfchain copied to clipboard
feat(pallet-tfgrid): allow `hdd only` nodes to register on chain
Description
We want to allow registration of HDD only nodes on chain for Holochain usage.
Implemented solution:
- Similar to what already exists for SSD, add a minimum HDD size requirement on
resources.validate_hru() - Then, on validating, make sure node has at least 1 minimum storage capacity available
ensure!(resources.validate_hru() || ensure!(resources.validate_sru() , Error::<T>::InvalidStorageInput);
A "reasonable" minimum HDD size requirement is set to 100 GB (same as SSD).
Related Issues:
- #967
Checklist:
Please delete options that are not relevant.
- [x] I have added tests to cover my changes.
- [x] My commits follow this conventional commits guide.