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

[WIP] Output pos linked list #3273

Closed
wants to merge 17 commits into from

Conversation

antiochp
Copy link
Member

Initial experiment with some primitives in store.rs toward a "linked list" maintained in lmdb for the output_pos index.

This is likely throwaway code. We still need to get the RFC together to decide on the final approach.

But I needed to sit down and write some code just to focus on something today for a couple of hours.

@antiochp antiochp mentioned this pull request Mar 21, 2020
@antiochp
Copy link
Member Author

antiochp commented Mar 21, 2020

Thinking about how we make this more generic, to support both output_pos and kernel_pos indexes. Presumably via a trait and associated type. Outputs will use OutputPos (with output features) and kernels the simpler CommitPos.

Or maybe just a LinkedList<OutputPos> and LinkedList<CommitPos> or something along those lines.

@antiochp
Copy link
Member Author

antiochp commented Apr 11, 2020

The general approach here (once it works) feels like a good candidate for fully replacing #3228.
Rather than tracking "undo list" per block and rebuilding the index based on "undo" we track per kernel via the "linked list" pushing and popping off the stack of positions.

Proposed approach:

  • Get this working here for kernel pos and cleanup
  • rename branch and PR (for clarity)
  • Think through the prune/compact logic -
    • during compaction we need to prune the kernel_pos index (keep 2 weeks of data)
  • Implement for coinbase kernels initially (as proof of concept)?
    • We want to do this for NoRecentDuplicate kernels eventually but they do not yet exist

@antiochp
Copy link
Member Author

Closing. Replaced with #3302.

@antiochp antiochp closed this Apr 18, 2020
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

Successfully merging this pull request may close these issues.

1 participant