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

possible rework to kernel sync+validation #1219

Closed
antiochp opened this issue Jul 5, 2018 · 2 comments
Closed

possible rework to kernel sync+validation #1219

antiochp opened this issue Jul 5, 2018 · 2 comments

Comments

@antiochp
Copy link
Member

antiochp commented Jul 5, 2018

Been thinking a bit about how we fast-sync -

  • sync all the headers (chunks of 500 at a time)
  • then big txhashset.zip download, containing -
    • output MMR (possibly pruned, effectively UTXO only)
    • rangeproof MMR (possibly pruned, effectively UTXO only)
    • kernel MMR (full kernel history, not pruned)
  • then recent full blocks

I think there is an argument to be made that the kernel MMR sync is more similar to the header sync (i.e. we need all of them and we need to validate the full history) than the output+rangeproof MMR sync.

Currently we validate the kernel history by rewinding back from latest block header and validating the kernel sums at each block height.

I wonder if we could sync kernels differently -

  1. sync them in a similar way to block headers (in chunks of n kernels for some reasonably large n).
  2. we only need to sync the kernels themselves, se can rebuild the MMR hash file from the underlying data as we do not prune these nodes currently (this has been discussed in rough terms in some earlier PR).
  3. kernel history validation may be simpler (and more efficient) if we then validate them as we receive them in increasing block height order, with no need to rewind each time

Related #1218

Possible revised sync and validation process -

  • sync headers
    • validate them as we process them
  • sync kernels
    • validate them as we process them (each header gives us a MMR size to validate sums with)
  • sync txhashset.zip (containing only output and rangeproof MMRs)

Related -
#804
#952

@hashmap
Copy link
Contributor

hashmap commented Jan 24, 2019

@antiochp is it still valid?

@antiochp
Copy link
Member Author

Let's close this - we have some ideas around how to improve this, but we can open more focused issues if/when we prioritize working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants