-
Notifications
You must be signed in to change notification settings - Fork 110
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
Author a sibling block in case best block's slot is same as current slot #2726
Author a sibling block in case best block's slot is same as current slot #2726
Conversation
the current slot, we should author a new block as child of best block's parent. This would create forks in the chain which would get resolved eventually.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #2726 +/- ##
===============================================
+ Coverage 62.88% 63.01% +0.13%
===============================================
Files 213 213
Lines 27021 27097 +76
===============================================
+ Hits 16992 17076 +84
+ Misses 8476 8464 -12
- Partials 1553 1557 +4 |
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.
LGTM! Is it possible to check in the import block routine if the block we are currently importing contains a greater slot than our next authoring slot? For example, if gossamer imports block X
with contains slot 10
but our next authoring slot is 8
so X
should wait until we reach that or a great slot
@EclesioMeloJunior, what do you mean when you say X should wait? Do you mean we should not import block X?
I think in this scenario, we should just author blocks regularly. We author for slot 8 even though we received a block with slot 10. It is problematic only if in a chain (without forks, so not a tree), slots of all block should be increasing. You could author a block for slot 8 and create a fork. |
that we are claiming at the moment
I was facing problems with tests. Seeing a lot of
noot mentioned that this could be because of a race condition. Below logs might help https://gist.github.com/kishansagathiya/d64d70dc48bbde60c7ceb3813a4a266c |
Key crypto.PublicKey | ||
Key crypto.PublicKey | ||
// Weight exists for potential improvements in the protocol and could | ||
// have a use-case in the future. In polkadot all authorities have the weight = 1. |
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.
👍
Changes
Tests
go test -tags integration github.com/ChainSafe/gossamer
Issues
Fixes #2636
Primary Reviewer
@timwu20