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: added burn feature to the console wallet #5322

Merged

Conversation

agubarev
Copy link
Contributor

Description

Added basic functionality to enable Minotari burning on the baselayer.
Copied serde_from module from tari-dan to tari_common_types

Motivation and Context

To allow users burn Minotari to be reclaimed on the second layer (DAN).

How Has This Been Tested?

manually

@agubarev agubarev force-pushed the console_wallet_burn_tab branch from 1711fd0 to 6f611fd Compare April 24, 2023 20:36
@agubarev agubarev marked this pull request as ready for review April 24, 2023 20:55
@agubarev agubarev force-pushed the console_wallet_burn_tab branch from 519f0d0 to 7a51f80 Compare May 2, 2023 13:36
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

This looks good.
But this needs a migration before we can merge, we cannot do breaking changes anymore.
There is one bug in the code as well, and a few nits

applications/tari_console_wallet/src/ui/state/app_state.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/state/tasks.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/app.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/ui_error.rs Outdated Show resolved Hide resolved
@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels May 3, 2023
applications/tari_console_wallet/src/ui/app.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/state/app_state.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/state/app_state.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/state/mod.rs Outdated Show resolved Hide resolved
applications/tari_console_wallet/src/ui/types.rs Outdated Show resolved Hide resolved
{
let bytes = if d.is_human_readable() {
let hex = <String as Deserialize>::deserialize(d)?;
from_hex(&hex).map_err(serde::de::Error::custom)?
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be useful if you combine these two deserializers by trying to decode into base64 and on failure trying to decode into hex and finally erroring if neither work

use std::str::FromStr;

use serde::{de::DeserializeOwned, Deserialize, Deserializer, Serialize, Serializer};

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure what the purpose of this serializer is.

base_layer/wallet/src/storage/database.rs Outdated Show resolved Hide resolved
base_layer/wallet/src/storage/database.rs Outdated Show resolved Hide resolved
@agubarev agubarev force-pushed the console_wallet_burn_tab branch from 57e0a16 to 2371b2e Compare May 8, 2023 21:30
applications/tari_console_wallet/src/ui/state/tasks.rs Outdated Show resolved Hide resolved
@@ -1,5 +1,24 @@
// Copyright 2022 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause
// Copyright 2022. The Tari Project
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need, but ok

base_layer/common_types/src/lib.rs Outdated Show resolved Hide resolved
@stringhandler stringhandler merged commit 45685b9 into tari-project:development May 9, 2023
SWvheerden added a commit that referenced this pull request May 29, 2023
##
[0.50.0-pre.2](v0.50.0-pre.1...v0.50.0-pre.2)
(2023-05-29)

### ⚠ BREAKING CHANGES

* add optional range proof types (5372)

### Features

* add metadata signature check
([5411](#5411))
([9c2bf41](9c2bf41))
* add optional range proof types
([5372](#5372))
([f24784f](f24784f))
* added burn feature to the console wallet
([5322](#5322))
([45685b9](45685b9))
* improved base node monitoring
([5390](#5390))
([c704890](c704890))


### Bug Fixes

* **comms:** only set final forward address if configured to port 0
([5406](#5406))
([ff7fb6d](ff7fb6d))
* deeplink to rfc spec
([5342](#5342))
([806d3b8](806d3b8))
* don't use in memory datastores for chat client dht in integration
tests ([#5399](#5399))
([cbdca6f](cbdca6f))
* fix panic when no public addresses
([5367](#5367))
([49be2a2](49be2a2))
* loop on mismatched passphrase entry
([5396](#5396))
([ed120b2](ed120b2))
* use domain separation for wallet message signing
([5400](#5400))
([7d71f8b](7d71f8b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants