Repository navigation
runtime-transaction: build transaction configuration from message view - #16491
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16491 +/- ##
=========================================
- Coverage 82.4% 82.3% -0.1%
=========================================
Files 955 955
Lines 373598 373697 +99
=========================================
- Hits 308106 307821 -285
- Misses 65492 65876 +384 🚀 New features to boost your workflow:
|
apfitzge
reviewed
Oct 28, 2026
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
DSharifi
reviewed
Oct 28, 2026
DSharifi
left a comment
There was a problem hiding this comment.
Looks quite good, will take a deeper look later
Comment on lines
+389
to
+397
| fn assert_config_eq(left: &TransactionConfiguration, right: &TransactionConfiguration) { | ||
| assert_eq!(left.updated_heap_bytes, right.updated_heap_bytes); | ||
| assert_eq!(left.compute_unit_limit, right.compute_unit_limit); | ||
| assert_eq!(left.priority_fee_lamports, right.priority_fee_lamports); | ||
| assert_eq!( | ||
| left.loaded_accounts_data_size_limit, | ||
| right.loaded_accounts_data_size_limit | ||
| ); | ||
| } |
There was a problem hiding this comment.
Let's slap on a PartialEq/Eq derive on TransactionConfiguration instead of manual helpers.
Author
There was a problem hiding this comment.
Will fix, I should have asked if we are fine with adding derives for tests only?
| let (from_view, from_message) = | ||
| try_from_message_and_view(v1_message(Some(MAX_HEAP_FRAME_BYTES.saturating_add(1024)))); | ||
| assert!(matches!(from_view, Err(TransactionError::SanitizeFailure))); | ||
| assert!(matches!( |
There was a problem hiding this comment.
Nit:
assert_matches! is stable now
Suggested change
| assert!(matches!( | |
| assert_matches!( |
DSharifi
requested changes
Oct 29, 2026
DSharifi
left a comment
There was a problem hiding this comment.
Looks quite good, let just add the derive I mentioned
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
In #16407 we will need to switch from VersionedMessage to MessageView. This change is part 1 of 2 that allows getting fee for message-view - the part 2 is adjusting Bank fn to work with both Versioned and View Message.
Summary of Changes
Allows to build transaction-configuration from MessageView
Testing
I ran only this ones