fix hang / deadlock with wallet filter enabled and other patches#277
Merged
ca333 merged 20 commits intoGLEECBTC:devfrom Jan 27, 2020
Merged
fix hang / deadlock with wallet filter enabled and other patches#277ca333 merged 20 commits intoGLEECBTC:devfrom
ca333 merged 20 commits intoGLEECBTC:devfrom
Conversation
move komodo_passport_iteration and komodo_cbopretupdate from WaitForShutdown loop to separate thread ThreadUpdateKomodoInternals()
for KMD it should be 10, according to prev implementation in WaitForShutdown, for assetchains it should be ASSETCHAINS_BLOCKTIME/5
should be +1 bcz it was loop for(i=0; i<=ASSETCHAINS_BLOCKTIME/5;i++) in original loop.
we don't need iterate all nodes stats inside a miner to know max of (nStartingHeight, nSyncHeight, nCommonHeight) to get longestchain. it's wasting CPU resources. also we don't need additional locks directly in miner.
If any vout of tx is belongs to wallet (IsMine(tx) == true) and tx is not from us, mean, if every vin not belongs to our wallet (IsFromMe(tx) == false), then tx need to be checked through wallet filter. If tx haven't any vin from trusted / whitelisted address it shouldn't be added into wallet. Using GetTransaction instead of myGetTransaction to get prevTx and determine vins addresses. This will allow walletfilter code to work without txindex=1 on any (!) nodes, not only notaries. If even one -whitelistaddress arg set wallet filter is enabled and should allow incoming txes from any addresses belongs to wallet (even watch-only) and addresses listed in -whitelistaddress args. If -whitelistaddress arg is not set wallet filter is disabled.
A rare race condition may trigger while awaiting the body of a message, see upsteam commit libevent/libevent@5ff8eb2 for details. This may fix some reported rpc hangs/crashes. Issue: bitcoin/bitcoin#11593 Commits: - bitcoin/bitcoin@6b58360 - bitcoin/bitcoin@97932cd
Equivalent to zcash#4245
Issue: zcash#3161 Fix commit: zcash@b3594b5
ca333
approved these changes
Jan 27, 2020
tonymorony
approved these changes
Jan 27, 2020
who-biz
pushed a commit
to who-biz/komodo
that referenced
this pull request
Jul 29, 2024
Update deprecation height and version
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
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.
This PR should fix daemon hang / deadlock with wallet filter enabled, also it have some fixes / patches from various upstreams (BTC, ZEC):
-whitelistaddress, but also from all addresses belongs to a walelt. in other words - if any addresses passed via-whitelistaddress, wf is enabled and allows txes only from addresses that belongs to wallet and white-listed addresses. be aware to use wf on z-tx (private tx) enabled chains, bcz it possible can reject tx from z->t. it designed only for ac_public chains only and KMD itself.