@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
30 lines • 1.24 kB
JavaScript
export var ScoreState;
(function (ScoreState) {
/** We are content with the peers performance. We permit connections and messages. */
ScoreState["Healthy"] = "Healthy";
/** The peer should be disconnected. We allow re-connections if the peer is persistent */
ScoreState["Disconnected"] = "Disconnected";
/** The peer is banned. We disallow new connections until it's score has decayed into a tolerable threshold */
ScoreState["Banned"] = "Banned";
})(ScoreState || (ScoreState = {}));
export var PeerAction;
(function (PeerAction) {
/** Immediately ban peer */
PeerAction["Fatal"] = "Fatal";
/**
* Not malicious action, but it must not be tolerated
* ~5 occurrences will get the peer banned
*/
PeerAction["LowToleranceError"] = "LowToleranceError";
/**
* Negative action that can be tolerated only sometimes
* ~10 occurrences will get the peer banned
*/
PeerAction["MidToleranceError"] = "MidToleranceError";
/**
* Some error that can be tolerated multiple times
* ~50 occurrences will get the peer banned
*/
PeerAction["HighToleranceError"] = "HighToleranceError";
})(PeerAction || (PeerAction = {}));
//# sourceMappingURL=interface.js.map