avoid generating log error on EnsureValidatedBlock / EnsureBlock#3424
Conversation
tsachiherman
left a comment
There was a problem hiding this comment.
Thinking about this over the weekend, I think it would be better to "convert" the ledgercore.ErrNonSequentialBlockEval to ledgercore.BlockInLedgerError in ledger.AddBlock when err != nil and EvaluatorRound <= errNSBE.LatestRound.
The handling for both cases is the same and it would simplify the client code.
tsachiherman
left a comment
There was a problem hiding this comment.
in addition to the above, please also make sure to use distinguishable log messages, so that we could trace these back if/when needed.
… to reported messages.
Codecov Report
@@ Coverage Diff @@
## master #3424 +/- ##
==========================================
+ Coverage 47.65% 47.67% +0.02%
==========================================
Files 370 370
Lines 59804 59808 +4
==========================================
+ Hits 28498 28516 +18
+ Misses 28001 27986 -15
- Partials 3305 3306 +1
Continue to review full report at Codecov.
|
…ock is already in the ledger
* ledger: fix `NextRewardsState()` (#3403) ## Summary A modification of #3336. Added a new test where the rewards pool overspends and proposed a fix in `NextRewardsState()` requiring a consensus upgrade. ## Test Plan This is mostly tests. * Fix a potential problem of committing non-uniform consensus versions (#3453) If accountdb accumulates a large backlog, it is possible catchpoint tracker would attempt to commit a wider range than account updates tracker expects. * avoid generating log error on EnsureValidatedBlock / EnsureBlock (#3424) In EnsureBlock,, do not log as error message if the error is ledgercore.ErrNonSequentialBlockEval and the block round is in the past (i.e. already in the ledger). * Fix typo Fulll to Full (#3456) Fix typo * Fix worng message on restore crash db. (#3455) When crash state is found but could not be restored, noCrashState variable is used to report a warning. However, this variable was set to false in a case where there was no crash state, and the wrong warning was reported. * Adding new scenario for feature networks (#3451) Co-authored-by: Tolik Zinovyev <tolik@algorand.com> Co-authored-by: Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com> Co-authored-by: Shant Karakashian <55754073+algonautshant@users.noreply.github.com>
* ledger: fix `NextRewardsState()` (#3403) ## Summary A modification of #3336. Added a new test where the rewards pool overspends and proposed a fix in `NextRewardsState()` requiring a consensus upgrade. ## Test Plan This is mostly tests. * Fix a potential problem of committing non-uniform consensus versions (#3453) If accountdb accumulates a large backlog, it is possible catchpoint tracker would attempt to commit a wider range than account updates tracker expects. * avoid generating log error on EnsureValidatedBlock / EnsureBlock (#3424) In EnsureBlock,, do not log as error message if the error is ledgercore.ErrNonSequentialBlockEval and the block round is in the past (i.e. already in the ledger). * Fix typo Fulll to Full (#3456) Fix typo * Fix worng message on restore crash db. (#3455) When crash state is found but could not be restored, noCrashState variable is used to report a warning. However, this variable was set to false in a case where there was no crash state, and the wrong warning was reported. * Adding new scenario for feature networks (#3451) * Fixing telemetry ports (#3497) Co-authored-by: Tolik Zinovyev <tolik@algorand.com> Co-authored-by: Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com> Co-authored-by: Shant Karakashian <55754073+algonautshant@users.noreply.github.com> Co-authored-by: Jack <87339414+algojack@users.noreply.github.com>
In EnsureBlock,, do not log as error message if the error is
ledgercore.ErrNonSequentialBlockEvaland the block round is in the past (i.e. already in the ledger).Added a test to verify the behavior.
Resolves https://github.com/algorand/go-algorand-internal/issues/1831