-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: add new fork block and precompile contract for BEP294 and BEP299 #1874
Conversation
44092f8
to
45110b8
Compare
639fe27
to
12214ef
Compare
12214ef
to
1eea774
Compare
consensus/parlia/fusionfork.go
Outdated
sort.SliceStable(validatorHeap, validatorHeap.Less) | ||
} else { | ||
i := 0 | ||
for len(validatorHeap) < int(maxElectedValidators.Int64()) && i < len(allValidators) { |
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 is complicated than I think.
Let's simplify it:
we get allVotingPowers
slice, heap.init()
it, then pop until 1. top maxElectedValidators
, or 2. the heap is empty. Each pop item goes to eligibleValidators
b89b384
to
de2215f
Compare
de2215f
to
5365b22
Compare
e3e7a3d
to
285422e
Compare
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.
gracias
Description
This pr is to support
Rationale
See
4. Motivation
in BEP-294, BEP-299,Changes
Notable changes:
verifyDoubleSignEvidence
andsecp256k1SignatureRecover