Sapling milestone 5: Graphical User Interface #1963
Conversation
7f57aa8 to
a175b54
Compare
|
Updated per @NoobieDev12 (ambassador) initial testing 👌 . More are coming |
|
Needs rebase after 1964 merge. |
2dfc02f to
6f338a4
Compare
|
rebased, conflicts solved. |
2afbbf3 to
9648dc7
Compare
|
rebased on top of #1977 (needed for the coin control notes selection process) and solved conflicts with master's recently merged PRs. |
…eanup and improvements 71e1f98 Wallet + GUI: IsChange function + coin control, setting change label for the change outputs (furszy) a463ac2 Model:ListCoins, abstracted returned value into a wrapper in order to be able to return unspent notes in the future as well. (furszy) 8ca9d45 GUI: coin control dialog, abstracting out row load. (furszy) 18e2761 GUI: coinControlDialog removing now unneded qt5.3 and qt5.4 workaround. Our minimum version is qt5.5 (furszy) fd19626 GUI: coinControlDialog removing unnecessary uncompressed keys size calculation. Our reference client is not creating them by default. Most likely never did it. (furszy) 3420701 GUI: coinControlDialog removing an totally redundant, unnecessary and badly coded function. (furszy) 30f67e0 wallet: moving ListLockedCoins to directly return the set instead of loop over it and then return it. (furszy) 9927b08 Wallet and GUI: remove unused tx priority calculation and send free transaction flag (furszy) f602fab CoinControlDialog::updateView removing redundant labelForAddress call. (furszy) 8aac899 CoinControlDialog::updateView removing never used dead code. The `sAddress == sWalletAddress` has been always true. (furszy) a19eb53 CoinControlDialog: making use of the new optional staker addresses that is retrieved by ListCoins (furszy) f2297a6 WalletModel::listCoins P2CS utxo grouped properly. (furszy) 6752f5b coin control, update view: removing unused priority calculation. (furszy) 031b006 Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0; (practicalswift) cf42757 [qt] coincontrol: Remove unused qt4 workaround (MarcoFalke) 100c006 coin control, update view method refactored pulling the output basic values to the top of the method. (furszy) a10cdcb walletModel: listCoins cleaning an overkill to get the address that originated the change (furszy) b65e670 walletModel: listCoins removing a unneeded ListLockedCoins call plus followup loop over the returned vector. (furszy) 3b9bf04 wallet::AvailableCoins introduced flag for including or not locked coins. (furszy) 831d10b wallet::AvailableCoins filter struct instead of having an endless amount of arguments in the function signature. (furszy) Pull request description: Base initial work in order to be able to generalize `CoinControlDialog` up to the point of introducing shielded notes selection (being developed in the Sapling GUI PR #1963). Found several redundancies and not so good code over the overall `CoinControlDialog` class. So.. have re-structured it in a large percentage, aiming to improve the performance and clean all of the inefficiencies. ACKs for top commit: random-zebra: Nice stuff 🥃 ACK 71e1f98 Fuzzbawls: ACK 71e1f98 Tree-SHA512: a905c987e832242d4c58c6dcc4ffba6a02d238da30180847475aa4fa5574d9e46730f397449f27be81005994147c4079ac5bb39da7b38845bfe5c0cf8c3205ab
75b191c to
05483e4
Compare
random-zebra
left a comment
There was a problem hiding this comment.
Code review ACK till db3707f242e446ecfc92a0fc26a47b719bfc29bf.
Looking pretty good so far.
Left a couple talking points, mostly about ::IsMine, which could be much faster I think, and about the management of shielded watch-only addresses in getbalance.
05483e4 to
798ccb0
Compare
|
Nice feedback :), will work on it. |
798ccb0 to
dfdb013
Compare
random-zebra
left a comment
There was a problem hiding this comment.
Up to 01548f51844ae33f703e975a8d7a1763acaf0280...
random-zebra
left a comment
There was a problem hiding this comment.
Code review, and light-testing ACK dfdb0131fe79ca638af16156dc5803965e8f0c23.
Left some more comments.
Will do some more focused testing in the next days, but overall looks awesome. Great job 🥃
There was a problem hiding this comment.
nit: in the future this could be refactored to remove the code duplication, adding a per-outpoint filter to SaplingScriptPubKeyMan::GetFilteredNotes
There was a problem hiding this comment.
nit: unify this check and the one at lines 332-333, by putting it outside of if (hasCoinControl) {} else {}.
dfdb013 to
f8fbf61
Compare
|
Awesome feedback zebra!, have started moving over all of the topics. |
f8fbf61 to
5b546aa
Compare
|
Updated per zebra's feedback (almost all of them tackled) plus pushed few more integrations (shielded tx fee visualization, tx dialog inputs view alignment fix and connected shielded txs & addresses filters in the dashboard and the addressbook export). |
Thus making the GUI display a balance higher than it should.
|
Changes from @random-zebra merged, PR link, lot of awesome changes 🚀 . |
random-zebra
left a comment
There was a problem hiding this comment.
Maybe worth keeping the shield category too, but including all possible related types?
filter->addItem(QObject::tr("Shield"),
TransactionFilterProxy::TYPE(TransactionRecord::RecvWithShieldedAddress) |
TransactionFilterProxy::TYPE(TransactionRecord::SendToShielded) |
TransactionFilterProxy::TYPE(TransactionRecord::SendToSelfShieldToShieldChangeAddress) |
TransactionFilterProxy::TYPE(TransactionRecord::SendToSelfShieldToTransparent) |
TransactionFilterProxy::TYPE(TransactionRecord::SendToSelfShieldedAddress));f63065e to
bc672d4
Compare
8ba335a to
78dda88
Compare
|
Pushed few more commits. All visual findings discovered testing the PR. |
Fuzzbawls
left a comment
There was a problem hiding this comment.
Very nice work here! I've left some nit comments that i'd be ok with addressing in a follow-up PR as this is already getting massive. I've notices some consistency issues when starting the wallet with a mix of -reindex/-zapwallettxes=2, but I think it would be best to tackle those issues in subsequent PRs
There was a problem hiding this comment.
would change this to Transfer coins publicly or privately
There was a problem hiding this comment.
change to Select which coins to spend (more direct)
There was a problem hiding this comment.
spacing on this line, and styling on the previous line (brace should be on a new line of it's own)
There was a problem hiding this comment.
brace should be on a new line
…ansactions plus setting the address receiving the shielded funds.
e5b8434 to
64d3175
Compare
@NoobieDev12 you are definitely sure to be testing the latest commit? |
|
Anyway... as Fuzz said, this has become a massive change-set, so am going to merge it now. |
|
@random-zebra Yeah, I'm still seeing these issues I mentioned above. I checked |
1192272 [Cleanup] Remove CBaseOutPoint::GetHash() now unused (random-zebra) 1467074 [Refactoring] Index mapVotes by mnIds (outpoints) (random-zebra) 715c9ad [BUG] Fix CBudgetProposal/CFinalizedBudget::GetVotesHashes (random-zebra) 7420ef7 [RPC] fix vote hashes and masternode collateral outpoints (random-zebra) Pull request description: `BaseOutPoint` has a member variable named `hash`, but `GetHash()` does not return its value. It returns the hash of the serialized class (`hash` and `n`) instead. This is confusing and might lead to sneaky bugs (in fact, it already did in the past: #1963 (comment)) Further, the implementation of `GetHash()` is rather ugly, as it accesses the singleton pointer `&this->n` as an array (with `BEGIN()`/`END()`), which could result in misinterpretation or corruption of adjacent memory locations. This function is used only in two places: - in the RPC `getbudgetvotes` for the key `"nHash"`. This is wrong, as nHash is supposed to be the **vote** hash (as described in the help), and not the collateral outpoint hash. - to index `mapVotes` inside budgets and proposal objects. Here we can just index directly by collateral outpoint (instead of its hash). With these two changes, we can get rid of `BaseOutPoint::GetHash`. This also fixes another bug fund along the way: `CBP/CFB::GetVotesHashes` should return the vote hashes, not the masternode collateral hash. Note: `mapVotes` is not directly sent on the network, it is only stored locally for each proposal. ACKs for top commit: furszy: Code review ACK 1192272. Fuzzbawls: utACK 1192272 Tree-SHA512: 17c1b2644ebd26ece903fc5c0ae522bd24a38ee828511b01ba0ffbb27e3871906ee2ddc2248599e019f4d44d33b36219916e067bb9217a96998b02cec56a2340
Essentially covering the last milestone to Sapling. Implementing the graphical user interface for the new privacy protocol: adding shielded transactions and addresses (own addresses and contacts) creation and management visual workflows, and shielded balances presentation and update.
Following points are covered (divided by areas):
Visual interface:
Wallet:
Addressbook:
RPC:
TODO:
Extra note:
This is still under WIP tag, wording and visuals can change with the usage and feedback :) . Plus could have some issues that I'm currently fixing.