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(claim_burn)!: adds encrypted value to UnclaimedConfidentialOutput substate #427

Merged
merged 6 commits into from
Mar 13, 2023

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Mar 10, 2023

Description

  • renames LayerOneCommitment substate to UnclaimedConfidentialOutput
  • adds the L1 wallet reciprocal burn public key to the claim burn instruction and includes that in the claimed resource
  • improves wallet cli claim-burn instruction output
  • fixes wallet cli claim-burn instruction by adding correct inputs and outputs

Motivation and Context

Depends on tari-project/tari#5238
Ref #425 - this PR will need to be updated to use the correct hasher (can be merged in any order though)

How Has This Been Tested?

Claim burn cucumber

What process can a PR reviewer use to test or verify this change?

Use POSTMan to burn funds (using wallet with tari-project/tari#5238)
Run vn and wallet daemon

$ cargo run --bin tari_dan_wallet_cli -- accounts create --name primary
$ cargo run --bin tari_dan_wallet_cli -- accounts claim-burn --name primary
<paste output from POSTman>
cargo run --bin tari_dan_wallet_cli -- accounts get-balances  --name primary
Checking balances for account 'primary'...
Account component_d74cd546e92985fd0ba5355233d53e963230e2470062155e13ab842a6d3bb991 balances:

Resource                                                                  | Balance
------------------------------------------------------------------------- | -------
resource_0101010101010101010101010101010101010101010101010101010101010101 | 0
resource_69e77a7104fcc9b8daf5a1125699edee08fe435565692c488134e53d594be57f | 6000

2 row(s)

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

stringhandler
stringhandler previously approved these changes Mar 13, 2023
@@ -79,10 +84,11 @@ pub struct GetByNameArgs {

#[derive(Debug, Args, Clone)]
pub struct ClaimBurnArgs {
#[clap(long, short = 'a')]
account_address: ComponentAddress,
#[clap(long, short = 'n', alias = "name")]
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, this is better

dan_layer/engine_types/src/confidential/claim.rs Outdated Show resolved Hide resolved
@sdbondi sdbondi added this pull request to the merge queue Mar 13, 2023
Merged via the queue into tari-project:development with commit a19b2d7 Mar 13, 2023
@sdbondi sdbondi deleted the claim-burn-dh-mask-ev branch March 13, 2023 10:54
sdbondi added a commit to sdbondi/tari-dan that referenced this pull request Mar 13, 2023
* development:
  feat(claim_burn)!: adds encrypted value to UnclaimedConfidentialOutput substate (tari-project#427)
sdbondi added a commit to sdbondi/tari-dan that referenced this pull request Mar 13, 2023
* development:
  feat(wallet)!: monitor accounts for received funds (tari-project#425)
  feat(claim_burn)!: adds encrypted value to UnclaimedConfidentialOutput substate (tari-project#427)
sdbondi added a commit that referenced this pull request Mar 14, 2023
…429)

Description
---
feat: add endpoint for generating output proofs for minting
feat: support base64 blob in cli args and manifest globals

Motivation and Context
---
When minting a confidential resource, an output commitment proof is
required. This PR adds cli tools to support this.


The key used for the proof is from the key manager but we wont know
which key to use for the transfer proof.
This is out of scope and requires PRs (#427 #425) to be merged before
this can be worked on.

We may need the walletd to associate a key for all owned vaults
regardless if they are part of an Account component so that transfer
proofs can be generated.

How Has This Been Tested?
---
Manually, `ConfidentialFaucet::mint` template call.

What process can a PR reviewer use to test or verify this change?
---
```shell
$ cargo run --bin tari_dan_wallet_cli --  proofs generate 10000 -o base64 > ./proof.txt   
$ cargo run --bin tari_dan_wallet_cli -- transactions submit-manifest -n3 ./manifest.rs -g proof=file://./proof.txt
```

Breaking Changes
---

- [x] None
- [ ] Requires data directory to be deleted
- [ ] Other - Please specify
sdbondi added a commit to stringhandler/tari-dan that referenced this pull request Mar 15, 2023
* development:
  feat(cli): generate output proof for minting, support file blob args (tari-project#429)
  feat(wallet)!: monitor accounts for received funds (tari-project#425)
  feat(claim_burn)!: adds encrypted value to UnclaimedConfidentialOutput substate (tari-project#427)
  feat: transaction filter (tari-project#428)
  feat: update to tari newest tari version (tari-project#424)
  feat: add missing wallet daemon cli request for claim burn (tari-project#426)
  feat: add handle claim burn to wallet daemon accounts (tari-project#422)
  feat: ui improvements (tari-project#419)
  fix: fix claim commsig, allow JSON to be pasted on cli (tari-project#421)
  feat(indexer): track all NFT's of a resource (tari-project#420)
  feat: add transfer of confidential assets to wallet cli (tari-project#412)
  feat(wallet): add apis and implementation for confidential withdraws (tari-project#417)
  v0.50.0-pre.0
  feat: adds public nonce and encrypted value data to confidential resources (tari-project#413)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants