From cc6cf0fdb23a384a007a0c342ed352cf49c110e6 Mon Sep 17 00:00:00 2001 From: boqiu <82121246@qq.com> Date: Fri, 25 Oct 2024 15:01:32 +0800 Subject: [PATCH] Enable file sync protocol v2 in config file by default --- node/sync/src/lib.rs | 2 +- run/config-testnet-standard.toml | 4 ++++ run/config-testnet-turbo.toml | 4 ++++ run/config.toml | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/node/sync/src/lib.rs b/node/sync/src/lib.rs index 5f1a60e..3f08d85 100644 --- a/node/sync/src/lib.rs +++ b/node/sync/src/lib.rs @@ -23,7 +23,7 @@ pub struct Config { // sync service config /// Indicates whether to sync file from neighbor nodes only. /// This is to avoid flooding file announcements in the whole network, - /// which leads to high latency or event timeout to sync files. + /// which leads to high latency or even timeout to sync files. pub neighbors_only: bool, #[serde(deserialize_with = "deserialize_duration")] pub heartbeat_interval: Duration, diff --git a/run/config-testnet-standard.toml b/run/config-testnet-standard.toml index 0aa2166..2a88284 100644 --- a/run/config-testnet-standard.toml +++ b/run/config-testnet-standard.toml @@ -232,6 +232,10 @@ batcher_announcement_capacity = 100 # all files, and sufficient disk space is required. auto_sync_enabled = true +# Indicates whether to sync file from neighbor nodes only. This is to avoid flooding file +# announcements in the whole network, which leads to high latency or even timeout to sync files. +neighbors_only = true + # Maximum number of files in sync from other peers simultaneously. # max_sync_files = 8 diff --git a/run/config-testnet-turbo.toml b/run/config-testnet-turbo.toml index c969bb4..d46951f 100644 --- a/run/config-testnet-turbo.toml +++ b/run/config-testnet-turbo.toml @@ -244,6 +244,10 @@ batcher_announcement_capacity = 100 # all files, and sufficient disk space is required. auto_sync_enabled = true +# Indicates whether to sync file from neighbor nodes only. This is to avoid flooding file +# announcements in the whole network, which leads to high latency or even timeout to sync files. +neighbors_only = true + # Maximum number of files in sync from other peers simultaneously. # max_sync_files = 8 diff --git a/run/config.toml b/run/config.toml index 6d0f4c8..193f989 100644 --- a/run/config.toml +++ b/run/config.toml @@ -246,6 +246,10 @@ # all files, and sufficient disk space is required. # auto_sync_enabled = false +# Indicates whether to sync file from neighbor nodes only. This is to avoid flooding file +# announcements in the whole network, which leads to high latency or even timeout to sync files. +neighbors_only = true + # Maximum number of files in sync from other peers simultaneously. # max_sync_files = 8