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 |
EclesioMeloJunior
left a comment
There was a problem hiding this comment.
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. |
Changes
Tests
go test -tags integration github.com/ChainSafe/gossamerIssues
Fixes #2636
Primary Reviewer
@timwu20