-
Notifications
You must be signed in to change notification settings - Fork 0
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
BEP-341 #30
BEP-341 #30
Conversation
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
func (v Validators) Checkpoint(epoch uint64) uint64 { | ||
return epoch + v.CheckpointValue() | ||
func (v Validators) Checkpoint(turnLength uint8) uint64 { | ||
return uint64(len(v)/2+1) * uint64(turnLength) |
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.
} | ||
num := int(extra[extraVanity]) | ||
if num == 0 || len(extra) <= extraVanity+extraSeal+num*validatorBytesLength { | ||
return nil, fmt.Errorf("invalid validator bytes length: %d", h.Number.Uint64()) | ||
if num == 0 || len(extra) <= extraVanity+extraSeal+num*validatorBytesLength+turnLengthLength { |
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.
turnLength
is located on behind the validator bytes in extra_data
https://github.com/bnb-chain/bsc/blob/00cac12542a112a4767295d948c15d7e31525eaf/consensus/parlia/parlia.go#L383
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-341.md