Skip to content

Commit 00b82aa

Browse files
committed
fix issue in BlockTools where transaction_generator was (incorrectly) used as a proxy for whether the block was a TX block or not. Also improve error messages for plot sizes as well as the minimum plot size for v2 plots on testnet (which also affects our simulations in CI)
1 parent 054a732 commit 00b82aa

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

chia/simulator/block_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ def get_consecutive_blocks(
980980
available_coins.remove(rem)
981981
available_coins.extend(new_gen.additions)
982982

983-
if full_block.transactions_generator is not None:
983+
if full_block.is_transaction_block():
984984
tx_block_heights.append(full_block.height)
985985
prev_tx_height = full_block.height
986986

@@ -1274,7 +1274,7 @@ def get_consecutive_blocks(
12741274
available_coins.remove(rem)
12751275
available_coins.extend(new_gen.additions)
12761276

1277-
if full_block.transactions_generator is not None:
1277+
if full_block.is_transaction_block():
12781278
tx_block_heights.append(full_block.height)
12791279
prev_tx_height = full_block.height
12801280

chia/types/blockchain_format/proof_of_space.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def check_plot_size(constants: ConsensusConstants, ps: PlotSize) -> bool:
8686
size_v2 = ps.size_v2
8787
assert size_v2 is not None
8888
if size_v2 < constants.MIN_PLOT_SIZE_V2:
89-
log.error("Plot size is lower than the minimum")
89+
log.error(f"Plot size ({size_v2}) is lower than the minimum ({constants.MIN_PLOT_SIZE_V2})")
9090
return False
9191
if size_v2 > constants.MAX_PLOT_SIZE_V2:
92-
log.error("Plot size is higher than the maximum")
92+
log.error(f"Plot size ({size_v2}) is higher than the maximum ({constants.MAX_PLOT_SIZE_V2})")
9393
return False
9494
if (size_v2 & 1) == 1:
9595
log.error("Plot size is odd")

chia/util/initial-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ network_overrides: &network_overrides
2020
GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af"
2121
testnet0:
2222
MIN_PLOT_SIZE_V1: 18
23-
MIN_PLOT_SIZE_V2: 20
23+
MIN_PLOT_SIZE_V2: 18
2424
GENESIS_CHALLENGE: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2525
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: "d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc"
2626
GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af"
@@ -34,7 +34,7 @@ network_overrides: &network_overrides
3434
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: 3ef7c233fc0785f3c0cae5992c1d35e7c955ca37a423571c1607ba392a9d12f7
3535
MEMPOOL_BLOCK_BUFFER: 10
3636
MIN_PLOT_SIZE_V1: 18
37-
MIN_PLOT_SIZE_V2: 20
37+
MIN_PLOT_SIZE_V2: 18
3838
NETWORK_TYPE: 1
3939
SUB_SLOT_ITERS_STARTING: 67108864
4040
# Forks activated from the beginning on this network
@@ -52,7 +52,7 @@ network_overrides: &network_overrides
5252
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: 08296fc227decd043aee855741444538e4cc9a31772c4d1a9e6242d1e777e42a
5353
MEMPOOL_BLOCK_BUFFER: 10
5454
MIN_PLOT_SIZE_V1: 18
55-
MIN_PLOT_SIZE_V2: 20
55+
MIN_PLOT_SIZE_V2: 18
5656
NETWORK_TYPE: 1
5757
SUB_SLOT_ITERS_STARTING: 67108864
5858
HARD_FORK_HEIGHT: 3693395

0 commit comments

Comments
 (0)