-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b7a1ab
commit f641e8e
Showing
6 changed files
with
9 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
from __future__ import annotations | ||
|
||
from chia.util.ints import uint64 | ||
|
||
# The actual space in bytes of a plot, is _expected_plot_size(k) * UI_ACTUAL_SPACE_CONSTANT_FACTO | ||
# This is not used in consensus, only for display purposes | ||
UI_ACTUAL_SPACE_CONSTANT_FACTOR = 0.78 | ||
|
||
|
||
def _expected_plot_size(k: int) -> uint64: | ||
""" | ||
Given the plot size parameter k (which is between 32 and 59), computes the | ||
expected size of the plot in bytes (times a constant factor). This is based on efficient encoding | ||
of the plot, and aims to be scale agnostic, so larger plots don't | ||
necessarily get more rewards per byte. The +1 is added to give half a bit more space per entry, which | ||
is necessary to store the entries in the plot. | ||
""" | ||
|
||
return uint64(((2 * k) + 1) * (2 ** (k - 1))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters