feat: add gprc methods to get fees#7235
Conversation
|
""" WalkthroughThe code introduces two new gRPC methods to the Wallet service for fee estimation and fee statistics. The proto definitions and server implementation are updated accordingly. The Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant WalletGrpcServer
participant OutputManagerService
participant TransactionService
Client->>WalletGrpcServer: GetFeeEstimate(request)
WalletGrpcServer->>OutputManagerService: fee_estimate(amount, fee_per_gram, output_count)
OutputManagerService-->>WalletGrpcServer: estimated_fee
WalletGrpcServer-->>Client: GetFeeEstimateResponse(estimated_fee)
Client->>WalletGrpcServer: GetFeePerGramStats(request)
WalletGrpcServer->>TransactionService: get_fee_per_gram_stats_per_block(block_count)
TransactionService-->>WalletGrpcServer: fee_per_gram_stats
WalletGrpcServer-->>Client: GetFeePerGramStatsResponse(fee_per_gram_stats)
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (7)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Test Results (CI) 3 files 126 suites 39m 35s ⏱️ Results for commit 6dc85db. ♻️ This comment has been updated with latest results. |
Test Results (Integration tests) 2 files 10 suites 1h 19m 52s ⏱️ For more details on these failures, see this check. Results for commit 3f6fbb2. |
hansieodendaal
left a comment
There was a problem hiding this comment.
See comments below
| raw_payment_id: vec![], | ||
| user_payment_id: vec![], |
There was a problem hiding this comment.
We could fill in payment id here as well
There was a problem hiding this comment.
its not going to be correct, payment_id is only finalised when it reaches completed.
| raw_payment_id: vec![], | ||
| user_payment_id: vec![], |
There was a problem hiding this comment.
We could fill in payment id here as well
There was a problem hiding this comment.
its not going to be correct, payment_id is only finalised when it reaches completed.
| amount.into(), | ||
| selection_criteria, | ||
| fee_per_gram.into(), | ||
| 1, // We assume 1 input for simplicity |
There was a problem hiding this comment.
We might as well provide the amount of outputs inputs here and to the request
There was a problem hiding this comment.
outputs are below?
Description
Add grpc methods to get fee estimates for tx and mempool
Add user_payment_id to the transaction events
Fixes: #7093
Summary by CodeRabbit
New Features
Enhancements