fix:(PRO-264) apply pricing model to fee estimation#207
Merged
Conversation
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to af3223f in 38 seconds. Click for details.
- Reviewed
30lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. crates/lib/src/rpc_server/method/estimate_transaction_fee.rs:53
- Draft comment:
Renaming the fee variable to 'min_transaction_fee' clarifies that it represents the preliminary fee before pricing adjustments. Consider if a name like 'base_fee' might be even clearer. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. crates/lib/src/rpc_server/method/estimate_transaction_fee.rs:61
- Draft comment:
The updated code applies the pricing model via get_required_lamports, aligning with signTransactionIfPaid. Verify that passing Some(rpc_client) and Some(price_source.clone()) meets the expected type and behavior. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_DB9w3jiWYVUlazsl
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Fee estimation now uses the price model to determine the required lamports, including margin or fixed amount, instead of returning the minimum transaction fee directly.
af3223f to
5761c61
Compare
dev-jodee
approved these changes
Aug 29, 2025
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: The
estimateTransactionFeeRPC method was not applying the configured price model (margin/fixed/free), whilesignTransactionIfPaidwas correctly applying it, leading to fee estimates that were insufficient on sign if paid• Solution: Modified
estimateTransactionFeeto callget_required_lamports()with the price model configuration, matching the behavior insignTransactionIfPaid.todo--add pricing scenarios to kora.toml test fixtures
Important
Apply pricing model to
estimateTransactionFeeto ensure consistent fee estimation withsignTransactionIfPaid.estimateTransactionFeeinestimate_transaction_fee.rsto apply pricing model usingget_required_lamports().signTransactionIfPaidby including margin or fixed amounts.fee_in_lamportstomin_transaction_feefor clarity inestimate_transaction_fee.rs.This description was created by
for af3223f. You can customize this summary. It will automatically update as commits are pushed.
📊 Test Coverage
Coverage: 86.3%
View Detailed Coverage Report