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

merge formal snapshot and snapshots docs #15898

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions docs/content/guides/operator/formal-snapshot.mdx

This file was deleted.

30 changes: 20 additions & 10 deletions docs/content/guides/operator/snapshots.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Snapshots
title: Database Snapshots
description: Database snapshots of the Sui network enable Full node operators a way to bootstrap a Full node without having to execute all the transactions that occurred after genesis.
---

Expand All @@ -25,6 +25,16 @@ Formal snapshots are not suitable for use if you are running an RPC node that do
You can configure a Full node snapshot to generate a state snapshot at the end of each epoch.
A single Full node can generate RocksDB snapshots, Formal snapshots, or both.

## Formal snapshots

Formal snapshots provide a mechanism for a node to restore to a canonical state (the state of a full pruned and compacted node at the end of an epoch) at some prior point in time without having to execute all the transactions that have occurred since genesis. Unlike existing database snapshots, these formal snapshots have the following properties:

1. **Minimalism:** Formal snapshots currently contain only the end of epoch live object set (the set of all object versions eligible for use as input objects for future transactions). Sui syncs all other critical chain information from the chain or derives it. Thus, formal snapshots contain only the necessary data required for a node to startup at epoch boundary and participate in the network.
1. **Agnosticism:** Formal snapshots are by nature agnostic to the underlying database choice or implementation of the protocol. As the live object set is protocol defined, so is the formal snapshot.
1. **Verifiability:** Formal snapshots have first-class support in the core Sui protocol. As such, they must be trustless/verifiable by the node operator upon download. To support this, the protocol signs a commitment to the live object state at end of epoch, which formal snapshots are checked against at restore time. If this verification fails, the node state is moved back to the state before the snapshot restore attempt.

Because these snapshots do not contain indexes, they are most immediately useful for validators and state sync Full nodes (SSFNs). You can upload snapshots to remote object stores like S3, Google Cloud Storage, Azure Blob Storage, and similar services. These services typically run the export process in the background so there is no degradation in performance for your Full node. With snapshots stored in the cloud, you can recover from catastrophic failures in your system or hardware more efficiently.

## Enabling snapshots

Full nodes do not take snapshots by default. To enable this feature you must apply specific configs to your Full node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why it won't let me write a comment below, but on line 48 can we rename to ### Enabling DB snapshots for consntsency?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also what are your thoughts on changing line 2 above to be DB Snapshots or Database Snapshots or Full Snapshots? I think part of the confusion has been the fact that "snapshots" is now ambiguous, so we should disambiguate in all cases, not just some.

Expand All @@ -35,7 +45,7 @@ Follow these steps to change the configs for a Full node:
2. Open your fullnode.yaml config file and apply config updates as the following sections show.
3. Save the fullnode.yaml file and restart the node.

### Enabling RocksDB snapshots
### Enabling DB snapshots

Add an entry to the config file for `db-checkpoint-config`. Using Amazon's S3 service as an example:
```yaml
Expand All @@ -58,16 +68,16 @@ Add an entry to the config file for `db-checkpoint-config`. Using Amazon's S3 se

### Enabling Formal snapshots

Add an entry to the config file for `db-checkpoint-config`. Using Amazon's S3 service as an example:
Add an entry to the config file for `state-snapshot-write-config`. Using Amazon's S3 service as an example:
```yaml
state-snapshot-write-config:
object-store-config:
object-store: "S3"
bucket: "<BUCKET-NAME>"
aws-access-key-id: “<ACCESS-KEY>”
aws-secret-access-key: “<SHARED-KEY>”
aws-region: "<BUCKET-REGION>"
object-store-connection-limit: 200
object-store-config:
object-store: "S3"
bucket: "<BUCKET-NAME>"
aws-access-key-id: “<ACCESS-KEY>”
aws-secret-access-key: “<SHARED-KEY>”
aws-region: "<BUCKET-REGION>"
object-store-connection-limit: 200
```
The configuration settings shown in the example are specific to AWS S3, but GCS, Azure Storage, and Cloudflare R2 are all supported.

Expand Down
1 change: 0 additions & 1 deletion docs/content/sidebars/guides.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ const guides = [
'guides/operator/validator-committee',
'guides/operator/validator-tasks',
'guides/operator/node-tools',
'guides/operator/formal-snapshot',
'guides/operator/exchange-integration',
],
},
Expand Down
Loading