GUI for z_shieldcoinbase #28

Closed
opened 3 years ago by duke · 8 comments
duke commented 3 years ago
Owner

In development on the dev branch, I could use some help testing from @odinzu when it's ready

In development on the `dev` branch, I could use some help testing from @odinzu when it's ready
Poster
Owner

TODO👍

  • Decide how to choose which zaddr funds go to
  • Only show menu option for zaddrs
  • Option to shield all coinbase in all taddrs
  • Iterate until there are no more UTXOs to shield

At first I thought we could create a new zaddr for users automatically everytime we shield, but that will bloat the wallet overtime. We should select an already-existing zaddr or create a dedicated zaddr for shielding coinbase funds.

TODO👍 * [x] Decide how to choose which zaddr funds go to * [x] Only show menu option for zaddrs * [x] Option to shield all coinbase in all taddrs * [ ] Iterate until there are no more UTXOs to shield At first I thought we could create a new zaddr for users automatically everytime we shield, but that will bloat the wallet overtime. We should select an already-existing zaddr or create a dedicated zaddr for shielding coinbase funds.
Poster
Owner

A better way is to add the menu action when right-clicking on a zaddr, and say "Shield all coinbase funds to this zaddr" which allows users to choose which zaddr funds go to.

A better way is to add the menu action when right-clicking on a zaddr, and say "Shield all coinbase funds to this zaddr" which allows users to choose which zaddr funds go to.
Poster
Owner

@odinzu ok, we are ready for your testing of shielding coinbase. Latest dev branch has the code. This commit implements the very tiny "GUI" for calling z_shieldcoinbase:

dfb69d5095

We always shield funds from all addresses which simplifies the code greatly, as no actual GUI except a right-click option needs to be written. The code needs to learn to keep calling z_shieldcoinbase until there are no more blocks to shield, so it will currently only shield up to 50 at a time.

You will notice information about the operation in the statusbar on the bottom left.

@odinzu ok, we are ready for your testing of shielding coinbase. Latest `dev` branch has the code. This commit implements the very tiny "GUI" for calling z_shieldcoinbase: https://git.hush.is/hush/SilentDragon/commit/dfb69d50954c0992f6d498a3c3522ea2fb9b1572 We always shield funds from all addresses which simplifies the code greatly, as no actual GUI except a right-click option needs to be written. The code needs to learn to keep calling z_shieldcoinbase until there are no more blocks to shield, so it will currently only shield up to 50 at a time. You will notice information about the operation in the statusbar on the bottom left.

What is the reason for this line?

//qint64 banned_until = bannedPeerModel->getBannedUntil(index.row());

I don't understand their language. How does this relate to shielding coinbase with GUI?

What is the reason for this line? `//qint64 banned_until = bannedPeerModel->getBannedUntil(index.row());` I don't understand their language. How does this relate to shielding coinbase with GUI?
Poster
Owner

@odinzu it has nothing to do with the other code. It just prevents a compiler warning about an unused variable

@odinzu it has nothing to do with the other code. It just prevents a compiler warning about an unused variable

Ok.

shield all non-mining funds (i don't have this bug anymore) Someone else will need to test it.

z_mergetoaddress pooped: "Could not find any funds to merge."

shield all mining funds to this zaddr

Calling shieldCoinbase with params= QJsonArray(["*","zs1djuz8fljev92f37y83h4fad3zgqngu2wggnzrstz5wut"])
RPC: "z_shieldcoinbase" QJsonValue(object, QJsonObject({"id":"42","jsonrpc":"1.0","method":"z_shieldcoinbase","params":["*","zs1djuz8fljev92f37y83h4fad3zgqngu2wggnzrstz5wutk93l4j"]}))
RPC: "getinfo" QJsonValue(object, QJsonObject({"id":"42","jsonrpc":"1.0","method":"getinfo"}))
RPC: "z_getoperationstatus" QJsonValue(object, QJsonObject({"id":"42","jsonrpc":"1.0","method":"z_getoperationstatus"}))
ShieldCoinbase reply= QJsonValue(object, QJsonObject({"opid":"opid-c7a07b2b-4ddb-4d5a-982c-13ed981d6fc5","remainingUTXOs":0,"remainingValue":0,"shieldingUTXOs":9,"shieldingValue":25.3126}))

I try and shield mining funds without having mining funds

no mining funds found to shield!

It works. I didnt see any feedback in terminal or if it was working after I clicked it, but minutes later the UTXOs were shielded. I also sent 1 hush to another z and it worked without any problems.

What happens if I send > 50 UTXO Hush puppies?

This is great 👍

Ok. shield all non-mining funds (i don't have this bug anymore) Someone else will need to test it. ``` z_mergetoaddress pooped: "Could not find any funds to merge." ``` shield all mining funds to this zaddr ``` Calling shieldCoinbase with params= QJsonArray(["*","zs1djuz8fljev92f37y83h4fad3zgqngu2wggnzrstz5wut"]) RPC: "z_shieldcoinbase" QJsonValue(object, QJsonObject({"id":"42","jsonrpc":"1.0","method":"z_shieldcoinbase","params":["*","zs1djuz8fljev92f37y83h4fad3zgqngu2wggnzrstz5wutk93l4j"]})) RPC: "getinfo" QJsonValue(object, QJsonObject({"id":"42","jsonrpc":"1.0","method":"getinfo"})) RPC: "z_getoperationstatus" QJsonValue(object, QJsonObject({"id":"42","jsonrpc":"1.0","method":"z_getoperationstatus"})) ShieldCoinbase reply= QJsonValue(object, QJsonObject({"opid":"opid-c7a07b2b-4ddb-4d5a-982c-13ed981d6fc5","remainingUTXOs":0,"remainingValue":0,"shieldingUTXOs":9,"shieldingValue":25.3126})) ``` I try and shield mining funds without having mining funds ``` no mining funds found to shield! ``` It works. I didnt see any feedback in terminal or if it was working after I clicked it, but minutes later the UTXOs were shielded. I also sent 1 hush to another z and it worked without any problems. What happens if I send > 50 UTXO Hush puppies? This is great 👍
Poster
Owner

@oDinzu if you had 51 coinbase UTXOs (blocks) then this operation will only shield 50 of them and would leave 1 behind, which you can shield by clicking "shield all mining funds to this zaddr" again. Thanks for testing!

@oDinzu if you had 51 coinbase UTXOs (blocks) then this operation will only shield 50 of them and would leave 1 behind, which you can shield by clicking "shield all mining funds to this zaddr" again. Thanks for testing!
Poster
Owner

Calling this done, #29 has the "stretch goal" of allowing a custom number of blocks to be shielded, which is helpful for people with many blocks.

Calling this done, #29 has the "stretch goal" of allowing a custom number of blocks to be shielded, which is helpful for people with many blocks.
duke closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.