-
Notifications
You must be signed in to change notification settings - Fork 173
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
Fix and optimize ResendWalletTransactions #2642
Merged
jamescowens
merged 4 commits into
gridcoin-community:development
from
jamescowens:fix_ResendWalletTransactions
Mar 14, 2023
Merged
Fix and optimize ResendWalletTransactions #2642
jamescowens
merged 4 commits into
gridcoin-community:development
from
jamescowens:fix_ResendWalletTransactions
Mar 14, 2023
Conversation
This file contains 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
jamescowens
force-pushed
the
fix_ResendWalletTransactions
branch
from
February 23, 2023 19:49
51b64ca
to
0991d67
Compare
jamescowens
changed the title
Fix and optimize ResentWalletTransactions
Fix and optimize ResendWalletTransactions
Feb 23, 2023
denravonska
reviewed
Feb 24, 2023
jamescowens
force-pushed
the
fix_ResendWalletTransactions
branch
5 times, most recently
from
February 26, 2023 02:00
69c6c41
to
318a08d
Compare
jamescowens
force-pushed
the
fix_ResendWalletTransactions
branch
4 times, most recently
from
February 26, 2023 23:27
d2029ed
to
15a1106
Compare
jamescowens
force-pushed
the
fix_ResendWalletTransactions
branch
from
March 3, 2023 18:23
15a1106
to
80c5c92
Compare
This commit ensure that only transactions that do not have a hashBlock (i.e. were in a chain already) are NOT in the main chain and NOT in the mempool are relayed after additional checks. The original function did not have the proper filtering, and was essentially queuing up every transaction in the wallet to be resent. This bug has been present forever. Note that it was made worse when the transaction validation was tightened in 5.4.1.0 to strictly check GRC contracts.
The very aggressive ResendWalletTransactions in 5.4.1.0 may have inappropriately removed MRC request transactions (NOT payments) from wallets. This will automatically recover those transactions at startup. An attribute flag is set in the wallet db to indicate this is successful so that it can be skipped on subsequent startups.
jamescowens
force-pushed
the
fix_ResendWalletTransactions
branch
from
March 3, 2023 21:05
80c5c92
to
1d0a750
Compare
div72
reviewed
Mar 14, 2023
Co-authored-by: div72 <60045611+div72@users.noreply.github.com>
Co-authored-by: div72 <60045611+div72@users.noreply.github.com>
div72
approved these changes
Mar 14, 2023
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.
jamescowens
added a commit
to jamescowens/Gridcoin-Research
that referenced
this pull request
Mar 26, 2023
Added - key, wallet: HD wallets gridcoin-community#2540 (@div72) - ARMv8 SHA2 Intrinsics gridcoin-community#2612 (@barton2526) - build: vendor bdb 5.3 gridcoin-community#2620 (@div72) - scraper, gui: Add external adapter projects indication gridcoin-community#2625 (@jamescowens) - gui: implement INSUFFICIENT_MATURE_FUNDS status for the mrcmodel gridcoin-community#2628 (@jamescowens) - gui, accrual: Implement accrual limit warning gridcoin-community#2636 (@jamescowens) - rpc: add `getnodeaddresses` gridcoin-community#2646 (@Pythonix) - consensus: Add new checkpoints gridcoin-community#2651 (@barton2526) Changed - voting: Optimize poll locks gridcoin-community#2619 (@jamescowens) - util: move threadinterrupt.{cpp,h} to util gridcoin-community#2613 (@Pythonix) - gui, voting: Update pool cpids and avw rules gridcoin-community#2624 (@jamescowens) - ci: bump python and setup-python action version gridcoin-community#2626 (@div72) - gui: Change text from username to name (real name or nickname) gridcoin-community#2633 (@jamescowens) - locale: Translation update, phase 1 gridcoin-community#2637 (@jamescowens) - gui: Change MRC too soon to submit error to be less confusing gridcoin-community#2645 (@jamescowens) - locale: Update translations prior to release (phase 2/2) gridcoin-community#2658 (@jamescowens) - gui: Enhance MRC request form to avoid fee boost field confusion gridcoin-community#2659 (@jamescowens) Removed none Fixed - net: Turn net structures into dumb storage classes (backport) gridcoin-community#2561 (@Pythonix) - build: Include native_X.mk before X.mk gridcoin-community#2609 (@barton2526) - depends: fix OpenSSL for Darwin builds gridcoin-community#2610 (@div72) - build: Change actions runner image to Focal, Force Lint to use 22.04, Change cd runner version gridcoin-community#2611 (@barton2526) - gui: don't show datadir error msgbox if arg isn't specified gridcoin-community#2617 (@div72) - rpc: Repair auditsnapshotaccrual rpc function gridcoin-community#2621 (@jamescowens) - gui: Correct updateBeaconIcon() function in bitcoingui.cpp gridcoin-community#2622 (@jamescowens) - wallet: Strengthen CWalletTx::RevalidateTransactions gridcoin-community#2627 (@jamescowens) - test: Fix Wambiguous-reversed-operator compiler warning, drop boost::assign gridcoin-community#2632 (@barton2526) - gui: Fix wallet overview displaying lower-case poll name gridcoin-community#2640 (@delta1513) - Fix and optimize ResendWalletTransactions gridcoin-community#2642 (@jamescowens) - build(nsis): Write registry keys to HKLM instead of HKCU, Install shortcuts for all users, Fix INSTALLDIR removal bug gridcoin-community#2643 (@sitiom) - gui: Fix TransactionRecord::decomposeTransaction to properly display self-sidestake gridcoin-community#2647 (@jamescowens) - rpc: Fixed the RPC error when running `help voting` while syncing gridcoin-community#2649 (@delta1513) - build: Fix compilation with GCC 13 gridcoin-community#2653 (@theMarix) - rpc: Formatting - typo correction rpc help for listresearcheraccounts gridcoin-community#2654 (@PrestackI)
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 corrects and optimizes the behavior of ResendWalletTransactions.
The original function did not have the proper filtering, and was essentially queuing up every transaction in the wallet to be resent. This bug has been present forever. Note that it was made worse when the transaction validation was tightened in 5.4.1.2 to strictly check GRC contracts. It also had the unintended impact of possibly deleting MRC request transactions (NOT the payments) from the wallet database.
This PR implements a targeted automatic rescan to recover those.