Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions chia/_tests/core/custom_types/test_proof_of_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ def b32(key: str) -> bytes32:
plot_size=PlotSize.make_v1(31),
plot_public_key=G1Element(),
pool_public_key=G1Element(),
expected_error="Plot size is lower than the minimum",
expected_error="Plot size (31) is lower than the minimum (32)",
),
ProofOfSpaceCase(
id="Higher than maximum plot size",
pos_challenge=bytes32(b"1" * 32),
plot_size=PlotSize.make_v1(51),
plot_public_key=G1Element(),
pool_public_key=G1Element(),
expected_error="Plot size is higher than the maximum",
expected_error="Plot size (51) is higher than the maximum (50)",
),
ProofOfSpaceCase(
id="Different challenge",
Expand Down Expand Up @@ -115,15 +115,15 @@ def b32(key: str) -> bytes32:
plot_size=PlotSize.make_v2(0),
plot_public_key=G1Element(),
pool_public_key=G1Element(),
expected_error="Plot size is lower than the minimum",
expected_error="Plot size (0) is lower than the minimum (28)",
),
ProofOfSpaceCase(
id="v2 plot size 34",
pos_challenge=bytes32(b"1" * 32),
plot_size=PlotSize.make_v2(34),
plot_public_key=G1Element(),
pool_public_key=G1Element(),
expected_error="Plot size is higher than the maximum",
expected_error="Plot size (34) is higher than the maximum (32)",
),
ProofOfSpaceCase(
id="Not passing the plot filter v2",
Expand Down
4 changes: 2 additions & 2 deletions chia/simulator/block_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ def get_consecutive_blocks(
available_coins.remove(rem)
available_coins.extend(new_gen.additions)

if full_block.transactions_generator is not None:
if full_block.is_transaction_block():
tx_block_heights.append(full_block.height)
prev_tx_height = full_block.height

Expand Down Expand Up @@ -1274,7 +1274,7 @@ def get_consecutive_blocks(
available_coins.remove(rem)
available_coins.extend(new_gen.additions)

if full_block.transactions_generator is not None:
if full_block.is_transaction_block():
tx_block_heights.append(full_block.height)
prev_tx_height = full_block.height

Expand Down
8 changes: 4 additions & 4 deletions chia/types/blockchain_format/proof_of_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ def check_plot_size(constants: ConsensusConstants, ps: PlotSize) -> bool:
if size_v1 is not None:
assert ps.size_v2 is None
if size_v1 < constants.MIN_PLOT_SIZE_V1:
log.error("Plot size is lower than the minimum")
log.error(f"Plot size ({size_v1}) is lower than the minimum ({constants.MIN_PLOT_SIZE_V1})")
return False
if size_v1 > constants.MAX_PLOT_SIZE_V1:
log.error("Plot size is higher than the maximum")
log.error(f"Plot size ({size_v1}) is higher than the maximum ({constants.MAX_PLOT_SIZE_V1})")
return False
return True

size_v2 = ps.size_v2
assert size_v2 is not None
if size_v2 < constants.MIN_PLOT_SIZE_V2:
log.error("Plot size is lower than the minimum")
log.error(f"Plot size ({size_v2}) is lower than the minimum ({constants.MIN_PLOT_SIZE_V2})")
return False
if size_v2 > constants.MAX_PLOT_SIZE_V2:
log.error("Plot size is higher than the maximum")
log.error(f"Plot size ({size_v2}) is higher than the maximum ({constants.MAX_PLOT_SIZE_V2})")
return False
if (size_v2 & 1) == 1:
log.error("Plot size is odd")
Expand Down
6 changes: 3 additions & 3 deletions chia/util/initial-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ network_overrides: &network_overrides
GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af"
testnet0:
MIN_PLOT_SIZE_V1: 18
MIN_PLOT_SIZE_V2: 20
MIN_PLOT_SIZE_V2: 18
GENESIS_CHALLENGE: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: "d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc"
GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af"
Expand All @@ -34,7 +34,7 @@ network_overrides: &network_overrides
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: 3ef7c233fc0785f3c0cae5992c1d35e7c955ca37a423571c1607ba392a9d12f7
MEMPOOL_BLOCK_BUFFER: 10
MIN_PLOT_SIZE_V1: 18
MIN_PLOT_SIZE_V2: 20
MIN_PLOT_SIZE_V2: 18
NETWORK_TYPE: 1
SUB_SLOT_ITERS_STARTING: 67108864
# Forks activated from the beginning on this network
Expand All @@ -52,7 +52,7 @@ network_overrides: &network_overrides
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: 08296fc227decd043aee855741444538e4cc9a31772c4d1a9e6242d1e777e42a
MEMPOOL_BLOCK_BUFFER: 10
MIN_PLOT_SIZE_V1: 18
MIN_PLOT_SIZE_V2: 20
MIN_PLOT_SIZE_V2: 18
NETWORK_TYPE: 1
SUB_SLOT_ITERS_STARTING: 67108864
HARD_FORK_HEIGHT: 3693395
Expand Down
Loading