ZDAG fixes + miner code related to input conflicts#392
Merged
Conversation
modify removeConflicts to return a bool (for miner) if conflict got removed so miner can try again to create a new block. Also miner verifies inputs are valid or rejects/clears tx because a remnant from a input conflict where one got mined and the other stays (removeConflicts returns false but the input isn't valid in the mainchain because its spent) zdag uses existsConflict so it doesnt remove it and subsequent calls pass to verifyzdag in the event of an error the first time due to inputs conflict
willyko
previously approved these changes
Jan 31, 2020
txmempool has a comparator which does hash if the ancestor account is equal so fall back to time in that case
willyko
approved these changes
Feb 1, 2020
sidhujag
commented
Feb 1, 2020
| return CTxMemPool::CompareIteratorByHash()(a, b); | ||
| // SYSCOIN | ||
| return a->GetTime() < b->GetTime(); | ||
| } |
Member
Author
There was a problem hiding this comment.
This is a critical improvement by removing ordering by time in graph.cpp we simply modify the comparator to return time ordering if ancestor counts are equal, we want ancestor ordering to be higher prescedence anyways followed by time so this shoudl work for us.
sidhujag
pushed a commit
to syscoin-core/syscoin
that referenced
this pull request
Nov 10, 2020
* ZDAG fixes + miner code related to input conflicts fixes syscoin#391 * Update configure.ac * add existsConflict logic modify removeConflicts to return a bool (for miner) if conflict got removed so miner can try again to create a new block. Also miner verifies inputs are valid or rejects/clears tx because a remnant from a input conflict where one got mined and the other stays (removeConflicts returns false but the input isn't valid in the mainchain because its spent) zdag uses existsConflict so it doesnt remove it and subsequent calls pass to verifyzdag in the event of an error the first time due to inputs conflict * remove graph ordering by time logic txmempool has a comparator which does hash if the ancestor account is equal so fall back to time in that case * rm graph Co-authored-by: Jonas Schnelli <[email protected]>
sidhujag
pushed a commit
that referenced
this pull request
Aug 5, 2021
d54d949 qt: Fix regression in "Encrypt Wallet" menu item (Hennadii Stepanov) Pull request description: Fix #392. Adding a new item to the `m_wallet_selector` must follow the establishment of a connection between the `WalletView::encryptionStatusChanged` signal and the `BitcoinGUI::updateWalletStatus` slot. This was a regression introduced in bitcoin@20e2e24 (#29). --- An _encrypted_ wallet being auto-loaded at the GUI startup: - on master (eaf09bd)  - with this PR  ACKs for top commit: achow101: ACK d54d949 jarolrod: ACK d54d949 Tree-SHA512: 669615ec8e1517c2f4cdf59bd11a7c85be793ba0dda112361cf95e6c2f0636215fed331d26a86dc9b779a49defae1b248232f98dab449584376c111c288e87bb
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.
fixes #391
Miners were not able to mine a block due to conflicting inputs caused by inadvertent test where input was relayed by nodes based on correct functioning of our protocol to relay dbl spends related to asset allocation.
To reproduce:
Fix: