Commit 26d5d6b4 authored by Adrian Sutton's avatar Adrian Sutton

op-node: Soften app score weights.

parent 7d559f77
...@@ -33,16 +33,24 @@ func LightApplicationScoreParams(cfg *rollup.Config) ApplicationScoreParams { ...@@ -33,16 +33,24 @@ func LightApplicationScoreParams(cfg *rollup.Config) ApplicationScoreParams {
epoch := 6 * slot epoch := 6 * slot
tenEpochs := 10 * epoch tenEpochs := 10 * epoch
return ApplicationScoreParams{ return ApplicationScoreParams{
ValidResponseCap: 10, // Max positive score from valid responses: 5
ValidResponseWeight: 1, ValidResponseCap: 10,
ValidResponseDecay: ScoreDecay(tenEpochs, slot), ValidResponseWeight: 0.5,
ErrorResponseCap: 10, ValidResponseDecay: ScoreDecay(tenEpochs, slot),
ErrorResponseWeight: -16,
ErrorResponseDecay: ScoreDecay(tenEpochs, slot), // Takes 20 error responses to reach the default ban threshold of -100
RejectedPayloadCap: 10, // But at most we track 10. These errors include not supporting p2p sync
RejectedPayloadWeight: -50, // so we don't (yet) want to ban a peer based on this measure alone.
ErrorResponseCap: 10,
ErrorResponseWeight: -5,
ErrorResponseDecay: ScoreDecay(tenEpochs, slot),
// Takes 5 rejected payloads to reach the default ban threshold of -100
RejectedPayloadCap: 20,
RejectedPayloadWeight: -20,
RejectedPayloadDecay: ScoreDecay(tenEpochs, slot), RejectedPayloadDecay: ScoreDecay(tenEpochs, slot),
DecayToZero: DecayToZero,
DecayInterval: slot, DecayToZero: DecayToZero,
DecayInterval: slot,
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment