Skip to content

Commit 5505d51

Browse files
committed
Update parameters in common.rs
1 parent 44b04f9 commit 5505d51

File tree

1 file changed

+5
-5
lines changed
  • polkadot/node/network/collator-protocol/src/validator_side_experimental

1 file changed

+5
-5
lines changed

polkadot/node/network/collator-protocol/src/validator_side_experimental/common.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ pub const CONNECTED_PEERS_PARA_LIMIT: NonZeroU16 = const {
4444
pub const MAX_STARTUP_ANCESTRY_LOOKBACK: u32 = 20;
4545

4646
/// Reputation bump for getting a valid candidate included in a finalized block.
47-
pub const VALID_INCLUDED_CANDIDATE_BUMP: u16 = 50;
47+
pub const VALID_INCLUDED_CANDIDATE_BUMP: u16 = 100;
4848

4949
/// Reputation slash for peer inactivity (for each included candidate of the para that was not
5050
/// authored by the peer)
5151
pub const INACTIVITY_DECAY: u16 = 1;
5252

5353
/// Maximum number of stored peer scores for a paraid. Should be greater than
5454
/// `CONNECTED_PEERS_PARA_LIMIT`.
55-
pub const MAX_STORED_SCORES_PER_PARA: u8 = 150;
55+
pub const MAX_STORED_SCORES_PER_PARA: u8 = 1000;
5656

5757
/// Slashing value for a failed fetch that we can be fairly sure does not happen by accident.
5858
pub const FAILED_FETCH_SLASH: Score = Score::new(20).expect("20 is less than MAX_SCORE");
@@ -62,17 +62,17 @@ pub const INVALID_COLLATION_SLASH: Score = Score::new(1000).expect("1000 is less
6262

6363
/// Minimum reputation threshold that warrants an instant fetch.
6464
pub const INSTANT_FETCH_REP_THRESHOLD: Score =
65-
Score::new(1000).expect("1000 is less than MAX_SCORE");
65+
Score::new(1800).expect("1000 is less than MAX_SCORE");
6666

6767
/// Delay for fetching collations when the reputation score is below the threshold
6868
/// defined by `INSTANT_FETCH_REP_THRESHOLD`.
6969
/// This gives us a chance to fetch collations from other peers with higher reputation
7070
/// before we try to fetch from this peer.
71-
pub const UNDER_THRESHOLD_FETCH_DELAY: Duration = Duration::from_millis(1000);
71+
pub const UNDER_THRESHOLD_FETCH_DELAY: Duration = Duration::from_millis(300);
7272

7373
/// The minimum interval after which we may want to stop the main loop in order to fetch available
7474
/// advertised collations.
75-
pub const MIN_FETCH_TIMER_DELAY: Duration = Duration::from_millis(500);
75+
pub const MIN_FETCH_TIMER_DELAY: Duration = Duration::from_millis(150);
7676

7777
/// Reputation score type.
7878
#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone, Copy, Default)]

0 commit comments

Comments
 (0)