-
Notifications
You must be signed in to change notification settings - Fork 73
ZDAG fixes + miner code related to input conflicts #392
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
Conversation
willyko
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.
ACK
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
txmempool has a comparator which does hash if the ancestor account is equal so fall back to time in that case
Keyare
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.
Ack
| return CTxMemPool::CompareIteratorByHash()(a, b); | ||
| // SYSCOIN | ||
| return a->GetTime() < b->GetTime(); | ||
| } |
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.
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.
* 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]>
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
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: