Skip to content

Commit

Permalink
Adjust default config for sync layer
Browse files Browse the repository at this point in the history
  • Loading branch information
boqiu committed Dec 18, 2024
1 parent ccc7519 commit 6293006
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
14 changes: 7 additions & 7 deletions node/sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ impl Default for Config {
Self {
// sync service config
neighbors_only: true,
heartbeat_interval: Duration::from_secs(5),
heartbeat_interval: Duration::from_secs(3),
auto_sync_enabled: false,
max_sync_files: 8,
max_sync_files: 16,
sync_file_by_rpc_enabled: true,
sync_file_on_announcement_enabled: false,

// serial sync config
max_chunks_to_request: 2 * 1024,
max_request_failures: 5,
max_request_failures: 3,
peer_connect_timeout: Duration::from_secs(15),
peer_disconnect_timeout: Duration::from_secs(15),
peer_find_timeout: Duration::from_secs(120),
peer_find_timeout: Duration::from_secs(5),
peer_chunks_download_timeout: Duration::from_secs(15),
peer_wait_outgoing_connection_timeout: Duration::from_secs(10),
peer_next_chunks_request_wait_timeout: Duration::from_secs(3),
Expand All @@ -91,9 +91,9 @@ impl Default for Config {
auto_sync_idle_interval: Duration::from_secs(3),
auto_sync_error_interval: Duration::from_secs(10),
max_sequential_workers: 0,
max_random_workers: 2,
sequential_find_peer_timeout: Duration::from_secs(60),
random_find_peer_timeout: Duration::from_secs(500),
max_random_workers: 8,
sequential_find_peer_timeout: Duration::from_secs(5),
random_find_peer_timeout: Duration::from_secs(5),
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions run/config-testnet-standard.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ batcher_announcement_capacity = 100
auto_sync_enabled = true

# Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8
# max_sync_files = 16

# Enable to start a file sync via RPC (e.g. `admin_startSyncFile`).
# sync_file_by_rpc_enabled = true

# Maximum number of continous failures to terminate a file sync.
# max_request_failures = 5
# max_request_failures = 3

# Timeout to dial peers.
# peer_connect_timeout = "15s"
Expand All @@ -248,7 +248,7 @@ auto_sync_enabled = true
# peer_disconnect_timeout = "15s"

# Timeout to find peers via FIND_FILE P2P pubsub message.
# peer_find_timeout = "120s"
# peer_find_timeout = "5s"

# Timeout to download data from remote peer.
# peer_chunks_download_timeout = "15s"
Expand All @@ -261,13 +261,13 @@ auto_sync_enabled = true
# max_sequential_workers = 0

# Maximum threads to sync files randomly.
# max_random_workers = 2
# max_random_workers = 8

# Timeout to terminate a file sync in sequence.
# sequential_find_peer_timeout = "60s"
# sequential_find_peer_timeout = "5s"

# Timeout to terminate a file sync randomly.
# random_find_peer_timeout = "500s"
# random_find_peer_timeout = "5s"

#######################################################################
### File Location Cache Options ###
Expand Down
12 changes: 6 additions & 6 deletions run/config-testnet-turbo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ batcher_announcement_capacity = 100
auto_sync_enabled = true

# Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8
# max_sync_files = 16

# Enable to start a file sync via RPC (e.g. `admin_startSyncFile`).
# sync_file_by_rpc_enabled = true

# Maximum number of continous failures to terminate a file sync.
# max_request_failures = 5
# max_request_failures = 3

# Timeout to dial peers.
# peer_connect_timeout = "15s"
Expand All @@ -260,7 +260,7 @@ auto_sync_enabled = true
# peer_disconnect_timeout = "15s"

# Timeout to find peers via FIND_FILE P2P pubsub message.
# peer_find_timeout = "120s"
# peer_find_timeout = "5s"

# Timeout to download data from remote peer.
# peer_chunks_download_timeout = "15s"
Expand All @@ -273,13 +273,13 @@ auto_sync_enabled = true
# max_sequential_workers = 0

# Maximum threads to sync files randomly.
# max_random_workers = 2
# max_random_workers = 8

# Timeout to terminate a file sync in sequence.
# sequential_find_peer_timeout = "60s"
# sequential_find_peer_timeout = "5s"

# Timeout to terminate a file sync randomly.
# random_find_peer_timeout = "500s"
# random_find_peer_timeout = "5s"

#######################################################################
### File Location Cache Options ###
Expand Down
12 changes: 6 additions & 6 deletions run/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,13 @@
# auto_sync_enabled = false

# Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8
# max_sync_files = 16

# Enable to start a file sync via RPC (e.g. `admin_startSyncFile`).
# sync_file_by_rpc_enabled = true

# Maximum number of continous failures to terminate a file sync.
# max_request_failures = 5
# max_request_failures = 3

# Timeout to dial peers.
# peer_connect_timeout = "15s"
Expand All @@ -262,7 +262,7 @@
# peer_disconnect_timeout = "15s"

# Timeout to find peers via FIND_FILE P2P pubsub message.
# peer_find_timeout = "120s"
# peer_find_timeout = "5s"

# Timeout to download data from remote peer.
# peer_chunks_download_timeout = "15s"
Expand All @@ -275,13 +275,13 @@
# max_sequential_workers = 0

# Maximum threads to sync files randomly.
# max_random_workers = 2
# max_random_workers = 8

# Timeout to terminate a file sync in sequence.
# sequential_find_peer_timeout = "60s"
# sequential_find_peer_timeout = "5s"

# Timeout to terminate a file sync randomly.
# random_find_peer_timeout = "500s"
# random_find_peer_timeout = "5s"

#######################################################################
### File Location Cache Options ###
Expand Down

0 comments on commit 6293006

Please sign in to comment.