-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add getRecentPrioritizationFees RPC endpoint #27278
Conversation
|
@taozhu-chicago , can you please look at my open questions, and also a couple places I'm about to comment in the code? |
I didn't think order matter initially - user wants average, or max, or min, or top 5% etc. Now you said it, order by slots can project trends, which is useful information, just not 100% convinced necessary at this point.
In query? I was thinking just one account per query, if that's easier. Otherwise, by the MAX_ACCOUNT_LIMIT per transaction (it is defined somewhere)
No, they are only for RPC queries. (I'm reusing |
|
Ran this branch on GCE cluster, bench-tps sends transfer transactions with random priority fee (between 0..50); did simple test queries, looks getting correct results back:
|
817034a to
8d44b0d
Compare
8d44b0d to
30998da
Compare
|
Rebased and ready for proper review |
tao-stones
left a comment
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.
Thanks for wired it so neatly. Looks great, just few nits
tao-stones
left a comment
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.
lgtm
* Plumb priority_fee_cache into rpc * Add PrioritizationFeeCache api * Add getRecentPrioritizationFees rpc endpoint * Use MAX_TX_ACCOUNT_LOCKS to limit input keys * Remove unused cache apis * Map fee data by slot, and make rpc account inputs optional * Add priority_fee_cache to rpc test framework, and add test * Add endpoint to jsonrpc docs * Update docs/src/developing/clients/jsonrpc-api.md * Update docs/src/developing/clients/jsonrpc-api.md (cherry picked from commit 9b8bed8) # Conflicts: # core/src/validator.rs # rpc/src/rpc.rs # rpc/src/rpc_service.rs # runtime/src/prioritization_fee_cache.rs
|
automerge label removed due to a CI failure |
* Plumb priority_fee_cache into rpc * Add PrioritizationFeeCache api * Add getRecentPrioritizationFees rpc endpoint * Use MAX_TX_ACCOUNT_LOCKS to limit input keys * Remove unused cache apis * Map fee data by slot, and make rpc account inputs optional * Add priority_fee_cache to rpc test framework, and add test * Add endpoint to jsonrpc docs * Update docs/src/developing/clients/jsonrpc-api.md * Update docs/src/developing/clients/jsonrpc-api.md
* Add getRecentPrioritizationFees RPC endpoint (#27278) * Plumb priority_fee_cache into rpc * Add PrioritizationFeeCache api * Add getRecentPrioritizationFees rpc endpoint * Use MAX_TX_ACCOUNT_LOCKS to limit input keys * Remove unused cache apis * Map fee data by slot, and make rpc account inputs optional * Add priority_fee_cache to rpc test framework, and add test * Add endpoint to jsonrpc docs * Update docs/src/developing/clients/jsonrpc-api.md * Update docs/src/developing/clients/jsonrpc-api.md * Fix conflicts
Problem
#26709 caches recent prioritization-fee data, but there is no way for users to access this data to pick the fee for their own transaction.
Summary of Changes
This needs a rebase on #26709; only the last 3 commits are relevant for now.
Open questions:
get_prioritization_fees(),get_account_prioritization_fees()To come:
Fixes #26561
cc @taozhu-chicago @jdavis103