-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: use MiniWallet for feature_fee_estimation.py #24817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
maflcko
merged 1 commit into
bitcoin:master
from
theStack:202204-test-use_MiniWallet_for_feature_fee_estimation
Apr 11, 2022
Merged
test: use MiniWallet for feature_fee_estimation.py #24817
maflcko
merged 1 commit into
bitcoin:master
from
theStack:202204-test-use_MiniWallet_for_feature_fee_estimation
Apr 11, 2022
Conversation
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
This test can now be run even with the Bitcoin Core wallet disabled.
Contributor
|
tACK 494455f . The test runs successfully with the wallet disabled. |
vincenzopalazzo
approved these changes
Apr 10, 2022
vincenzopalazzo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 494455f
badhikar
approved these changes
Apr 11, 2022
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Apr 11, 2022
494455f test: use MiniWallet for feature_fee_estimation.py (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (feature_fee_estimation.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in bitcoin#20078. It takes use of the recently introduced methods `{create,send}_self_transfer_multi` (bitcoin#24637) which allows to specify multiple UTXOs to be spent rather than only one. Very likely the test can still be simplified (e.g. coin selection in `small_txpuzzle_randfee`), but this is a first step. ACKs for top commit: ayush933: tACK 494455f . The test runs successfully with the wallet disabled. vincenzopalazzo: tACK bitcoin@494455f Tree-SHA512: 89789fc34a4374c79c4b90acd926ac69153aad655dab50450ed796f03c770bd675ad872e906f516f90e8d4cb40b83b55f3c78a94b13bfb8fe8f5e27624937748
Contributor
|
Possibly related: #24828 |
maflcko
pushed a commit
to maflcko/bitcoin-core
that referenced
this pull request
May 3, 2022
…s (feature_fee_estimation.py performance fix) a498acc test: MiniWallet: skip mempool check if `mempool_valid=False` (Sebastian Falbesoner) 01552e8 test: MiniWallet: always rehash after signing (P2PK mode) (Sebastian Falbesoner) Pull request description: MiniWallet's core method for creating txs (`create_self_transfer`) right now always executes the `testmempoolaccept` RPC to check for mempool validity or invalidity. In some test cases where we use MiniWallet to create a huge number of transactions this can lead to performance issues, in particular feature_fee_estimation.py where the execution time after MiniWallet usage (PR bitcoin#24817) doubled, see bitcoin#24828 (comment), bitcoin#24828 (comment). This PR mitigates this by skipping the mempool check if the parameter `mempool_valid` is set to `False`. As a preparatory commit, the test feature_csv_activation.py has to be adapted w.r.t. to rehashing of transactions, as we now hash all transactions immediately in `create_self_transfer` in order to get the txid (before we relied on the result of `testmempoolaccept`). On my machine, this decreases the execution time quite noticably: master branch: ``` $ time ./test/functional/feature_fee_estimation.py real 3m20.771s user 2m52.360s sys 0m39.340s ``` PR branch: ``` $ time ./test/functional/feature_fee_estimation.py real 2m1.386s user 1m42.510s sys 0m22.980s ``` Partly fixes bitcoin#24828 (hopefully). ACKs for top commit: danielabrozzoni: tACK a498acc Tree-SHA512: f20c358ba42b2ded86175f46ff3ff9eaefb84175cbd1c2624f44904c8d8888e67ce64d6dcbb26aabbf07906e6f5bdea40353eba9ae668618cadcfc517ef7201b
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
May 4, 2022
…s (feature_fee_estimation.py performance fix) a498acc test: MiniWallet: skip mempool check if `mempool_valid=False` (Sebastian Falbesoner) 01552e8 test: MiniWallet: always rehash after signing (P2PK mode) (Sebastian Falbesoner) Pull request description: MiniWallet's core method for creating txs (`create_self_transfer`) right now always executes the `testmempoolaccept` RPC to check for mempool validity or invalidity. In some test cases where we use MiniWallet to create a huge number of transactions this can lead to performance issues, in particular feature_fee_estimation.py where the execution time after MiniWallet usage (PR bitcoin#24817) doubled, see bitcoin#24828 (comment), bitcoin#24828 (comment). This PR mitigates this by skipping the mempool check if the parameter `mempool_valid` is set to `False`. As a preparatory commit, the test feature_csv_activation.py has to be adapted w.r.t. to rehashing of transactions, as we now hash all transactions immediately in `create_self_transfer` in order to get the txid (before we relied on the result of `testmempoolaccept`). On my machine, this decreases the execution time quite noticably: master branch: ``` $ time ./test/functional/feature_fee_estimation.py real 3m20.771s user 2m52.360s sys 0m39.340s ``` PR branch: ``` $ time ./test/functional/feature_fee_estimation.py real 2m1.386s user 1m42.510s sys 0m22.980s ``` Partly fixes bitcoin#24828 (hopefully). ACKs for top commit: danielabrozzoni: tACK a498acc Tree-SHA512: f20c358ba42b2ded86175f46ff3ff9eaefb84175cbd1c2624f44904c8d8888e67ce64d6dcbb26aabbf07906e6f5bdea40353eba9ae668618cadcfc517ef7201b
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR enables one more of the non-wallet functional tests (feature_fee_estimation.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078. It takes use of the recently introduced methods
{create,send}_self_transfer_multi(#24637) which allows to specify multiple UTXOs to be spent rather than only one. Very likely the test can still be simplified (e.g. coin selection insmall_txpuzzle_randfee), but this is a first step.