-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ledger: do final validation in endOfBlock()
#3132
ledger: do final validation in endOfBlock()
#3132
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3132 +/- ##
==========================================
- Coverage 43.70% 43.69% -0.01%
==========================================
Files 390 390
Lines 86689 86681 -8
==========================================
- Hits 37887 37879 -8
+ Misses 42780 42777 -3
- Partials 6022 6025 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks pretty good. It does change the semantics of eval.finalValidation
during Eval
, as it would now be performing the signature validation in parallel to the eval.finalValidation
. That being said - I can't find a reason this would cause an issue.
Separately, the eval.state.mods.OptimizeAllocatedMemory
call was intended to be called once we have the state delta changes ready. At their new location, this is not the case, since the eval.resetExpiredOnlineAccountsParticipationKeys
could modify their content.
To resolve that, just move the eval.state.mods.OptimizeAllocatedMemory
right before the if eval.validate
predicate.
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. thanks for the changes.
## Summary 1. It doesn't make sense to calculate new totals in `finalValidation()` 2. `endOfBlock()` already does some validation Moving the content of `finalValidation()` to `endOfBlock()` makes things more reasonable.
Summary
finalValidation()
endOfBlock()
already does some validationMoving the content of
finalValidation()
toendOfBlock()
makes things more reasonable.