-
Notifications
You must be signed in to change notification settings - Fork 446
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
Fix forks in AuRa #4679
Merged
Merged
Fix forks in AuRa #4679
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmederosalvarado
force-pushed
the
gnosis/aura-forks-fix
branch
from
September 30, 2022 13:36
40643be
to
4b7902c
Compare
LukaszRozmej
reviewed
Oct 5, 2022
src/Nethermind/Nethermind.Consensus.AuRa/Validators/ContractBasedValidator.cs
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus.AuRa/Validators/ContractBasedValidator.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus.AuRa/Validators/ContractBasedValidator.cs
Show resolved
Hide resolved
Are we progressing with this? |
jmederosalvarado
force-pushed
the
gnosis/aura-forks-fix
branch
from
October 26, 2022 19:33
76a14f9
to
36bada2
Compare
jmederosalvarado
force-pushed
the
gnosis/aura-forks-fix
branch
from
December 12, 2022 14:04
36bada2
to
5e379e1
Compare
LukaszRozmej
approved these changes
Dec 23, 2022
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.
As log as it was tested on FullSyncs and Validator nodes it looks fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the changes
Most changes are refactors that I think improve the readability of the code. The main functional change is in the way we decide whether to call the validator contract
finalizeChange
function at the beginning of the block processing, this now no longer depends on some in-memory state being initialized having to be kept from the processing of blockn
to the processing of blockn+1
. Additionally, we are no longer using theAreFinalized
field inPendingValidators
, we keep it only for backward compatibility with existing databases. The code could probably be further improved to be more robust, especially when handling reorgs, however, since reorgs have not caused any issues so far, and it seems unlikely that they do so because of the way AuRa works, we can ignore this and keep the changes as simple as possible for now.Changes:
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyTesting
Requires testing
In case you checked yes, did you write tests??
Comments about testing
https://github.com/NethermindEth/nethermind/actions/runs/3676586440/jobs/6217421303
https://github.com/NethermindEth/nethermind/actions/runs/3676588263/jobs/6217425320