Skip to content
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

Persist canonical header references for quick lookup #14

Closed
i-norden opened this issue Oct 7, 2020 · 2 comments
Closed

Persist canonical header references for quick lookup #14

i-norden opened this issue Oct 7, 2020 · 2 comments

Comments

@i-norden
Copy link
Collaborator

i-norden commented Oct 7, 2020

canoncial_header() function introduced in #11 can find the canonical header based on the weight in the database, but it is a iterative function that is prohibitively expensive for serving request on-the-fly for headers that are far removed from the current head.

We need to create a trigger function that watches for inserts at the head (n) and uses canoncial_header() to derive and caches the canonical header (or rather a reference to it) for block n - x, where x can be adjusted (start with a default of 2048).

@i-norden i-norden self-assigned this Oct 7, 2020
@i-norden i-norden mentioned this issue Oct 7, 2020
@i-norden i-norden changed the title Persist canonical hashes/headers for lookup Persist canonical header references for quick lookup Oct 7, 2020
@ramilexe ramilexe assigned ramilexe and unassigned i-norden Nov 2, 2020
@i-norden
Copy link
Collaborator Author

In the meantime, #25 and #26 have heuristically optimized the canonical_header function

@Burmenska
Copy link

Burmenska commented May 19, 2021

@stellarmagnet what about the priority of this task? the last update on it was more than 6 months ago

@AFDudley AFDudley closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants