-
Notifications
You must be signed in to change notification settings - Fork 291
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
Consensus extra commit logic to avoid waiting for 100% sigs #4095
base: main
Are you sure you want to change the base?
Conversation
@@ -166,6 +167,7 @@ type BlockChain struct { | |||
futureBlocks *lru.Cache // future blocks are blocks added for later processing | |||
shardStateCache *lru.Cache | |||
lastCommitsCache *lru.Cache | |||
extraCommitsCache *lru.Cache |
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.
Does the memory impact of this additional cache need to be assessed ?
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.
It's a 10 slot cache, which will be close to nothing to store 10 signatures. So not a concern. But good to check.
This PR implement the extra commit signature logic which allow leaders to only wait for 2/3 of the commit signature in current block and include the rest of the signatures (extra commit sig) in next block. Specifically, following changes will take effect after the extra commit fork epoch:
Fully tested this change on local network and was able to see extra commit signature being signed and accepted, crosslinks constructed/accepted and block rewards distributed correctly.