Skip to content

Commit c737a06

Browse files
authored
Update snapshot download docs (#4)
* Update docs * Add donate * Remove unused deps * Update docs * TODO * .
1 parent 7082676 commit c737a06

File tree

4 files changed

+71
-17
lines changed

4 files changed

+71
-17
lines changed

docs/basics/download-UTXO-snapshot.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,54 @@
22
sidebar_position: 3
33
---
44

5-
# Download UTXO Snapshot (Coming Soon)
5+
# Download UTXO Snapshot
66

7-
Subcoin offers a dedicated tool for downloading a Bitcoin Core-compatible UTXO snapshot from the Subcoin P2P network directly. This eliminates the need for Bitcoin Core users to rely on trusted snapshot providers for performing a fast sync.
7+
Subcoin offers a dedicated tool `snapcake` for downloading a Bitcoin Core-compatible UTXO snapshot from the Subcoin P2P network directly. This eliminates the need for Bitcoin Core users to rely on trusted snapshot providers for performing a fast sync.
88

9-
## Tool: `snapcake`
9+
## Command to Download a UTXO Snapshot
1010

11-
To download the UTXO snapshot, simply use the following command:
11+
To download the UTXO snapshot for a specified block, simply use the following command:
1212

1313
```bash
14-
snapcake
14+
snapcake --bootnodes <BOOTNODES> --block-number 840000
15+
```
16+
17+
TODO: public bootnodes
18+
19+
### Notes
20+
21+
- Supported Block:
22+
23+
While snapcake supports downloading the snapshot at any block as long as the peer does not prune the state, only the UTXO snapshot at hardcoded block height 840000 is currently supported for importing into Bitcoin Core.
24+
25+
- Snapshot Format Compatibility:
26+
27+
The snapshot format may change in future versions of Bitcoin Core. Currently, snapcake supports the snapshot format used in Bitcoin Core v28.0.
28+
29+
- Snapshot integrity:
30+
31+
The expected `sha256sum` for the snapshot at block 840000 is:
32+
33+
```text
34+
dc4bb43d58d6a25e91eae93eb052d72e3318bd98ec62a5d0c11817cefbba177b
35+
```
36+
This checksum matches the one documented in the official [Bitcoin Core pull request](https://github.com/bitcoin/bitcoin/pull/28553#issue-1920247340).
37+
38+
## Verify the Downloaded Snapshot
39+
40+
To ensure the integrity of the downloaded snapshot, verify its checksum using the `sha256sum` command:
41+
42+
```bash
43+
# Replace <path-to-snapshot-file> with the path to your downloaded snapshot.
44+
# By default, the file is stored at:
45+
# snapshots/840000_0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5/snapshot.dat
46+
sha256sum <path-to-snapshot-file>
47+
```
48+
49+
The output should match the expected checksum:
50+
51+
```text
52+
dc4bb43d58d6a25e91eae93eb052d72e3318bd98ec62a5d0c11817cefbba177b
1553
```
1654

1755
## Using the Snapshot in Bitcoin Core

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const config = {
8383
src: 'img/subcoin-logo.svg',
8484
},
8585
items: [
86-
{to: '/blog', label: 'Blog', position: 'left'},
8786
{
8887
type: 'docSidebar',
8988
sidebarId: 'tutorialSidebar',
@@ -95,6 +94,7 @@ const config = {
9594
label: 'Dev Guide',
9695
position: 'left',
9796
},
97+
{to: '/blog', label: 'Blog', position: 'left'},
9898
{to: '/docs/donate', label: 'Donate', position: 'left'},
9999
{
100100
href: 'https://github.com/subcoin-project/subcoin',

src/components/HomepageFeatures/index.js

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
import clsx from 'clsx';
22
import Heading from '@theme/Heading';
33
import styles from './styles.module.css';
4+
import Link from '@docusaurus/Link';
45

56
const FeatureList = [
6-
{
7-
title: 'Decentralized Fast Sync',
8-
Svg: require('@site/static/img/blockchain.svg').default,
9-
description: (
10-
<>
11-
Subcoin enables new Bitcoin participants to quickly sync the latest Bitcoin state in a decentralized manner,
12-
achieving the fast sync functionality of Bitcoin Core without depending on a trusted snapshot provider.
13-
</>
14-
),
15-
},
167
{
178
title: 'Written in Rust',
189
Svg: require('@site/static/img/rust.svg').default,
@@ -33,11 +24,30 @@ const FeatureList = [
3324
</>
3425
),
3526
},
27+
{
28+
title: 'Decentralized Fast Sync',
29+
Svg: require('@site/static/img/blockchain.svg').default,
30+
description: (
31+
<>
32+
Subcoin node enables new Bitcoin participants to quickly sync the latest Bitcoin state in a decentralized manner,
33+
achieving the fast sync functionality of Bitcoin Core without depending on a trusted snapshot provider.
34+
</>
35+
),
36+
},
37+
{
38+
title: 'Trustless UTXO Snapshot Provider for Bitcoin Core',
39+
Svg: require('@site/static/img/snapshot_provider.svg').default,
40+
description: (
41+
<>
42+
Subcoin provides a dedicated tool <Link to="/docs/basics/download-UTXO-snapshot"> Snapcake </Link> that serves as a trustless UTXO snapshot provider for Bitcoin Core without running a Subcoin node, downloading the Bitcoin state from the Subcoin P2P network and generating a Bitcoin Core-compatible UTXO snapshot which can be directly imported into Bitcoin Core.
43+
</>
44+
),
45+
},
3646
];
3747

3848
function Feature({Svg, title, description}) {
3949
return (
40-
<div className={clsx('col col--4')}>
50+
<div className={clsx('col col--6')}>
4151
<div className="text--center">
4252
<Svg className={styles.featureSvg} role="img" />
4353
</div>

static/img/snapshot_provider.svg

Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)