Deletes five functions/classes with zero references (verified repo-wide
including tests) and the test-only FullNodeStore.remove_unfinished_block,
whose own TODO asked for its removal. The one test caller now exercises
the production cleanup method clear_unfinished_blocks_below instead.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Add BlockStoreProtocol; drop consensus dependency on chia.full_node
Co-authored-by: Cursor <cursoragent@cursor.com>
* Assert isinstance directly on bc.block_store
Review feedback: drop the intermediate block_store assignment; mypy
narrows the attribute expression after the isinstance assert.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Set testneta MIN_PLOT_SIZE_V1 to 18 for sync from height 0
Testneta shares early chain history with testnet11 where smaller v1 plots
are valid. New installs and existing nodes without a config override were
using the mainnet default of 32 and failing INVALID_POSPACE during initial
sync.
* bump chia_rs
* updates to use and report any error message reported back from chia_rs
* bump test cache
* pass testnet to the proof-of-space functions
* review comments
* Checkpoint Merge
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
Co-authored-by: Zachary Brown <z.brown@chia.net>
* Add a timeout during node shutdown
* Revert "Add a timeout during node shutdown"
This reverts commit ab57da71fb.
* Replace test_add_transaction_seen_before_validation with simpler version
The previous version of this test was the sole cause of a CI hang on the
2.7.1-checkpoint branch (confirmed by bisection). It used the heavyweight
wallet_nodes fixture, a real peer connection, and a backgrounded task driving
add_transaction, all of which left orphaned async work during fixture teardown
under pytest-xdist on CI runners.
The replacement keeps the same regression coverage for SEC-111 (tx must be
marked in-flight before pre_validate_spendbundle) but does so with:
- the lightweight one_node_one_block fixture
- pytest.MonkeyPatch.context() instead of manual attribute swap
- two asyncio.Events to deterministically gate validation
- asyncio.wait_for on both the gate and the final task to fail fast
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Almog De Paz <almogdepaz@gmail.com>
Co-authored-by: Zachary Brown <z.brown@chia.net>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
Co-authored-by: Cursor <cursoragent@cursor.com>
* add PriorityThreadPoolExecutor, use a dedicated thread for high priority work, to minimize latency
* use PriorityThreadPoolExecutor to validate UnfinishedBlocks and FullBlocks
* make MempoolManager use the new priority thread pool
* make FullNodeRpcApi use the new FullNode thread pool
* make FullNodeAPI use the new thread pool. This is mostly used for servicing the Wallet protocol. trusted wallets have higher priority (lower nice) and untrusted wallets have the lowest priority
* add instrumentation to PrioritizedThreadPoolExecutor
* bump chia_rs to 0.42.0
* implement cost-per-spend after 3.0 hard fork
* update difficulty
* disable test_empty_sub_slots_epoch for HARD_FORK_3_0 as it seems we don't get any overflow blocks
* cache solve_proof() and get_qualities_for_challenge() results for tests
* Update chia_rs dependency. This version introduces condition costs in the hard
fork. So the tests that compute block costs are being updated to match these
cost rules. It also introduces a spend limit in the 2.7.0 soft fork, and the
mempool is updated to not produce blocks exceeding this limit.
* ensure both MAX_SPENDS_PER_BLOCK checks are covered by the test
* bump chia_rs and make appropriate adjustments. The v2 PoS format has changed. There is no quality proof scan filter
bump test-cache blocks and test-plots
* add support for creating v2 plots in block_tools
* separate test chains into v1-plots, v1- and v2-mixed plots, and v2-only plots (after phase-out)
* (temporarily) disable running some tests with the 3.0 hard fork, until we fix them
* fix test_blockchain.py for the 3.0 hard fork chains
* Now that we have more test chains to run tests over (for PoS2), we'll need more time to run all the tests, on CI.
* remove comment about validating v2 plot cache entries when loading them. We can revisit this if it becomes a problem
* review
* fix tests
* fix long reorg
* readd todo
* remove usless todo
* fix comment
* long_reorg
* assert case exercised
* todo
* bump blocks-and-plots-version
* update lockfile
* fix overflow handling in test helper
* fix
* address cursor comments
* skip a few select tests on CI, to speed it up
---------
Co-authored-by: almogdepaz <almogdepaz@gmail.com>
* relax proof-of-space validation in weight proofs. make it height agnostic
* fix typo in block_tools logging. hoist calculations out of the block_tools PoS loop
* make the plot-filter schedule safe in proof-of-space validation as part of weight proofs
* review comments
* reduce use of pool_reward_puzzle_hash feature of BlockTools, since it's not supported by v2 plots
* the BlockTools feature to ask for a specific pool puzzle hash are not supported by v2 proofs. v2 plots only have pool contract puzzle hash