forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: support rpc protx-register for descriptor wallets - part VI #6003
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
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
5 tasks
PastaPastaPasta
added a commit
that referenced
this pull request
May 3, 2024
10869ff fix: order of locks cs_wallet and cs_main in rpc/evo (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Changing order of locking `cs_main` and `cs_wallet` to prevent a deadlock. There's call `protx_list` -> `BuildDMNListEntry` -> `CheckWalletOwnsScript`: ``` return WITH_LOCK(pwallet->cs_wallet, return pwallet->IsMine(script)) == isminetype::ISMINE_SPENDABLE; ``` It can cause a deadlock due to wrong order of locks (cs_wallet supposed to be blocked in prior of cs_main) ## What was done? This PR adds and extra lock of cs_wallet and reduce scope of cs_main for a bit ## How Has This Been Tested? Deadlock warning is reproduced with this PR: #6003 ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone Top commit has no ACKs. Tree-SHA512: 6d166fe7c47067c1c6d889d87e015ff3bc43aa9f66234341840cc8465ce00a79e7140bc09cbdb2fd08feaae5463b320e0b66bbe410422783f86cbc9d616af6b3
|
This pull request has conflicts, please rebase. |
46ac531 to
a25b163
Compare
a25b163 to
b5897c7
Compare
Enables for rpc_quorum.py, feature_notifications.py see dashpay#5981, it partial revert of b20f812
That are: - feature_dip3_deterministicmns.py - interface_zmq_dash.py - feature_governance.py - wallet_upgradetohd.py (as expected to be implemented for legacy-only wallets) - p2p_timeouts.py (why? can not understand it) This partially reverts commit b20f812.
b5897c7 to
a33dcb3
Compare
UdjinM6
approved these changes
May 7, 2024
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.
utACK
PastaPastaPasta
approved these changes
May 14, 2024
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.
utACK a33dcb3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue being fixed or feature implemented
Many rpc such as
protx registeruses forcely LegacyScriptPubKeyMan instead using CWallet's interface.It causes a failures such as
for all functional tests that uses Masternodes/evo nodes.
See https://github.com/dashpay/dash-issues/issues/59 to track progress
What was done?
Some direct usages of LegacyScriptPubKeyMan refactored to use CWallet's functionality.
There are still 4 functional tests that doesn't work for descriptor wallets:
protx updateregistar)governance votemanyandgovernance votealiasThat's part I of changes, other changes are not PR-ready yet, WIP.
How Has This Been Tested?
Firstly, the flag
--legacy-walletsare removed for many functional tests.Secondly, the flag
--descriptorsis inverted in default value:Breaking Changes
N/A, descriptor wallets have not been publicly released yet
Checklist: