Closed sherlock-admin2 closed 4 months ago
these are two totally unrelated variables
in the inference-base case, it's a variable that governs how many times to retry submitting the bundle if you got the nonce wrong (because you fell on an epoch boundary)
in the allora-chain case, it has to do with the number of historical reputations to take into account when starting a reputation loss-generation round
they have nothing to do with each other
invalid because variables are not related
defsec
Medium
Inconsistency between NUM_REPUTER_RETRIES constant and MaxRetriesToFulfilNoncesReputer chain parameter
Summary
The discrepancy between these two values introduces several potential problems:
Vulnerability Detail
There is a discrepancy between the hardcoded constant NUM_REPUTER_RETRIES and the chain parameter MaxRetriesToFulfilNoncesReputer. This inconsistency may lead to confusion and potential issues in the retry logic for reputer operations.
Current state:
This misalignment could result in unexpected behavior, as the code might attempt more retries than the chain parameter suggests is appropriate.
Impact
Code Snippet
appchain.go#L30
params.go#L38
Tool used
Manual Review
Recommendation
To resolve this issue, we recommend the following steps:
Determine the correct number of retries that should be used for reputer operations.
Update either the constant or the chain parameter to ensure consistency: a. If the constant should be authoritative: