-
Notifications
You must be signed in to change notification settings - Fork 929
IDONTWANT message optimisation to cutoff for smaller messages #6456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
6d28509
205078a
b59aee0
a7c7d9d
98dba97
9e92d95
4d657e6
1aad5ad
aac93f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,6 +141,10 @@ pub struct Config { | |
|
|
||
| /// Configuration for the inbound rate limiter (requests received by this node). | ||
| pub inbound_rate_limiter_config: Option<InboundRateLimiterConfig>, | ||
|
|
||
| /// Configuration for the minimum message size for which IDONTWANT messages are send in the mesh. | ||
| /// Lower the value reduces the optimization effect of the IDONTWANT messages. | ||
| pub idontwant_message_size_threshold: usize, | ||
| } | ||
|
|
||
| impl Config { | ||
|
|
@@ -352,6 +356,7 @@ impl Default for Config { | |
| outbound_rate_limiter_config: None, | ||
| invalid_block_storage: None, | ||
| inbound_rate_limiter_config: None, | ||
| idontwant_message_size_threshold: 1000, | ||
|
||
| } | ||
| } | ||
| } | ||
|
|
@@ -433,6 +438,7 @@ pub fn gossipsub_config( | |
| gossipsub_config_params: GossipsubConfigParams, | ||
| seconds_per_slot: u64, | ||
| slots_per_epoch: u64, | ||
| idontwant_message_size_threshold: usize, | ||
| ) -> gossipsub::Config { | ||
| fn prefix( | ||
| prefix: [u8; 4], | ||
|
|
@@ -504,6 +510,7 @@ pub fn gossipsub_config( | |
| .duplicate_cache_time(duplicate_cache_time) | ||
| .message_id_fn(gossip_message_id) | ||
| .allow_self_origin(true) | ||
| .idontwant_message_size_threshold(idontwant_message_size_threshold) | ||
| .build() | ||
| .expect("valid gossipsub configuration") | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.