Skip to content

runtime-transaction: build transaction configuration from message view - #16491

Merged
kostekIV merged 4 commits into
anza-xyz:masterfrom
kostekIV:msg-view-fees
Oct 29, 2026
Merged

kostekIV merged 4 commits into
anza-xyz:masterfrom
kostekIV:msg-view-fees

Conversation

@kostekIV

Copy link
Copy Markdown

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

$ ./ci/test-sanity.sh
$ ./ci/test-checks.sh
$ ./ci/feature-check/test-feature.sh

@codecov-commenter

codecov-commenter commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.3%. Comparing base (b43b16b) to head (6c7bf6d).
⚠️ Report is 39 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kostekIV
kostekIV marked this pull request as ready for review October 28, 2026 13:01
@kostekIV
kostekIV requested a review from a team as a code owner October 28, 2026 13:01
@kostekIV
kostekIV requested review from DSharifi and apfitzge October 28, 2026 13:01
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>

@DSharifi DSharifi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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
);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's slap on a PartialEq/Eq derive on TransactionConfiguration instead of manual helpers.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will fix, I should have asked if we are fine with adding derives for tests only?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed in 6c7bf6d

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!(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit:
assert_matches! is stable now

Suggested change
assert!(matches!(
assert_matches!(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed in 6c7bf6d

@DSharifi DSharifi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks quite good, let just add the derive I mentioned

@kostekIV
kostekIV requested review from DSharifi and apfitzge October 29, 2026 12:24

@DSharifi DSharifi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

@kostekIV
kostekIV added this pull request to the merge queue Oct 29, 2026
Merged via the queue into anza-xyz:master with commit 4728ff4 Oct 29, 2026
51 checks passed
@kostekIV
kostekIV deleted the msg-view-fees branch October 29, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants