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

🔷 [ProjectTracking] Checklist for GCS-based State Sync #9571

Closed
5 tasks done
Sarah-NEAR opened this issue Sep 25, 2023 · 4 comments
Closed
5 tasks done

🔷 [ProjectTracking] Checklist for GCS-based State Sync #9571

Sarah-NEAR opened this issue Sep 25, 2023 · 4 comments
Assignees

Comments

@Sarah-NEAR
Copy link

Sarah-NEAR commented Sep 25, 2023

Goals

Background

State Sync equips validator nodes with State data they need in order to produce blocks. Without it, nodes need to get the state data from outside the chain (e.g. from an S3 snapshot) and constantly spend effort to keep the state up to date with the chain. GCS-based State Sync is the first stage of the effort, relying on GCS as a shared medium to transfer state data between nodes.

Why should NEAR One work on this

State Sync unblocks two features:

  • It allows nodes to track a subset of the shards (e.g. chunk-only producers can track a single shard). Since nodes are able to get the state data they need from the network, they no longer required to track all of it locally. Tracking a single shard is one of the main pillars of chain scalability.
  • It allows validators and RPC operators to spin-up nodes without relying on the S3 snapshots.

What needs to be accomplished

Largely, for GCS-based State Sync we need to generate state parts, collectively upload them to GCS, download them when needed and apply them on the new node.

Main use case

  • Chain scalability, via tracking a sigle shard
  • Easier spin-up of nodes, without relying on S3 snapshots.

Links to external documentations and discussions

Additional resources will be added here when they become available.

Estimated effort

Most of the effort was already covered with @nikurt, @ppca covering most of the work. Currently we are polishing rough edges unvelied by allowing nodes to track a single shard.

Assumptions

There are no specific assumptions that this project is making.

Pre-requisites

N/A

Out of scope

N/A

Task list:

Tasks

  1. Near Core Node
    nikurt
  2. Near Core Node
  3. Near Core Node
    telezhnaya
  4. Near Core Node
    marcelo-gonzalez
  5. 4 of 4
    A-stateless-validation Epic Node project-tracking
    VanBarbascu
@gmilescu gmilescu added the Node Node team label Oct 19, 2023
@gmilescu gmilescu changed the title 🔷 Release GCS-based State Sync to mainnet 🔷 [State Sync] Release GCS-based State Sync to mainnet Nov 2, 2023
@gmilescu
Copy link

2023-11-27

  • Code complete
  • Code merged into 1.36
  • We have known issue: single shard tracking causes nodes to get stuck (due to flat storage API inconsistencies). Bugfix will be included in 1.37
  • Alerting and monitoring completed.
  • Next steps: update the reference node config file to enable state sync and single shard tracking.

@telezhnaya telezhnaya changed the title 🔷 [State Sync] Release GCS-based State Sync to mainnet 🔷 [State Sync] Checklist for GCS-based State Sync Dec 11, 2023
@nikurt
Copy link
Contributor

nikurt commented Dec 19, 2023

  • Released in 1.36
  • Enabled by default
  • We have known issue: single shard tracking causes nodes to get stuck (due to flat storage API inconsistencies). Bugfix will be included in 1.37
  • Alerting and monitoring completed.

Next steps: Garbage collect state from GCS

@nikurt nikurt assigned telezhnaya and unassigned nikurt Dec 19, 2023
@gmilescu gmilescu changed the title 🔷 [State Sync] Checklist for GCS-based State Sync 🔷 [ProjectTracking] Checklist for GCS-based State Sync Jan 18, 2024
@telezhnaya
Copy link
Contributor

telezhnaya commented Jan 18, 2024

Issue with garbage collection is solved
Some more things to do:

  • Create separate DB for State snapshots because they take unpredictable amount of space
  • Upload headers to GCP to be able to work with stateless validation

@gmilescu
Copy link

Actual work on State Sync (GCS-based) is completed, so it makes sense to close this issue, and open a new one that focuses on enabling single-shard tracking.

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

No branches or pull requests

4 participants