-
Notifications
You must be signed in to change notification settings - Fork 1.6k
adds sfMemoData field to VaultDelete transaction #6356
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
Merged
Tapanito
merged 14 commits into
tapanito/lending-fix-amendment
from
tapanito/vault-delete-data
Feb 26, 2026
+80
−16
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f8b555d
adds sfData field to VaultDelete transaction
Tapanito 60fce3c
improves feature gating
Tapanito 3338ec3
Merge branch 'tapanito/lending-fix-amendment' into tapanito/vault-del…
Tapanito 6a34a66
Refactor VaultDelete tests for clarity
Tapanito a14541a
Update test comment for VaultDelete behavior
Tapanito 0bc67c8
formatting
Tapanito 667b559
Merge branch 'tapanito/lending-fix-amendment' into tapanito/vault-del…
Tapanito edfc41f
Merge branch 'tapanito/lending-fix-amendment' into tapanito/vault-del…
Tapanito d67c520
Merge branch 'tapanito/lending-fix-amendment' into tapanito/vault-del…
Tapanito cb93f02
changes to use sfMemoData instead
Tapanito 597c3e3
improvements to vault tests
Tapanito 5cd9d18
fixes a dumb mistake
Tapanito 3d4c11e
fix dumb mistake pt2
Tapanito 5805372
Merge branch 'tapanito/lending-fix-amendment' into tapanito/vault-del…
Tapanito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How is this not redundant with
sfMemos/sfMemo?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.
I haven't considered
sfMemos/sfMemo. Looking at it, I have reservations with the field, simply based on how big / complex the field is.I don't have a strong opinion either way. The benefit I see, in
sfDatais that it does not prescribe a particular structure. Other than that, either option works. That said, I think we only usesfMemosfield, neversfMemo.Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, the structure of
sfMemosis probably overcomplicated. The JSON for even a simple one can look likeNote that
sfMemois used as the first level inner object.Whereas
sfDatawould just beDespite the complication,
sfMemosis fit to purpose for what you're usingsfDatafor in this PR. I think it would be confusing to havesfDataused in some transactions to be written to a ledger object, and used in others as "information only" that will not be written.But I have a proposal: We have memo fields to represent text available already, and not used for any other purpose.
If you search for any of them, you'll see that they're only used in tests and
STTx.cppwhere the formatting is checked.Option 1 (easier): Instead of adding
sfDatatottVAULT_DELETE, addsfMemoData. Do all the same checks inVaultDelete, but usingsfMemoDatainstead.Option 2 (more involved, but so much cooler): Add
sfMemoDatato thecommonFieldsinTxFormats.cpp. Move the checks inVaultDeleteto the corresponding location in the baseTransactorclass (most likelypreflight0, since that's called by every transactor). Realistically, this might need a separate amendment (e.g.SimpleMemo), though that could easily be written to be backward compatible with Option 1.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.
Thank you for the detailed response Ed. I understand, and agree with your reasoning.
The proposal is great, I think what we need to do is apply both options.
Option 1, in this PR, gated with the lending protocol fix amendment.
Option 2, as a separate PR against
developbranch, as it would introduce a separate amendment, and I don't think it's a great idea to introduce two separate amendments in this PR. What do you think?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.
I added option 1, let me know your thoughts about Option 2! 🙇
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.
👍
Woot!
Yes, agreed! Sounds good.