-
Notifications
You must be signed in to change notification settings - Fork 289
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
Feature: 1 second finality #4771
base: dev
Are you sure you want to change the base?
Conversation
|
consensus.GetLogger().Info().Str("waitTime", waitTime.String()). | ||
Msg("[OnCommit] Starting Grace Period") | ||
time.Sleep(waitTime) | ||
|
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.
Instead of using a hard-coded delay of 200 ms, Maybe we can think of implementing a timer with a configurable timeout. This way, the process can use every millisecond effectively. If additional time becomes available, the timer can wait just the necessary amount, ensuring a more efficient use of time and avoiding unnecessary delays.
func (c *ChainConfig) IsRotationEachBlock(epoch *big.Int) bool { | ||
return isForked(c.IsRotationEachBlockEpoch, epoch) | ||
} | ||
|
||
// UpdateEthChainIDByShard update the ethChainID based on shard ID. |
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.
What is RotationEachBlockEpoch ??? do you mean "Leader Rotation at Epoch Block"?
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.
same question here
@@ -724,6 +741,21 @@ func (consensus *Consensus) rotateLeader(epoch *big.Int, defaultKey *bls.PublicK | |||
utils.Logger().Error().Err(err).Msg("Failed to find committee") | |||
return defaultKey | |||
} | |||
|
|||
if bc.Config().IsRotationEachBlock(epoch) { |
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.
why are we doing that now ? or is this a new config rename that was meant for HIP32 ?
* Broadcast epoch block * Broadcast epoch block through node messages * Cleanup * Fix for detecting leader
2659d6b
to
dd4b159
Compare
added 2 params.Config
applied with
commission calculation
1-second epoch finality.