threefoldtech / tfchain

Threefold Chain.
Apache License 2.0
15 stars 11 forks source link

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

Closed renauter closed 5 months ago

renauter commented 6 months ago

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:

Checklist:

Please delete options that are not relevant.