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

Add sideloading functionality to neutrino #285

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Apr 10, 2024

  1. sideload: Initialize new package.

    This commit introduces the `sideload` package,
    designed to facilitate the sideloading of Bitcoin
    blockchain headers from external sources.
    
    Key components and changes:
    
    - **Interfaces and Core Types**: Introduction of several
       interfaces and types such as `SourceType`, `dataType`,
       `dataSize`, `HeaderValidator`, `HeaderWriter`,
      `Checkpoints`, and `LoaderSource` to abstract the
       concepts of blockchain header validation, storage,
       and source management.
    
    - **Loader Implementation**: The core of the sideload
        functionality is encapsulated in the `SideLoader`
        struct, which includes logic for header fetching,
        validation, and writing.
    
    - **Binary Loader for Headers**: An implementation of the
    LoaderSource interface for binary encoded headers is
    included in this commit
    
    Signed-off-by: Ononiwu Maureen <maureen.ononiwu@outlook.com>
    Ononiwu Maureen authored and Chinwendu20 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8435fc5 View commit details
    Browse the repository at this point in the history
  2. neutrino: Add Checkpoints Structure

    This commit introduces a new `Checkpoints` structure
    for managing block header checkpoints.
    
    Motivation:
    Decoupling the logic for finding next and previous
    header checkpoints from the `blockmanager`,
    facilitating sharing this functionality between the
    `sideload` package and `blockmanager`, promoting
    code reuse and consistency across the components.
    
    Signed-off-by: Ononiwu Maureen <maureen.ononiwu@outlook.com>
    Ononiwu Maureen authored and Chinwendu20 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    b34d035 View commit details
    Browse the repository at this point in the history
  3. neutrino: Add block header validator implemenation

    This commit introduces a new structure to decouple
    the process of validating `wire.BlockHeaders`
    from the blockmanager.
    
    Signed-off-by: Ononiwu Maureen <maureen.ononiwu@outlook.com>
    Ononiwu Maureen authored and Chinwendu20 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8e8c1e0 View commit details
    Browse the repository at this point in the history
  4. neutrino: Add block header writer implementation.

    This commit introduces a new structure to decouple
    the process of writing `wire.BlockHeaders` to the
    block header store from the blockmanager.
    
    Signed-off-by: Ononiwu Maureen <maureen.ononiwu@outlook.com>
    Ononiwu Maureen authored and Chinwendu20 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f278f17 View commit details
    Browse the repository at this point in the history
  5. neutrino: Add sideloading to chainservice

    This commit adds the sideoading functionality to
    neutrino's chainservice.
    
    Signed-off-by: Ononiwu Maureen <maureen.ononiwu@outlook.com>
    Ononiwu Maureen authored and Chinwendu20 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a69f275 View commit details
    Browse the repository at this point in the history
  6. neutrino: Added itest for sideloading.

    Signed-off-by: Ononiwu Maureen <maureen.ononiwu@outlook.com>
    Ononiwu Maureen authored and Chinwendu20 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9f2a37e View commit details
    Browse the repository at this point in the history