Replies: 1 comment 2 replies
-
Here is a working patch for This allows maximal utilization of your storage. For example, my farm has 25TB of fragmented space. I chose the extension I took a K=32 plot, split it in half, and added I guess I will submit a PR this weekend. I also discovered a bug with the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose the idea of fragmented plots to utilize the unused
(0, 108GiB)
of free space with a platform-independent solution.I believe the only necessary modification is making
DiskProver
support this new meta format.Splitting / Joining
This can be accomplished by a very simple CLI program. (I can easily supply the code for this utility.)
eg.
A.plot 600
=>A1
(first 600 bytes)A2
(remaining bytes)eg.
A.plot 400 400
=>A1
(first 400 bytes)A2
(next 400 bytes)A3
(remaining bytes)This splitter program would also generate a new plot meta file (preferably clear-text so it's easy to edit the paths to the corresponding fragments.)
{ files: ["/mnt/disk1/A1", "/mnt/disk2/A2"], sizes: [600]}
{ files: ["/mnt/disk1/A1", "/mnt/disk2/A2", "/mnt/disk3/A3"], sizes: [400, 400]}
<path1>\n<len>\n<path2>...
This program could also:
Note: the paths would be any reachable file that normally can be accessed by
chiapos
, so you could have one fragment on a local disk and another on a samba share, or whatever.The fancier version of this program would:
File Extensions
I've purposely dropped the file extensions above as there's a bunch of options possible depending on how many code modifications are required.
The meta plot file could retain the
.plot
extension and just become.meta.plot
, sochia-blockchain/chia/plotting/util.py
doesn't need modified, or new extension could be used, eg..plot.meta
(requiring modification.)The fragmented plot files should get a new extension, so they are not considered as plots, eg.
.plot.frag$i
.DiskProver
The only real modification necessary is to
DiskProver
inchiapos/src/prover_disk.hpp
.Safe{Read|Seek}
, so the only necessary change is abstracting overifstream
, such that (depending on the choice of extension above), if the file is a normal plot, it's simply a single fragment, and if the file is a meta plot, then read in the fragment files and corresponding sizes.ifstream
, you'd have a wrapper struct, that when provided toSafe{Read|Seek}
react accordingly.SafeRead
would just need extra logic when it reads across a boundary.offset =>[fragment_file, fragment_offset]
, since N is typically 2 or 3, you can just linearly search through the corresponding offsets computed fromFoldList[Plus, 0, sizes]
.I'd probably also change
chia-blockchain/chia/plotting/manager.py
sostat_info = file_path.stat()
becomesprover.get_file_size()
which maps toDiskProver::GetLength()
which stats the fragments.Beta Was this translation helpful? Give feedback.
All reactions