-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
src/farmer.rs
Outdated
impl PlotDescription { | ||
const SECTOR_OVERHEAD: ByteSize = ByteSize::mb(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a random value. We have fixed prefix +metadata size in faming components, but nothing for databases yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I calculate the prefix size though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a fixed size reserved space to allow for metadata upgrades in the future:
https://github.com/subspace/subspace/blob/d06ad0bad8a9cac203d0e0a9b27611b9f0f48e2a/crates/subspace-farmer/src/single_disk_plot.rs#L56-L57
Was supposed to be an implementation detail, I'll think about how to expose it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I'll add a todo to account for that. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why cache size has minimum amount of space though, looks a bit strange to me
@@ -86,37 +87,45 @@ impl CacheDescription { | |||
} | |||
|
|||
/// Description of the plot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, there is a data structure with details about the plot in farmer already and it has more details in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but this is just a description. The same thing as this:
Following suggestion of @nazar-pc of how to check minimal plot size