You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/src/snapshot/NOTES.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,10 @@
1
1
# Bootstrapping from a Snapshot file
2
+
2
3
We can boot an Acropolis node either from geneis and replay all of the blocks up to
3
4
some point, or we can boot from a snapshot file. This module provides the components
4
-
needed to boot from a snapshot file. See [snapshot_bootsrapper](../../../modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs) for the process that references and runs with these helpers.
5
+
needed to boot from a snapshot file.
6
+
See [snapshot_bootsrapper](../../../modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs) for the process that
7
+
references and runs with these helpers.
5
8
6
9
Booting from a snapshot takes minutes instead of the hours it takes to boot from
7
10
genesis. It also allows booting from a given epoch which allows one to create tests
@@ -10,22 +13,27 @@ eras and will typically boot from Conway around epoch 305, 306, and 307. It take
10
13
three epochs to have enough context to correctly calculate the rewards.
11
14
12
15
The required data for boostrapping are:
16
+
13
17
- snapshot files (each has an associated epoch number and point)
14
18
- nonces
15
19
- headers
16
20
17
21
## Snapshot Files
22
+
18
23
The snapshots come from the Amaru project. In their words,
19
24
"the snapshots we generated are different [from a Mithril snapshot]: they're
20
-
the actual ledger state; i.e. the in-memory state that is constructed by iterating over each block up to a specific point. So, it's all the UTxOs, the set of pending governance actions, the account balance, etc.
25
+
the actual ledger state; i.e. the in-memory state that is constructed by iterating over each block up to a specific
26
+
point. So, it's all the UTxOs, the set of pending governance actions, the account balance, etc.
21
27
If you get this from a trusted source, you don't need to do any replay, you can just start up and load this from disk.
22
-
The format of these is completely non-standard; we just forked the haskell node and spit out whatever we needed to in CBOR."
28
+
The format of these is completely non-standard; we just forked the haskell node and spit out whatever we needed to in
29
+
CBOR."
23
30
24
31
Snapshot files are referenced by their epoch number in the config.json file below.
25
32
26
33
See [Amaru snapshot format](../../../docs/amaru-snapshot-structure.md)
27
34
28
35
## Configuration files
36
+
29
37
There is a path for each network bootstrap configuration file. Network Should
30
38
be one of 'mainnet', 'preprod', 'preview' or 'testnet_<magic>' where
31
39
`magic` is a 32-bits unsigned value denoting a particular testnet.
@@ -43,7 +51,8 @@ a network name of `preview`, the expected layout for configuration files would b
43
51
*`data/preview/nonces.json`: a list of `InitialNonces` values,
44
52
*`data/preview/headers.json`: a list of `Point`s.
45
53
46
-
These files are loaded by [snapshot_bootsrapper](../../../modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs) during bootup.
54
+
These files are loaded by [snapshot_bootsrapper](../../../modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs)
55
+
during bootup.
47
56
48
57
## Bootstrapping sequence
49
58
@@ -75,7 +84,8 @@ headers. Snapshot parsing is done while streaming the data to keep the memory
75
84
footprint lower. As elements of the file are parsed, callbacks provide the data
76
85
to the boostrapper which publishes the data on the message bus.
77
86
78
-
There are TODO markers in [snapshot_bootsrapper](../../../modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs) that show where to add the
87
+
There are TODO markers in [snapshot_bootsrapper](../../../modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs)
0 commit comments