tfchain icon indicating copy to clipboard operation
tfchain copied to clipboard

feat(pallet-tfgrid): allow `hdd only` nodes to register on chain

Open renauter opened this issue 1 year ago • 0 comments

Description

We want to allow registration of HDD only nodes on chain for Holochain usage.

Implemented solution:

  1. Similar to what already exists for SSD, add a minimum HDD size requirement on resources.validate_hru()
  2. 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.

renauter avatar May 22 '24 15:05 renauter