[LIMIT_HEAP] Test chia_rs branch that rejects LIMIT_HEAP in run_block_generator2 - #20651
Closed
richardkiss wants to merge 8 commits into
Closed
[LIMIT_HEAP] Test chia_rs branch that rejects LIMIT_HEAP in run_block_generator2#20651richardkiss wants to merge 8 commits into
richardkiss wants to merge 8 commits into
Conversation
…sensus tests This change adds `@pytest.mark.limit_consensus_modes` markers to 9 tests that don't actually test consensus rule differences. These tests were being run 5x each (once for each consensus mode: PLAIN, HARD_FORK_2_0, SOFT_FORK_2_6, HARD_FORK_3_0, HARD_FORK_3_0_AFTER_PHASE_OUT) when they only need to run once. Tests modified: - test_wallet_node.py: 3 tests (puzzle hash subscription, error handling) - test_coin_management.py: 3 tests (CLI argument parsing) - test_full_node_rpc.py: 3 tests (RPC error handling and mempool queries) Impact: Reduces test runs by ~80% for these specific tests (5x -> 1x). Combined with similar optimizations across the test suite, this could reduce overall test time by 30-40%. The tests marked test application logic, RPC interfaces, CLI parsing, and error handling - none of which depend on consensus rule variations. Made-with: Cursor
…ting Uses chia_rs@8bcf2006 (Chia-Network/chia_rs#1396) which makes run_block_generator2 return an error if LIMIT_HEAP is set in flags. This PR exists to see which chia-blockchain tests break when LIMIT_HEAP is rejected by the consensus code path. Any test failures indicate sites that pass MEMPOOL_MODE (which includes LIMIT_HEAP) to run_block_generator2 — a separation-of-concerns bug. Adds Rust toolchain setup to the install action so poetry can build chia_rs from source. Made-with: Cursor
Previous pin was at the "audit" state (callers not updated). This points to the cleaned-up commit where all callers of run_block_generator2 have LIMIT_HEAP stripped, so CI should pass if no other call sites in chia-blockchain are affected. Made-with: Cursor
Made-with: Cursor
… wheel check - poetry.lock was generated with poetry 2.3.2 locally; CI uses 2.2.1, causing the poetry pre-commit hook to re-lock and fail - add chia_rs to excepted_packages in check_dependency_artifacts.py since it is a git dependency for this test branch (no PyPI wheel) Made-with: Cursor
partition('-') on 'chia-rs-0.39.0.zip' yields name='chia', not
'chia_rs'. Use a regex to split at the version boundary instead.
Made-with: Cursor
LIMIT_HEAP is a mempool policy flag that caps the CLVM allocator to 500MB. run_block_generator2 now rejects it to prevent accidentally applying this mempool restriction on the consensus path. Update the three call sites that passed MEMPOOL_MODE (which includes LIMIT_HEAP) to run_block_generator2: - full_node_rpc_api.py: create_block_generator validation - _tests/util/get_name_puzzle_conditions.py: strip when dispatching to run_block_generator2 - _tests/core/mempool/test_mempool_manager.py: two validation calls Made-with: Cursor
Contributor
Author
|
Closing — LIMIT_HEAP test PR, tied to chia_rs #1396. Will be obsolete once #1396 merges. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR pins
chia_rsto commit8bcf2006d8730e56c9a2e15ecafa8222f8c87089from Chia-Network/chia_rs#1396, which makesrun_block_generator2return an error if theLIMIT_HEAPflag is set.This is a CI test PR — not intended to merge. Its purpose is to reveal which chia-blockchain tests break when
LIMIT_HEAPis rejected by the consensus code path.Background
LIMIT_HEAPis a mempool-policy flag that caps the CLVM allocator to 500 MB. It should not appear inrun_block_generator2, which is a consensus code path. Any caller passingMEMPOOL_MODE(which includesLIMIT_HEAP) torun_block_generator2is mixing mempool policy into consensus validation — a separation-of-concerns bug.Known suspects in this repo:
chia/full_node/full_node_rpc_api.py— callsrun_block_generator2withMEMPOOL_MODEchia/_tests/util/get_name_puzzle_conditions.py— does the same whenmempool_mode=TrueChanges
pyproject.toml: switchchia_rsfrom PyPI version range to git dependency at the above commitpoetry.lock: regenerated to reflect the git source.github/actions/install/action.yml: add Rust toolchain setup (required to buildchia_rsfrom source)What to look for in CI
Any test failures with
GeneratorRuntimeError(error code 117) or similar indicate a call site that should be fixed before the chia_rs PR merges.Made with Cursor