diff --git a/docs/guides/nwaku/config-options.md b/docs/guides/nwaku/config-options.md index 915ec30..671be8b 100644 --- a/docs/guides/nwaku/config-options.md +++ b/docs/guides/nwaku/config-options.md @@ -84,6 +84,15 @@ Here are the available node configuration options, along with their default valu | `store-message-db-vacuum` | `false` | Enable database vacuuming at start. Only supported by SQLite database engine | | `store-message-db-migration` | `true` | Enable database migration at start | +## Store Sync + +| Name | Default Value | Description | +| -------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `store-sync` | `false` | Enable/disable waku store sync protocol | +| `store-sync-interval` | `300` 5 minutes | Interval between store syncronization attempts | +| `store-sync-range` | `3600` 1 hour | Amount of time to sync | +| `store-sync-relay-jitter` | `20` seconds | Sync range offset to account for relay's message propagation jitter | + ## Filter config | Name | Default Value | Description | diff --git a/docs/guides/nwaku/configure-nwaku.md b/docs/guides/nwaku/configure-nwaku.md index 2e388b5..21ef442 100644 --- a/docs/guides/nwaku/configure-nwaku.md +++ b/docs/guides/nwaku/configure-nwaku.md @@ -78,6 +78,24 @@ For example, consider a `nwaku` node that does not store messages but can query ./build/wakunode2 --storenode=/dns4/node-01.ac-cn-hongkong-c.waku.sandbox.status.im/tcp/30303/p2p/16Uiu2HAmSJvSJphxRdbnigUV5bjRRZFBhTtWFTSyiKaQByCjwmpV ``` +## Configure store sync + +To enable syncronization between stores, enable the protocol via the configuration options below; + +- `store-sync`: Enable store sync protocol (disable by default). +- `store-sync-interval`: Interval between store syncronization attempts, in seconds (300s default). +- `store-sync-range`: Amount of time to sync, in seconds (3600s default). +- `store-sync-relay-jitter`: Sync range offset to account for relay's message propagation jitter, in seconds (20s default). + +Configuration example. +``` +./build/wakunode2 \ + --store-sync=true \ + --store-sync-interval=300 \ + --store-sync-range=3600 \ + --store-sync-relay-jitter=20 +``` + ## Generate and configure a node key 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: