Commit Graph

20 Commits

Author SHA1 Message Date
Arvid Norberg
b48c91618f
require npc_result to be set in mempool items added to the mempool (#14624) 2023-02-21 12:25:22 -06:00
Amine Khaldi
98d4436f95
Merge commit '9be3c7d00ae99105c40913aff1b07e97657609fb' into checkpoint/main_from_release_1.7.0_9be3c7d00ae99105c40913aff1b07e97657609fb 2023-02-07 21:33:21 +01:00
Amine Khaldi
4ec43caf20
Merge commit '83c864b2f099afcbf93845d9e720a523d11a3eaa' into checkpoint/main_from_release_1.7.0_83c864b2f099afcbf93845d9e720a523d11a3eaa 2023-02-07 17:13:18 +01:00
Adam Kelly
9be3c7d00a
Ensure fee estimates monotonically decrease with time (#14368)
* Ensure fee estimates monotonically decrease with time

* Improve function naming and document use

* type checking
2023-02-06 12:53:03 -06:00
Adam Kelly
83c864b2f0
Correct fee estimate calculation to be in mojos, not millimojos (#14474) 2023-02-04 14:09:39 -06:00
Matt Hauff
97230ca3b0
Add a way to import a SpendSim and SimClient as a contextmanager (#14434) 2023-01-31 19:22:06 -06:00
Adam Kelly
7bdf7dc478
Change names used to look up estimated spendbundle sizes in get_fee_estimate RPC (#14369)
* Change names used to look up estimated spendbundle sizes in get_fee_estimate RPC

* Update tests

* add test for get_spendbundle_type_cost

* add spend_count to get_fee_estimate

* Update chia/rpc/full_node_rpc_api.py

Co-authored-by: Jeff <jeff@chia.net>

Co-authored-by: Jeff <jeff@chia.net>
2023-01-20 11:59:08 -06:00
Adam Kelly
0f2995e4a1
Move table of SpendBundle costs to backend (#14367) 2023-01-19 15:39:35 -06:00
Adam Kelly
d83c93bb2b
It is okay to return a result in some cases when median == -1 (#14285)
* It is okay to return a result in some cases when median == -1. These cases are handled in the call to parse()

* Remove incorrect test
2023-01-13 16:09:40 -06:00
Adam Kelly
e59666b319
Improve command line info display for fee estimation (#14336)
* Improve command line info display for fee estimation

* Update test
2023-01-13 12:23:22 -06:00
Adam Kelly
06eb18217e
Test get_bucket_index (#14294)
* Test get_bucket_index

* Apply epsilon to test constants

* Simplify get_bucket_index
2023-01-13 11:16:23 -06:00
Adam Kelly
b71eaa0a8e
Call method to process transactions added to mempool in Fee Estimator (#14290) 2023-01-06 14:18:52 -06:00
Adam Kelly
820493ffa8
Add new_block_height to FeeEstimatorInterface (#14277)
* Add new_block_height to FeeEstimatorInterface

* Fancy-up create_test_block_record, rename test

* Integrate new interface method
2023-01-05 15:34:53 -06:00
Adam Kelly
8364166de1
Add MempoolRemoveReason, which represents why we are removing a MempoolItem (#14263)
* Add MempoolRemoveReason, which represents why we are removing a MempoolItem

* Add integration tests for remove_from_pool. Generalize call count tracking in mock Fee Estimator.
2023-01-03 17:08:18 -06:00
Adam Kelly
d48e65e749
Fix fee estimator being re-created every block (#14175)
* Hold a ref to the fee estimator when the Mempool is destroyed and re-created. Unify the sharing of information between Mempool and MempoolManager

* Adjust tests to new Mempool create interface

* Store dynamic Mempool info in the FeeEstimator and static info in the Mempool

* Adjust tests

* Restore logging of block cost % calculation to use documented full block size

* Omit check for nil self.last_mempool_info

* Annotate Mempool members

* Add integration test for add_mempool_item

* Annotate types in BitcoinFeeEstimator class
2023-01-02 15:02:10 -06:00
Adam Kelly
407c0ba4a4
Fixes the case when a fee estimation request is made before the FullNode has initialized a peak (#14193)
* Fixes the case when a fee estimation request is made before the FullNode has initialized a peak

* Clarify code by setting defaults early

* Only spawn one full node in test
2022-12-23 11:31:44 -06:00
Adam Kelly
2762490fd1
Create logger object in module instead of passing it in (#14173) 2022-12-16 20:52:47 -06:00
Adam Kelly
5cbc415589
Preserve correct MempoolItem block height when rebuilding mempool (#13951) 2022-11-21 16:28:48 -06:00
Amine Khaldi
73acfc7409
Don't hold removals twice in mempool items as they're already part of the underlying spend bundle. (#13694) 2022-11-01 15:41:23 -05:00
Adam Kelly
73e9d15cf7
Fee estimation. (#13645) 2022-10-18 09:12:22 -05:00