-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid multiple calls to process_proposal
#3473
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3473 +/- ##
==========================================
- Coverage 53.48% 53.41% -0.08%
==========================================
Files 320 320
Lines 110000 110160 +160
==========================================
+ Hits 58832 58840 +8
- Misses 51168 51320 +152 ☔ View full report in Codecov by Sentry. |
@sug0 I've pushed a few more commits to change some things on top of your recommendations:
Let me know if they are ok or it's better to revert the last commits |
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!
8674109
to
5523e05
Compare
* grarco/opt-validation-calls: Changelog #3473 Renames process proposal cache LRU process proposal cache Custom type for process proposal result cache Cache of process proposal uses results Refactors process proposal check in a separate function Avoids full clone of the entire block in process proposal Cache check in `try_recheck_process_proposal` Cache result of `process_proposal` New type for process proposal rechecks Removes redundant `votes` field from `FinalizeBlock` request Rechecks with `process_proposal` instead of `process_txs`
Describe your changes
This PR tries to improve the extra calls to process proposal requested by Namada (nothing changes for the requests coming from Comet). More specifically:
process_proposal
is now called instead ofprocess_txs
InMemory
struct has been expanded with an extra field that caches the requests toprocess_proposal
for a given block so that future calls can be avoided. This cache is cleared when handling aFinalizeBlock
requestIndicate on which release or other PRs this topic is based on
v0.40.0
Checklist before merging to
draft