@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
29 lines • 1.62 kB
TypeScript
/** The default score for new peers */
export declare const DEFAULT_SCORE = 0;
/** The minimum reputation before a peer is disconnected */
export declare const MIN_SCORE_BEFORE_DISCONNECT = -20;
/** The minimum reputation before a peer is banned */
export declare const MIN_SCORE_BEFORE_BAN = -50;
export declare const MIN_LODESTAR_SCORE_BEFORE_BAN = -60;
/** The maximum score a peer can obtain. Update metrics.peerScore if this changes */
export declare const MAX_SCORE = 100;
/** The minimum score a peer can obtain. Update metrics.peerScore if this changes */
export declare const MIN_SCORE = -100;
/** Drop score if absolute value is below this threshold */
export declare const SCORE_THRESHOLD = 1;
/** The halflife of a peer's score. I.e the number of milliseconds it takes for the score to decay to half its value */
export declare const SCORE_HALFLIFE_MS: number;
export declare const HALFLIFE_DECAY_MS: number;
/** The number of milliseconds we ban a peer for before their score begins to decay */
export declare const COOL_DOWN_BEFORE_DECAY_MS: number;
/** Limit of entries in the scores map */
export declare const MAX_ENTRIES = 1000;
/** Const that gets returned when no cool-down is applied */
export declare const NO_COOL_DOWN_APPLIED = -1;
/**
* We weight negative gossipsub scores in such a way that they never result in a disconnect by
* themselves. This "solves" the problem of non-decaying gossipsub scores for disconnected peers.
*/
export declare const GOSSIPSUB_NEGATIVE_SCORE_WEIGHT: number;
export declare const GOSSIPSUB_POSITIVE_SCORE_WEIGHT: number;
//# sourceMappingURL=constants.d.ts.map