-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Support height queries for queriers #4382
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4382 +/- ##
==========================================
+ Coverage 54.53% 54.58% +0.04%
==========================================
Files 247 248 +1
Lines 15908 15967 +59
==========================================
+ Hits 8676 8716 +40
- Misses 6602 6617 +15
- Partials 630 634 +4 |
If I remember right, app.go used call Then this would be correct and provide the expected lazy loading behavior. |
|
/cc @jordansexton |
With 876f0d8, does this now support proofs? |
Oh okay. the loss of proofs is not a regression. |
Correct. More like the continuance of their absence. |
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.
Looks reasonable to me, although there could be efficiency concerns with particular usecases - e.g. querying all height sequentially would call LoadVersion
each time, which might be inefficient (not sure if the IAVL library would keep the existing mostly-the-same version in memory or reload everything from disk).
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.
Good with the tradeoffs here. This also gets us into a better place wrt proofs it looks like.
Hmmm, iirc, this is not true with my implementation (I could very well be wrong). What makes you assume this? Querier queries call EDIT: I see you wrote, sequentially. Ahhh, then yes, it would. Do you have any suggestions on mitigation? Looks like |
@mossid I will merge this today, try to review if you can. |
🔥 🔥 🔥 🔥 🔥 🔥 |
Merged, but still would appreciate a review @mossid |
A (working) POC stab at supporting height queries for querier based queries (wow what a mouthful). This POC does not handle merkle proofs in any way. Doing so warrants further discussion and is not immediately feasible because the node may modify state returned from any internal queries (eg. staking).
If this POC is agreed upon, perhaps we may potentially include it in a release with a clear stipulation that proofs are not supported.
closes: #4318
Follow up: Create an issue to allow a height query param to be provided to REST endpoints.
/cc @zmanian @cwgoes @jackzampolin @mossid
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: