Skip to content

Commit 0df0fcb

Browse files
SionoiSfryorcrakenjm-clius
authored
feat: add store sync entrees (#239)
Co-authored-by: fryorcraken <[email protected]> Co-authored-by: Hanno Cornelius <[email protected]>
1 parent e00bfdd commit 0df0fcb

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"IPFS",
8484
"cheatsheet",
8585
"hacken",
86+
"statusteam",
8687
],
8788
"flagWords": [],
8889
"ignorePaths": [

docs/guides/nwaku/config-options.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ Here are the available node configuration options, along with their default valu
8484
| `store-message-db-vacuum` | `false` | Enable database vacuuming at start. Only supported by SQLite database engine |
8585
| `store-message-db-migration` | `true` | Enable database migration at start |
8686

87+
## Store Sync
88+
89+
| Name | Default Value | Description |
90+
| -------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91+
| `store-sync` | `false` | Enable/disable waku store sync protocol |
92+
| `store-sync-interval` | `300` 5 minutes | Interval between store synchronization attempts |
93+
| `store-sync-range` | `3600` 1 hour | Amount of time to sync |
94+
| `store-sync-relay-jitter` | `20` seconds | Sync range offset to account for relay's message propagation jitter |
95+
8796
## Filter config
8897

8998
| Name | Default Value | Description |

docs/guides/nwaku/configure-nwaku.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@ For example, consider a `nwaku` node that does not store messages but can query
7878
./build/wakunode2 --storenode=/dns4/node-01.ac-cn-hongkong-c.waku.sandbox.status.im/tcp/30303/p2p/16Uiu2HAmSJvSJphxRdbnigUV5bjRRZFBhTtWFTSyiKaQByCjwmpV
7979
```
8080

81+
## Configure store sync
82+
83+
To enable synchronization between stores, enable the protocol via the configuration options below;
84+
85+
- `store-sync`: Enable store sync protocol (disable by default).
86+
- `store-sync-interval`: Interval between store synchronization attempts, in seconds (300s default).
87+
- `store-sync-range`: Amount of time to sync, in seconds (3600s default).
88+
- `store-sync-relay-jitter`: Sync range offset to account for relay's message propagation jitter, in seconds (20s default).
89+
90+
Configuration example.
91+
```
92+
./build/wakunode2 \
93+
--store-sync=true \
94+
--store-sync-interval=300 \
95+
--store-sync-range=3600 \
96+
--store-sync-relay-jitter=20
97+
```
98+
8199
## Generate and configure a node key
82100

83101
Nodes generate [new random key pairs](/learn/glossary#node-key) at each boot, leading to different `multiaddrs`. To maintain consistency, you can use a pre-generated private key with the `nodekey` option:

0 commit comments

Comments
 (0)