Skip to content

Commit a2363eb

Browse files
feat: add deposit-snapshot-enabled reference (#452)
* feat: add `deposit-snapshot-enabled` reference --------- Co-authored-by: Alexandra Tran Carrillo <[email protected]>
1 parent c1d3c9b commit a2363eb

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/Reference/CLI/CLI-Syntax.md

+38
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,44 @@ After [The Merge](../../Concepts/Merge.md), you can't use `eth1-endpoint` to spe
601601

602602
:::
603603

604+
### deposit-snapshot-enabled
605+
606+
<!--tabs-->
607+
608+
# Syntax
609+
610+
```bash
611+
--deposit-snapshot-enabled[=<BOOLEAN>]
612+
```
613+
614+
# Example
615+
616+
```bash
617+
--deposit-snapshot-enabled=false
618+
```
619+
620+
# Environment variable
621+
622+
```bash
623+
TEKU_DEPOSIT_SNAPSHOT_ENABLED=false
624+
```
625+
626+
# Configuration file
627+
628+
```bash
629+
deposit-snapshot-enabled: false
630+
```
631+
632+
<!--/tabs-->
633+
634+
Enables or disables using a bundled deposit contract tree snapshot and persisting the tree after finalization. The default is `true`.
635+
636+
Normally, at sync, Teku requests all deposit logs from the execution layer up to the head. At each startup, Teku loads all deposits from the disk and replays them to recreate the merkle tree. Both operations consume peer resources and delay node availability on restart. The feature enabled by this option dramatically decreases the time of both operations by bundling deposit tree snapshots in the Teku distribution for all major networks (Mainnet, Gnosis, Goerli, and Sepolia) and persisting the current tree after finalization. Instead of replaying thousands of deposits on startup, Teku loads the bundled tree or a saved one, whichever is the latest.
637+
638+
:::info Security considerations
639+
If a malicious peer changes the bundled tree, Teku throws `InvalidDepositEventsException` on the next deposit received from the execution layer. The malicious peer can't follow up the chain, and so can't propose with an incorrect deposit tree snapshot.
640+
:::
641+
604642
### exchange-capabilities-enabled
605643

606644
<!--tabs-->

0 commit comments

Comments
 (0)