Skip to content

Commit

Permalink
merge formal snapshot and snapshots docs (#15898)
Browse files Browse the repository at this point in the history
## Description 

most of the info in the formal snapshot page is stale, this merges the
two docs
  • Loading branch information
johnjmartin authored Jan 24, 2024
1 parent 9fdeb21 commit 7fae55d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 75 deletions.
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.
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

0 comments on commit 7fae55d

Please sign in to comment.