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

Extend transactions with memo sections #2358

Merged
merged 7 commits into from
Jan 13, 2024
Merged

Extend transactions with memo sections #2358

merged 7 commits into from
Jan 13, 2024

Conversation

sug0
Copy link
Contributor

@sug0 sug0 commented Jan 3, 2024

Describe your changes

Closes #2354

Indicate on which release or other PRs this topic is based on

v0.29.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@sug0 sug0 added the enhancement New feature or request label Jan 3, 2024
sug0 added a commit that referenced this pull request Jan 3, 2024
@sug0 sug0 marked this pull request as ready for review January 3, 2024 13:01
tzemanovic
tzemanovic previously approved these changes Jan 4, 2024
@tzemanovic
Copy link
Member

should we also provide a way to set this from cli?

batconjurer
batconjurer previously approved these changes Jan 4, 2024
@sug0
Copy link
Contributor Author

sug0 commented Jan 4, 2024

@tzemanovic absolutely, will add a cli arg for this!

@sug0 sug0 marked this pull request as draft January 4, 2024 13:16
@sug0 sug0 dismissed stale reviews from batconjurer and tzemanovic via e8d6268 January 4, 2024 13:19
sug0 added a commit that referenced this pull request Jan 4, 2024
@sug0 sug0 requested a review from tzemanovic January 4, 2024 13:19
@sug0 sug0 marked this pull request as ready for review January 4, 2024 13:20
@adrianbrink adrianbrink mentioned this pull request Jan 4, 2024
Copy link
Contributor

@murisi murisi left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. I'm just worried about a few things: keeping the Tx size down so it can fit on the hardware wallet RAM, keeping the size of hardware wallet Tx parsers down so that they can fit in memory, assumptions about the ordering of Memo sections, and the necessary signers for a memo section to be accepted.

Deserialize,
)]
pub struct Memo {
inner: Vec<u8>,
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that only 3kB of RAM is available to Ledger Nano S apps. To reduce transaction size, I wonder if it's worth allowing the inner field to either be the full content or its hash by using the Commitment enumeration (like the Code section does)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently, we're always submitting the full data to the hardware wallet. submitting only the commitment can be done in a separate (future) pr

core/src/proto/types.rs Outdated Show resolved Hide resolved
core/src/proto/types.rs Outdated Show resolved Hide resolved
core/src/proto/types.rs Show resolved Hide resolved
sug0 added a commit that referenced this pull request Jan 8, 2024
@sug0 sug0 requested a review from murisi January 8, 2024 15:36
murisi
murisi previously approved these changes Jan 9, 2024
Copy link
Contributor

@murisi murisi left a comment

Choose a reason for hiding this comment

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

The CI seems to be failing in some parts. Do you know the cause by any chance? Otherwise this looks good to me, thanks!

.changelog/unreleased/improvements/2358-tx-memo-field.md Outdated Show resolved Hide resolved
sug0 added a commit that referenced this pull request Jan 9, 2024
sug0 added a commit that referenced this pull request Jan 9, 2024
tzemanovic added a commit that referenced this pull request Jan 9, 2024
* origin/tiago/tx-memo-field:
  Changelog for #2358
  Regen pre-genesis tx signatures
  Rebuild test wasms
  Add tx memo CLI arg
  Attach memo to tx if it is present in sdk args
  Add memo to the sdk's tx args
  Extend transactions with memo sections
@brentstone brentstone merged commit e08e2a0 into main Jan 13, 2024
13 of 15 checks passed
@brentstone brentstone deleted the tiago/tx-memo-field branch January 13, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli enhancement New feature or request SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add optional size-limited memo field to transactions
6 participants