Skip to content

Commit

Permalink
[Narwhal] reduce max header timeout from 2s to 1s (MystenLabs#13668)
Browse files Browse the repository at this point in the history
## Description 

This change should be less relevant after leader schedule change rolls
out. And dynamic config will be strictly better. Still, when a validator
is down, 2s timeout is too disruptive. Reducing it to 1s.

## Test Plan 

Watching private testnet metrics.

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
mwtian authored Sep 7, 2023
1 parent ab571e5 commit 94d575f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down Expand Up @@ -113,7 +113,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down Expand Up @@ -199,7 +199,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down Expand Up @@ -285,7 +285,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down Expand Up @@ -371,7 +371,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down Expand Up @@ -457,7 +457,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down Expand Up @@ -543,7 +543,7 @@ validator_configs:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
Expand Down
2 changes: 1 addition & 1 deletion narwhal/Docker/validators/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"max_header_num_of_batches": 1000,
"max_batch_delay": "200ms",
"max_concurrent_requests": 500000,
"max_header_delay": "2000ms",
"max_header_delay": "1000ms",
"sync_retry_delay": "10_000ms",
"sync_retry_nodes": 3,
"prometheus_metrics": {
Expand Down
2 changes: 1 addition & 1 deletion narwhal/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The nodes parameters determine the configuration for the primaries and workers:
node_params = {
'header_num_of_batches_threshold': 32,
'max_header_num_of_batches': 1000,
'max_header_delay': '2000ms',
'max_header_delay': '1000ms',
'min_header_delay': '500ms',
'gc_depth': 50,
'sync_retry_delay': '10000ms',
Expand Down
6 changes: 3 additions & 3 deletions narwhal/benchmark/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def local(ctx, debug=True):
node_params = {
'header_num_of_batches_threshold': 32,
'max_header_num_of_batches': 1000,
'max_header_delay': '2000ms', # ms
'max_header_delay': '1000ms', # ms
'gc_depth': 50, # rounds
'sync_retry_delay': '10_000ms', # ms
'sync_retry_nodes': 3, # number of nodes
Expand Down Expand Up @@ -64,7 +64,7 @@ def smoke(ctx, debug=True, release=False):
node_params = {
'header_num_of_batches_threshold': 32,
'max_header_num_of_batches': 1000,
'max_header_delay': '2000ms', # ms
'max_header_delay': '1000ms', # ms
'gc_depth': 50, # rounds
'sync_retry_delay': '10_000ms', # ms
'sync_retry_nodes': 3, # number of nodes
Expand Down Expand Up @@ -144,7 +144,7 @@ def demo(ctx, debug=True):
"max_header_num_of_batches": 1000,
"max_batch_delay": "200ms", # ms
"max_concurrent_requests": 500_000,
"max_header_delay": "2000ms", # ms
"max_header_delay": "1000ms", # ms
"sync_retry_delay": "10_000ms", # ms
"sync_retry_nodes": 3, # number of nodes
'prometheus_metrics': {
Expand Down
2 changes: 1 addition & 1 deletion narwhal/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl Parameters {
}

fn default_max_header_delay() -> Duration {
Duration::from_secs(2)
Duration::from_secs(1)
}

fn default_min_header_delay() -> Duration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: parameters
{
"header_num_of_batches_threshold": 32,
"max_header_num_of_batches": 1000,
"max_header_delay": "2000ms",
"max_header_delay": "1000ms",
"min_header_delay": "500ms",
"gc_depth": 50,
"sync_retry_delay": "5000ms",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: params
{
"header_num_of_batches_threshold": 32,
"max_header_num_of_batches": 1000,
"max_header_delay": "2000ms",
"max_header_delay": "1000ms",
"min_header_delay": "500ms",
"gc_depth": 50,
"sync_retry_delay": "5000ms",
Expand Down
1 change: 0 additions & 1 deletion narwhal/test-utils/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ impl Cluster {
fn parameters() -> Parameters {
Parameters {
batch_size: 200,
max_header_delay: Duration::from_secs(2),
..Parameters::default()
}
}
Expand Down
2 changes: 1 addition & 1 deletion nre/config/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ consensus-config:
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
max_header_delay: 1000ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
Expand Down

0 comments on commit 94d575f

Please sign in to comment.