Persist canonical header references for quick lookup #14

Closed
opened 2020-10-07 17:27:30 +00:00 by i-norden · 2 comments
Member

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).

`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).
Author
Member

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

In the meantime, #25 and #26 have heuristically optimized the canonical_header function
Burmenska commented 2021-05-19 08:25:22 +00:00 (Migrated from github.com)

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

@stellarmagnet what about the priority of this task? the last update on it was more than 6 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-server#14
No description provided.