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

segregate chain and state blockstores #5695

Merged
merged 6 commits into from
Mar 3, 2021
Merged

Commits on Feb 28, 2021

  1. segregate chain and state blockstores.

    This paves the way for better object lifetime management.
    
    Concretely, it makes it possible to:
    - have different stores backing chain and state data.
    - having the same datastore library, but using different parameters.
    - attach different caching layers/policies to each class of data, e.g.
      sizing caches differently.
    - specifying different retention policies for chain and state data.
    
    This separation is important because:
    - access patterns/frequency of chain and state data are different.
    - state is derivable from chain, so one could never expunge the chain
      store, and only retain state objects reachable from the last finality
      in the state store.
    raulk committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    3795cc2 View commit details
    Browse the repository at this point in the history
  2. fix test compilation error.

    raulk committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    b34b4e0 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2021

  1. address review comments.

    raulk committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    b1c348b View commit details
    Browse the repository at this point in the history
  2. implement blockstore.Union, a union blockstore.

    The union blockstore takes a list of blockstores. It returns the first
    satisfying read, and broadcasts writes to all stores.
    
    It can be used for operations that require reading from any two blockstores,
    for example WalkSnapshot.
    raulk committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    2047a74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    68b8e8e View commit details
    Browse the repository at this point in the history
  4. address review comments.

    raulk committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    1ac0c9a View commit details
    Browse the repository at this point in the history