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

[DNM] Refactor "leaf_set" #3428

Closed
wants to merge 22 commits into from
Closed

[DNM] Refactor "leaf_set" #3428

wants to merge 22 commits into from

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Aug 20, 2020

Do not merge prior to 5.0.0 (regardless of branch naming).


We currently update the leaf_set file in realtime as blocks are accepted.
This is the only file that we write to disk during block processing that is not append-only.

This PR is an exploration into removing this dependency and keeping the leafset bitmap purely in memory.
This would be backed by the existing output_pos index from the db.
The index is handled transactionally during block processing.

The leaf_set represents the list of output pos that make up the current UTXO.

Things we still need the leaf_set file for -

  • fast sync snapshot to provide a leaf_set to a peer
  • fast sync receiving a leaf_set from a peer

If the MMR files are strictly append-only then we can potentially -

  • never need to fsync them, yet
  • always recover from "corruption" by simple truncation to earlier state

@antiochp antiochp changed the title [WIP] Refactor "leaf_set" [DNM] Refactor "leaf_set" Oct 27, 2020
@phyro phyro added the abandoned Abandoned due to either lack of review or contribution. Could get revisited later. label Jan 6, 2022
@yeastplume
Copy link
Member

Closed and marked as 'abandoned'. This does not mean the PR is unworthy. This means that merging it would require further work that nobody appears prepared to do at this time, or the original author has been unresponsive for a significant amount of time. Anyone who want to continue work on this functionality is free to re-open this at any time.

@yeastplume yeastplume closed this Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned Abandoned due to either lack of review or contribution. Could get revisited later. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants