-
Notifications
You must be signed in to change notification settings - Fork 219
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!: add change metadata to encrypted data #6713
feat!: add change metadata to encrypted data #6713
Conversation
Test Results (CI) 3 files 129 suites 36m 11s ⏱️ Results for commit d54da49. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this PR moves in the right direction there are a few issues here:
1: Payment_id != message. There can be a message inside the payment_id, but its very much user data(message) + system level data. We need to keep separation between the two. This PR completely merges it and makes it all user data. Looking at the data I suspect there might have been some regression in terms of display here.
2: On the transmission of the data, the sender should not and can not control what the receiver pputs in his/her output. So no use in sending anything like that over. That data is sent over, but never actually used in the output. Interactive payments should keep using only the message. Dont add payment id for the receiver there.
3: On the display, we should not just display the raw data on the transactions.
For example on the view only wallet. It should not display the incoming data. It should display output going transaction for that amount. Not incoming. It should be more clever how it creates the transaction. It should read the details from the payment id field to create the outgoing tx. It should look almost similar to the spending wallet
4: This is a regression by the looks of it, but we should not display default addresses. We should self, or something like that there.
base_layer/core/src/transactions/transaction_components/encrypted_data.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/transactions/transaction_components/encrypted_data.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/transactions/transaction_components/encrypted_data.rs
Outdated
Show resolved
Hide resolved
applications/minotari_console_wallet/src/ui/components/transactions_tab.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/transactions/transaction_protocol/transaction_initializer.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/transactions/transaction_protocol/transaction_initializer.rs
Outdated
Show resolved
Hide resolved
fd3bc90
to
e2eb8bf
Compare
d92486a
to
524b36e
Compare
Added receiver address. amount and payment id to encrypted data so a view only wallet will be able to identify the receiver when importing a change output.
524b36e
to
934eb4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think is can go in like this for now
PaymentId::Empty => self.to_string(), | ||
PaymentId::U64(v) => format!("{}", v), | ||
PaymentId::U256(v) => format!("{}", v), | ||
PaymentId::Address(v) => v.to_base58(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
II think this one should probably also display nothing, but its fine for now
Description
message
from transactions - payment ID is now used consistently throughoutNote: Burn transaction status for change outputs needs to be fixed, see #6726
Motivation and Context
Change data needs to be available for wallet recovery. This is especially useful for view-only wallets.
How Has This Been Tested?
System-level testing
one-sided
Sender wallet, one-sided
Receiver wallet, one-sided
View-only wallet, one-sided
interactive
Sender wallet, interactive
Receiver wallet, interactive
View-only wallet, interactive
burn
Sender wallet, burn
View-only wallet, burn
What process can a PR reviewer use to test or verify this change?
Code review
System-level testing
Breaking Changes
BREAKING CHANGE:
--message
is not supported anymore, only--payment-id
fn completed_transaction_get_message(
removedfn pending_outbound_transaction_get_message(
removedfn pending_outbound_transaction_get_payment_id(
addedfn pending_inbound_transaction_get_message(
removedfn pending_inbound_transaction_get_payment_id(
addedfn wallet_send_transaction(
has interface changemessage CreateBurnTransactionRequest {
has interface changemessage PaymentRecipient {
has interface changemessage TransactionInfo {
has interface changemessage CoinSplitRequest {
has interface changemessage ImportUtxosRequest {
has interface changemessage TransactionEvent {
has interface changemessage RegisterValidatorNodeRequest {
has interface change