* remove unused run_generator_mempool() function
* move run_generator_unsafe() into the tests, which is the only place it's used
* remove (somewhat meaningless) setup_generator_args() and create_generator_args()
* remove unused GENERATOR_MOD in mempool_check_conditions.py
* remove redundant get_generator() function
* transition analyze-chain.py to use run_block_generator() and drop dependency on GENERATOR_MOD
* fixup type hints in test_rom.py
* fixup type hints in test_compression.py
* fixup type hints in test_generator_types.py
limit the mempool size used for transactions with short expiration times. This makes it so transactions that expire in the next 15 minutes may not take more than one block worth of cost in the mempool
* Drop unused `List[SubEpochSummary]` return
* Drop unused `SubEpochSummary` return
* Raise in `WalletWeightProofHandler.validate_weight_proof`
* Move validation logs
* Set the new weight proof inside `fetch_and_update_weight_proof`
Which was `fetch_and_validate_the_weight_proof` before.
* Drop `WalletWeightProofHandler._weight_proof_tasks`, just await them
Doesn't seem to make a lot sense to have a list of tasks where we always
just add a task, await it and remove it after. This happens in the long
sync so to parent task will cancel the awaited task anyway.
Refactor function `is_trusted_peer` to a standalone easily testable
function. Leverage the existing `is_localhost` function to extend
coverage to IPv6 local address for the trusted peer check
Added tests for the new standalone function
* optimize at-capacity check in mempool.add_to_pool() by only computing the total cost once and remove all items in a single call
* use sqlite logic
* add test for Mempool.add_to_pool() when it's full
* Apply `final` decorator to `DataLayerWallet`
* Simplify `DataLayerWallet.create_new_dl_wallet`
* Simplify `DataLayerWallet.create`
* Improve `WalletStateManager.get_dl_wallet`
* More use of `WalletStateManager.get_dl_wallet`
* Only try `get_dl_wallet`
* prepare mempool spends_by_feerate test for more test cases, move it to test_mempool.py (since it's testing the Mempool class)
* use insertion order as tie-breaker in mempool
* wallet: Improve coin state retry wait logic and improve retry store test
* Avoid sleeping after uncatched exceptions
* Sleep only at the beginning since we have reduced timeout now in tests
* Fix the mempool fee per cost calculation.
It's currently performing integer division instead of float division, resulting in incorrect sorting of mempool items by fee rate. Items with x.y FPC get all treated as items of x.0 FPC.
* Add unit tests for mempool's spends_by_feerate.
* slightly faster nft complex offer tests
* cached bundle, faster offer matching
* nft metadata test fix
* more optimizations
* use get_nft_count method in tests
* use counts in bulk minting, avoid sleep
* flake
* offer cache fix
* forward compat param, max int16
* only parse programs with pairs
* cache offer data on method call, not init
* black
from https://github.com/Chia-Network/chia-blockchain/actions/runs/4455716184/usage i see macos with nominal low 40s runtime and outliers into the low 50s, windows has a wider variance with highs in the low 50s and 8'ish hung runs that timed out at the 75 minute timeout, linux looks like 30'ish with a high of maybe 36.
* enable soft-fork2
* add blockchain (consensus) test for time-lock conditions (non-ephemeral spend)
* introduce new soft-fork rule to compare ASSERT_SECONDS_* conditions against the previous transaction block's timestamp (to be consistent with ASSERT_HEIGHT_* conditions)
* bump chia_rs. This updates the mempool rules to disallow relative height- and time conditions on ephemeral coin spends
* implement assert_before in mempool_check_time_locks. Extend ephemeral coin test in blockchain with assert_before conditions
* implement support for assert_before conditions in compute_assert_height()
* support assert-before in mempool
* add timelock rule
* address review comments
* mempool min fee increase is a constant
* make can_replace() a free function rather than a member of mempool. It doesn't need to be a member, and a free function is easier to test
* simplify can_replace by passing in MempoolItem
* slightly simplify handling of conflicting mempool items in mempool_manager, to avoid double lookups
* simplify can_replace() by just passing removal_names instead of the whole dict
* add unit test for can_replace()
* `assert spend_bundle is not None`, required after hinting in next commit
* Don't start duplicated RPC servers, use the already started ones
* Wait for wallet sync before minting