Skip to content

[CHIA-3205] unify test constants on the ones used by BlockTools #19768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
23 changes: 2 additions & 21 deletions chia/_tests/util/constants.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
from __future__ import annotations

from chia_rs.sized_ints import uint8, uint16, uint32, uint64, uint128
from chia.simulator.block_tools import test_constants

from chia.consensus.default_constants import DEFAULT_CONSTANTS

test_constants = DEFAULT_CONSTANTS.replace(
MIN_PLOT_SIZE_V1=uint8(18),
# TODO: todo_v2_plots decide on v2 test plot k-size
MIN_PLOT_SIZE_V2=uint8(18),
MIN_BLOCKS_PER_CHALLENGE_BLOCK=uint8(12),
DIFFICULTY_STARTING=uint64(2**9),
DISCRIMINANT_SIZE_BITS=uint16(16),
SUB_EPOCH_BLOCKS=uint32(170),
WEIGHT_PROOF_THRESHOLD=uint8(2),
WEIGHT_PROOF_RECENT_BLOCKS=uint32(380),
DIFFICULTY_CONSTANT_FACTOR=uint128(33554432),
NUM_SPS_SUB_SLOT=uint8(16), # Must be a power of 2
MAX_SUB_SLOT_BLOCKS=uint32(50),
EPOCH_BLOCKS=uint32(340),
SUB_SLOT_ITERS_STARTING=uint64(2**10), # Must be a multiple of 64
NUMBER_ZERO_BITS_PLOT_FILTER_V1=uint8(1), # H(plot signature of the challenge) must start with these many zeroes
NUMBER_ZERO_BITS_PLOT_FILTER_V2=uint8(1), # H(plot signature of the challenge) must start with these many zeroes
)
__all__ = ["test_constants"]
Loading