Earle Lowe and GitHub
b6c777ec3b
Add context handler features to MempoolManager ( #20343 )
...
* Add context handler features to MempoolManager
* No need to manually shut_down mempoolmanager
* Fix up issues with ordering in full node
* Fix dumb programmer issues
* Fix up some bugbot issues
* Move timing to inside context manager
* fix wrong indent
2025-12-15 09:48:34 -08:00
Amine Khaldi
328276ce80
Merge commit '54bdf378c7a2a60b45b8d8523dd7b10920f029b8' into checkpoint/main_from_release_2.5.7_54bdf378c7a2a60b45b8d8523dd7b10920f029b8
2025-11-21 11:39:07 +01:00
Matt Hauff and GitHub
40db4635a8
[LABS-245] Enable PEP604 Ruff rules ( #20269 )
...
* Enable PEP604 Ruff rules
* Fix harcoded signature in test
* Hack CLVMStreamable test with note to fast follow
2025-11-18 12:34:00 -08:00
Arvid Norberg and GitHub
38d2d9f2d0
make sure to pass in the correct previous transaction block height ( #20237 )
...
* make sure to pass in the correct previous transaction block height to get_flags_for_height_and_constants()
* review comments
2025-11-14 16:29:51 -06:00
Arvid Norberg and GitHub
54bdf378c7
introduce test_create_block_generator_custom_spend() ( #20240 )
...
introduce test_create_block_generator_custom_spend() test for the mempool_manager
2025-11-12 09:49:06 -07:00
Amine Khaldi and GitHub
e129562e53
CHIA-2515 Simplify MempoolItem by constructing SpendBundle on demand from its components ( #20123 )
...
Simplify MempoolItem by constructing SpendBundle on demand from its components.
2025-10-06 18:30:13 -07:00
Amine Khaldi and GitHub
f7b7c66d2b
CHIA-3758 Avoid recomputing mempool removals' transaction IDs in FullNode's broadcast_removed_tx ( #20097 )
...
Avoid recomputing mempool removals' transaction IDs in FullNode's broadcast_removed_tx.
2025-09-24 09:21:36 -07:00
Amine Khaldi and GitHub
cfeeae1f9c
CHIA-3737 Simplify BundleCoinSpend's tracking of fast forward spends ( #20069 )
...
Simplify BundleCoinSpend's tracking of fast forward spends.
2025-09-19 07:11:38 -07:00
Amine Khaldi and GitHub
23ad9619e3
CHIA-3736 Avoid recomputing skipped transaction ID in create_bundle_from_mempool_items ( #20055 )
...
Avoid recomputing skipped transaction ID in create_bundle_from_mempool_items.
2025-09-11 08:54:51 -07:00
Arvid Norberg and GitHub
6df066fa0c
fix incorrect assert in create_block_generator2() ( #20015 )
2025-09-04 08:08:11 -07:00
33a02129b3
use per-puzzle cost to estimate DEDUP savings ( #19811 )
...
* use per-puzzle cost to estimate DEDUP savings, rather than rerunning puzzles
* restore SpendBundleAddInfo to have an optional cost. remove unused max_cost parameter from get_deduplication_info()
* restore call to make_test_conds() taking cost as int
* update test_dedup_by_fee() and fix big in make_bundle_spends_map_and_fee()
* review comments
* review comments
* Addendum to use per-puzzle cost to estimate DEDUP savings (#19816 )
Addendum to use per-puzzle cost to estimate DEDUP savings.
---------
Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org >
2025-07-31 11:36:07 -07:00
Richard Kiss and GitHub
c800e06ac4
Remove the dependency of chia.consensus on the module chia.types ( #19590 )
...
* Move `chia/types/spend_bundle.py` to wallet.
* Move `compute_additions` functions into wallet.
* Move `chia/types/eligible_coin_spends.py` to `chia/full_node`.
2025-05-09 13:56:01 -05:00
Arvid Norberg and GitHub
198b757f33
log an error if we fail to compute the block cost ( #19524 )
...
log an error if we fail to compute the block cost, instead of just asserting
2025-04-25 13:14:06 -05:00
Amine Khaldi and GitHub
6824b11ba0
CHIA-2743 Synchronous block generator creation ( #19505 )
...
Synchronous block generator creation.
2025-04-24 10:24:42 -05:00
Kyle Altendorf and GitHub
fcd20ce543
more chia_rs directly ( #19520 )
...
* more `chia_rs` directly
* maybe
* undo, kinda
2025-04-21 14:05:05 -05:00
Arvid Norberg and GitHub
88d3fefa69
validate block generator created by the debug RPC ( #19519 )
...
* validate block generator created by the debug RPC
* address missing test coverage
* more logging. Don't limit block cost by cost header in test RPC
2025-04-21 10:21:49 -05:00
Amine Khaldi and GitHub
d4aacea796
CHIA-2604 Separate identical spend deduplication and singleton fast forward into their own classes ( #19439 )
...
Separate identical spend deduplication and singleton fast forward into their own classes.
2025-04-10 06:22:03 -07:00
Amine Khaldi and GitHub
fbfd7ca743
CHIA-2675 Simplify transaction skipping eligibility check in create_bundle_from_mempool_items ( #19473 )
...
Simplify transaction skipping eligibility check in create_bundle_from_mempool_items.
2025-04-08 06:46:35 -07:00
Amine Khaldi and GitHub
889f4af357
CHIA-2646 Fix create_block_generator2 to perform identical spend deduplication using the mempool item's potentially fast forwarded coin spends data ( #19450 )
...
Perform identical spend deduplication using the mempool item's potentially fast forwarded coin spends data.
2025-04-08 06:46:27 -07:00
Arvid Norberg and GitHub
7aa76bc116
[CHIA-2540] Compute block cost ( #19397 )
...
* predict exact block cost, instead of re-running the generator
* fixup workflow for test-bundles
* fixup
* review comments
2025-04-02 09:37:45 -05:00
Arvid Norberg and GitHub
cf17f20ccf
[CHIA-2052] Compressed blocks ( #19270 )
...
* introduce create_block_generator2() to mempool, which picks transactions and compresses them incrementally, allowing us to fill blocks even when compressing
* improve test, comment and pragma no cover
* fix mempool test
* simplify item selection logic in create_block_generator2()
* add test coverage of timeout in create_block_generator2()
* address review comments
* fixup
2025-03-27 12:42:46 -05:00
Arvid Norberg and GitHub
9147629b78
NewBlockGenerator as an extension of BlockGenerator ( #19390 )
2025-03-19 11:37:16 -07:00
Amine Khaldi
eeec2c348d
Merge commit '4ae44855b12922df6bf9524e4c2bd431f9dcf54c' into checkpoint/main_from_release_2.5.3_4ae44855b12922df6bf9524e4c2bd431f9dcf54c
2025-03-14 10:52:12 +01:00
Amine Khaldi and GitHub
8b2b830da6
CHIA-2538 Remove no longer needed item_inclusion_filter in the mempool ( #19367 )
...
Remove no longer needed item_inclusion_filter in the mempool.
2025-03-13 11:51:23 -07:00
Rigidity and GitHub
4ae44855b1
Include removals in declare_proof_of_space ( #19364 )
2025-03-11 10:10:20 -07:00
Arvid Norberg and GitHub
6358bab4c3
[CHIA-2383] improve FF mempool eviction ( #19355 )
...
* evict FF spends from the mempool if they become invalid with a new peak
* optimize fast-forward rebase in mempool new_peak()
* clean up tests, also test reversing spent coins in new_peak()
* extend mempool invariant check in tests
* fix typo in comment
2025-03-07 17:44:40 -06:00
92cd6eeb70
Add increment to skipped_items if we hit an Exception in mempool ( #19286 )
...
* add skip to exception
* fix test as last coin gets skipped
* Add skip to exception update (#19339 )
* don't throw exception when skipping FF or Dedup coin in mempool
* skipping a dedup because of different solution is not an error
* correct logging and tests
* unit test skipping FF after 3 errors
---------
Co-authored-by: Arvid Norberg <arvid@libtorrent.org >
2025-03-07 17:44:30 -06:00
Arvid Norberg and GitHub
9ba6c0407b
address issue introduced in #19207 ( #19328 )
...
address issue introduced in #19207 where empty transaction blocks would not have None transactions_block_generator
2025-03-04 08:42:03 -06:00
Kyle Altendorf and GitHub
d50b6e0883
use chia_rs directly for sized bytes ( #19326 )
2025-02-28 09:35:25 -08:00
Kyle Altendorf and GitHub
e446d6b726
use chia_rs directly for sized ints ( #19303 )
...
* use chia_rs directly for sized ints
* Update data_layer_rpc_api.py
2025-02-24 14:33:09 -08:00
Kyle Altendorf and GitHub
30c4ef2689
use chia_rs directly for consensus constants ( #19301 )
2025-02-21 10:03:17 -08:00
Amine Khaldi
508a2a8052
Merge commit 'ad755916ab664abb207421e042328ca1603658ab' into checkpoint/main_from_release_2.5.2_ad755916ab664abb207421e042328ca1603658ab
2025-02-18 17:06:52 +01:00
Amine Khaldi
80c718e37d
Merge commit '6e542f051ef6ad2aca5f16c76c5c0e97a6616e29' into checkpoint/main_from_release_2.5.2_6e542f051ef6ad2aca5f16c76c5c0e97a6616e29
2025-02-18 11:56:15 +01:00
Amine Khaldi and GitHub
ad755916ab
CHIA-2382 Create a mempool item out of a copy of the input one when processing fast forward spends ( #19273 )
...
Create a fast forward mempool item out of a copy of the input one.
2025-02-17 11:47:42 -07:00
Arvid Norberg and GitHub
6e542f051e
[CHIA-2380] harden mempool fast-forward feature ( #19276 )
...
* harden mempool fast-forward feature
* simplify
* move test to avoid conflict
* address code review
2025-02-17 09:28:35 -07:00
Arvid Norberg and GitHub
0f35f707bd
create_block_generator refactor (#19207 )
...
* make item_inclusion_filter optional and move it to the end with default None, to simplify calls
* move block generator creation into the Mempool class
* update benchmark
* add test
2025-02-13 19:20:45 -07:00
Arvid Norberg and GitHub
7a643c6f32
add a time-out of adding more transactions to blocks ( #19134 )
2025-01-14 08:23:55 -07:00
Kyle Altendorf and GitHub
9c8557a1f8
Remove Python 3.8 support and update source to 3.9 standards ( #18687 )
...
* manual python 3.8 removals
* poetry
* pyupgrade
* black
* isort
* manually tidy imports
* work around shadowed type
* catch up build network protocol files for pyupgrade changes
* placate pylint
* re-enable 20.04
* placate flake8
2024-10-16 14:21:15 -07:00
Amine Khaldi and GitHub
0b68fd941e
CHIA-1387 Simplify fetching TX data in create_bundle_from_mempool_items ( #18586 )
...
Simplify fetching TX data in create_bundle_from_mempool_items.
2024-09-16 11:50:16 -07:00
Amine Khaldi and GitHub
7b18217ff5
CHIA-1214 Simplify Mempool::size() ( #18526 )
...
Simplify Mempool::size().
2024-08-27 23:59:37 +08:00
Amine Khaldi and GitHub
92fdb5848b
CHIA-982 Simplify Mempool's items_by_feerate ( #18340 )
...
Simplify Mempool's items_by_feerate.
2024-08-01 16:36:17 -07:00
Amine Khaldi and GitHub
7d672deb6e
Explore logging the time create_bundle_from_mempool_items takes ( #18367 )
...
Explore logging the time create_bundle_from_mempool_items takes.
2024-08-01 16:35:57 -07:00
Amine Khaldi and GitHub
e5b1e8528c
CHIA-944 Simplify Mempool's get_items_by_coin_ids ( #18326 )
...
Simplify Mempool's get_items_by_coin_ids.
2024-07-30 12:28:56 -07:00
Arvid Norberg and GitHub
6dceabe2d3
[CHIA-691] simplify MempoolItem ( #18143 )
...
make MempoolItem and InternalMempoolItem contain the SpendBundleConditions directly, rather than the NPCResult. A mempool item is guaranteed to be valid, so the error state of NPCResult will never be engaged anyway.
2024-07-08 09:44:49 -07:00
Amine Khaldi and GitHub
8141fe40e2
CHIA-826 Simplify get_items_by_coin_id and make it return an iterator ( #18255 )
...
Simplify get_items_by_coin_id and make it return an iterator.
2024-07-03 09:22:25 -07:00
Amine Khaldi and GitHub
7245d47c77
CHIA-843 Simplify add_to_pool around DB operations ( #18259 )
...
Simplify add_to_pool around DB operations.
2024-07-03 09:22:13 -07:00
Matt Hauff and GitHub
3637bd33c6
Delete chia.util.misc ( #18170 )
...
* Move VersionedBlob to chia.util.streamable
* Move format_bytes to chia.cmds.cmds_util
* Move format_minutes to chia.cmds.cmds_util
* Move prompt_yes_no to chia.cmds.cmds_util
* Move get_list_or_len to from chia.plot_sync.receiver
* Move validate_directory_writable to chia.cmds.cmds_util
* Move *termination_signals to test_services
* Move UInt*Range to chia.util.streamable
* Create chia.util.batches
* Create chia.server.signal_handlers
* Create chia._tests.util.split_managers
* Move ValuedEvent to chia.types.transaction_queue_entry
* Move available_logical_cores to chia.util.cpu
* Move caller_file_and_line to chia._tests.util.misc
* Move satisfies_hint to chia._tests.wallet.test_singleton_lifecycle_fast
2024-06-18 08:27:17 -05:00
Rigidity and GitHub
de75f058dd
CHIA-194: CHIP-0026 Mempool Updates ( #17980 )
...
* Initial draft of mempool updates [skip ci]
* More implementation work, but capability issue [skip ci]
* Temp (will probably revert)
* Get first test passing
* Setup spent coin tests
* Add unrelated test data to make tests better
* Refactor test
* Finish testing
* Update tests
* Include removal reason and block inclusion tests
* Remove unnecessary dict
* Add missing message to test
* Fix after rebase
* Broadcast support from node for mempool updates
* Remove redundant code
* Use new_block
* Filter and early return suggestions
* Reword comments on PeakPostProcessingResult
* Improve mempool fn name and doc comment
* Bump wallet protocol version
* Add ratelimits
* Add tests for querying mempool items
* Asserts and more tests
* Add peers for spend bundle tests
2024-06-06 10:59:44 +01:00
Amine Khaldi and GitHub
35ab75309e
Set 10 as the maximum number of items that get skipped if they won't fit in the block we're trying to create ( #17489 )
...
Set 10 as the maximum number of items that get skipped if they won't fit in the block we're trying to create.
2024-02-05 09:43:28 -08:00
Amine Khaldi and GitHub
a6827c2e92
Singleton fast forward ( #16919 )
...
Initial iteration of singleton fast forward.
2024-01-26 13:20:42 -08:00