Skip to content
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

feat: make a support of Qt app to show Platform transfer Tx #6131

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

knst
Copy link
Collaborator

@knst knst commented Jul 19, 2024

Issue being fixed or feature implemented

Transfers from platform have incorrectly shown amount in Dash Core wallet app.
They also shown in Qt app as self-send that is not completely true.

What was done?

Added new type of transaction to Qt App, added a filter for its type, fixed calculation of output for tx records.
As well added a new type of transaction platform-transfer in rpc output of gettransaction RPC

How Has This Been Tested?

Make a Platform Transfer transaction on RegTest and check it in Dash Core

image

Helper to see it: export dpath=/tmp/dash_func_test_PATHPATH/ ; src/qt/dash-qt -regtest -conf=$dpath/node0/dash.conf -datadir=$dpath/node0/ -debug=0 -debuglogfile=/dev/stdout

Breaking Changes

There's new type of transaction "platform-transfer" in rpc output of gettransaction.

This PR DOES NOT change any consensus rules.
Breaking changes that makes withdrawal transaction immature is moved to #6128

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added RPC Some notable changes to RPC params/behaviour/descriptions backport-candidate-21.0.x labels Jul 19, 2024
@knst knst added this to the 21 milestone Jul 19, 2024
@knst knst requested review from UdjinM6 and PastaPastaPasta July 19, 2024 10:30
@knst knst force-pushed the feat-withdrawals-qt branch 2 times, most recently from fbd50cf to b9118f5 Compare July 19, 2024 14:10
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b9118f5 looks incomplete - you just import a key but you don't check any tx/rpc

@kxcd
Copy link

kxcd commented Jul 20, 2024

The term withdrawal will be confusing. Suggest different name eg Asset pool to denote it comes from an asset pool, or more specifically Platform to indicate this is coming from Platform. It will be clear this a credit to the wallet, so no need to muddy the waters with terms like withdrawal.

@knst
Copy link
Collaborator Author

knst commented Jul 20, 2024

@thephez

The term withdrawal will be confusing.

Could you suggest? just "Asset unlock" is not good too.
Internally we already call it asset unlock or withdrawal.

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General NACK for v21.0; we are in feature freeze and releasing in 9 days. We need to avoid new features at all costs. We can include this in a fast following 21.1

@thephez
Copy link
Collaborator

thephez commented Jul 20, 2024

@thephez

The term withdrawal will be confusing.

Could you suggest? just "Asset unlock" is not good too. Internally we already call it asset unlock or withdrawal.

Yes, we should think about this. I agree with @kxcd. It will be confusing because it is not a withdrawal from the wallet's perspective - it's an incoming tx just like a masternode reward, incoming payment, etc. Maybe something like platform transfer or asset/credit pool distribution. If we used * transfer, it could also be used to show asset lock txs as well as unlocks. What do you guys think?

@knst knst modified the milestones: 21, 21.1 Jul 20, 2024
@kxcd
Copy link

kxcd commented Jul 22, 2024

Thanks Phez, I like Platform Transfer best. Though I also like asset/credit pool and then let the wallet show you the direction since we can both send into Platform and receive from Platform, ideally, the name is the same for both transactions, just the direction will be different. The good thing about Platform Transfer is it can be in or out, it's directionless.

@knst knst changed the title feat: make a support of Qt app to show withdrawal transaction feat: make a support of Qt app to show Platform transfer Tx Jul 22, 2024
@knst knst force-pushed the feat-withdrawals-qt branch from b9118f5 to 70cbef9 Compare July 22, 2024 19:56
UdjinM6
UdjinM6 previously approved these changes Jul 22, 2024
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 70cbef9 (mac-build CI failure is unrelated)

@PastaPastaPasta
Copy link
Member

I want @thephez's approval for terminology / UX. I think I generally agree with him and @kxcd that "withdrawal" is confusing

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general NACK on "withdrawal" terminology. Want utACK from @thephez / suggestions

@knst
Copy link
Collaborator Author

knst commented Aug 2, 2024

general NACK on "withdrawal" terminology. Want utACK from @thephez / suggestions

current version has mentioning of withdrawal only in functional tests, Qt & rpc are updated already

@PastaPastaPasta
Copy link
Member

general NACK on "withdrawal" terminology. Want utACK from @thephez / suggestions

current version has mentioning of withdrawal only in functional tests, Qt & rpc are updated already

Maybe add information about what the terms are then in description?

@@ -408,6 +408,7 @@ struct WalletTx
int64_t time;
std::map<std::string, std::string> value_map;
bool is_coinbase;
bool is_platform_transfer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know none of the others do it, but we should ensure these are always initialized

Suggested change
bool is_platform_transfer;
bool is_platform_transfer{false};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please squash 9748a04 into a9a7f07

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knst knst force-pushed the feat-withdrawals-qt branch 2 times, most recently from 3cd2115 to 9748a04 Compare August 5, 2024 10:24
@knst
Copy link
Collaborator Author

knst commented Aug 5, 2024

@knst knst force-pushed the feat-withdrawals-qt branch from 70cbef9 to 3cd2115

there's extra fixes and improvements. Also PR description is updated and re-made a screenshot with "platform transfer" instead "withdrawal"

@knst knst force-pushed the feat-withdrawals-qt branch from 3cd2115 to 9748a04

rebased on the top of current develop

Copy link
Collaborator

@thephez thephez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Platform transfer" terminology works for me 👍

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 21f174a

@PastaPastaPasta PastaPastaPasta merged commit a9979eb into dashpay:develop Aug 7, 2024
7 of 8 checks passed
@knst knst deleted the feat-withdrawals-qt branch August 7, 2024 03:15
@UdjinM6 UdjinM6 modified the milestones: 21.1, 21.2 Aug 8, 2024
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Oct 22, 2024
…ransfer Tx

21f174a feat: improve query categorisation in Qt App (Konstantin Akimov)
c863473 test: add spending asset unlock tx in functional tests (Konstantin Akimov)
1fb67ec feat: make a support of Qt app to show Platform Transfer transaction as a new type of transaction (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Transfers from platform have incorrectly shown amount in Dash Core wallet app.
  They also shown in Qt app as self-send that is not completely true.

  ## What was done?
  Added new type of transaction to Qt App, added a filter for its type, fixed calculation of output for tx records.
  As well added a new type of transaction `platform-transfer` in rpc output of `gettransaction` RPC

  ## How Has This Been Tested?
  Make a Platform Transfer transaction on RegTest and check it in Dash Core

  ![image](https://github.com/user-attachments/assets/16c83f09-724f-4b8b-99c8-9bb0df1428da)

  Helper to see it: export dpath=/tmp/dash_func_test_PATHPATH/ ; src/qt/dash-qt -regtest -conf=$dpath/node0/dash.conf -datadir=$dpath/node0/ -debug=0 -debuglogfile=/dev/stdout

  ## Breaking Changes
  There's new type of transaction "platform-transfer" in rpc output of `gettransaction`.

  **This PR DOES NOT change any consensus rules.**
  Breaking changes that makes withdrawal transaction immature is moved to dashpay#6128

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: ec2a54a910f121ad30ff8e94cf17080b5b3c651872e9bc3de9ec0924ca7f7a0e526b74b05cde26aaf860e3809e67f66142112319a69c216527e5bcb1b8a2b8f6
@UdjinM6 UdjinM6 modified the milestones: 21.2, 21.1.1 Oct 22, 2024
PastaPastaPasta added a commit that referenced this pull request Oct 22, 2024
d627a6e chore: bump version to 21.1.1 (pasta)
5f9700c docs: release notes for v21.1.1 (pasta)
1c00726 Merge #6277: chore: add builder key for kittywhiskers (pasta)
a2bc0f1 Merge #6290: chore: update pasta gpg key to reflect new subkeys (pasta)
167608c Merge #6338: ci: attest results of guix builds (pasta)
6fb4e49 Merge #6197: ci: always build guix, save artifacts (pasta)
c0ca93c Merge #6340: fix: make 6336 compile in v21.1.x branch, using older CHECK_NONFATAL functionality (pasta)
bb96df4 Merge #6336: fix: rpc getblock and getblockstats for blocks with withdrawal transactions (asset unlock) (pasta)
8e70262 Merge #6131: feat: make a support of Qt app to show Platform transfer Tx (pasta)
80ed279 Merge #6328: backport: bitcoin#30131, bitcoin#23258, bitcoin#30504 - fix bild for Ubuntu 24.10 + clang (pasta)
bd772fb Merge #6229: fix: `creditOutputs` in AssetLock tx json output should be an array of objects, not debug strings (pasta)
9bf39a9 Merge #6222: fix: adjust payee predictions after mn_rr activation, add tests (pasta)
87bebfc Merge #6219: fix: correct is_snapshot_cs in VerifyDB (pasta)
a4e6b8a Merge #6208: fix: persist coinjoin denoms options from gui over restarts (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  See commits, backports, release notes, version bump

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  knst:
    utACK d627a6e
  kwvg:
    ACK d627a6e
  UdjinM6:
    utACK d627a6e
  ogabrielides:
    utACK d627a6e

Tree-SHA512: cde7e40760e16e9f48da8149c3742d18a34029b057405e4d55b87110da96acbcd19b47280451dd7b5ad1ccfc91fde655452cf5f0f0d1e01a41b4c685337c64b8
PastaPastaPasta added a commit that referenced this pull request Dec 3, 2024
36893e4 fix: add platform transfer to "most common" filter on transactions tab (Konstantin Akimov)
d033a3a refactor: change mask from Dec presentation to Hex for transaction filter (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Follow-up #6131 - missing 'Platform Transfer' in the list of most common. Reported by splawik.

  ## What was done?
  Updated filter, added comment to prevent similar mistakes in future, present filter in hex for better readability.

  ## How Has This Been Tested?
  Transaction with platform transfer appeared in filter "Most Common"
  ![image](https://github.com/user-attachments/assets/ccc17553-d71a-45f8-be2f-8ce5fb699c1a)
  Also they are added to Overview page (compare screenshots by 'address' field)
  ![image](https://github.com/user-attachments/assets/ea657672-46c8-4a66-a972-15768feb4d57)

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 36893e4
  PastaPastaPasta:
    utACK 36893e4

Tree-SHA512: e072b78e257b2c262a912a3cc0daebde93aca655edfee9bbf4869f2528f10377d7d234c73c4fd7ab6006e87607d5a7c4eddd7634d55b16d1b3885d0bc48f225a
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Dec 3, 2024
36893e4 fix: add platform transfer to "most common" filter on transactions tab (Konstantin Akimov)
d033a3a refactor: change mask from Dec presentation to Hex for transaction filter (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Follow-up dashpay#6131 - missing 'Platform Transfer' in the list of most common. Reported by splawik.

  ## What was done?
  Updated filter, added comment to prevent similar mistakes in future, present filter in hex for better readability.

  ## How Has This Been Tested?
  Transaction with platform transfer appeared in filter "Most Common"
  ![image](https://github.com/user-attachments/assets/ccc17553-d71a-45f8-be2f-8ce5fb699c1a)
  Also they are added to Overview page (compare screenshots by 'address' field)
  ![image](https://github.com/user-attachments/assets/ea657672-46c8-4a66-a972-15768feb4d57)

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 36893e4
  PastaPastaPasta:
    utACK 36893e4

Tree-SHA512: e072b78e257b2c262a912a3cc0daebde93aca655edfee9bbf4869f2528f10377d7d234c73c4fd7ab6006e87607d5a7c4eddd7634d55b16d1b3885d0bc48f225a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants