Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
26d5d6b4
Unverified
Commit
26d5d6b4
authored
Jun 20, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: Soften app score weights.
parent
7d559f77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
app_params.go
op-node/p2p/app_params.go
+18
-10
No files found.
op-node/p2p/app_params.go
View file @
26d5d6b4
...
@@ -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
,
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment