-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix light client synchronization on master #3301
Changes from 13 commits
9062f94
ce451c3
2efc6a4
d9d75bc
aa491d0
de097ee
4bbebde
2897a83
2c72a87
1c7b2cd
cb2851f
e5c7bd8
a838e9b
200a638
3c420ff
c4c6788
04f73d5
f30f0fb
773982b
c922fad
69fe38a
b5e223e
54fd261
5991212
d24bb0b
51b79fc
651d8ad
8f106ae
b4dd1bd
d593290
a7adc1c
707b288
f1d0e41
515587c
b328acb
4786ea7
e33fd0f
e7644e4
f70bbcc
89447ee
320534d
5bf8db9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -425,7 +425,7 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, PRA, SC> BlockImport<Block> | |
|
|
||
| // we don't want to finalize on `inner.import_block` | ||
| let mut justification = block.justification.take(); | ||
| let enacts_consensus_change = new_cache.contains_key(&well_known_cache_keys::AUTHORITIES); | ||
| let enacts_consensus_change = !new_cache.is_empty(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason I separated the entries into
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will take it into account - please see how But OK - if you do not consider epoch change as consensus change, then let's not emit justification in this case.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but the problem is that the GRANDPA voters currently won't take that into account, and will not limit their votes to such blocks (like they do for authority changes), so we might not get a justification for it (we just finalize a further block for example).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But finalizing further block is OK too - it should just cover block that enacts consensus change. There's currently no such code (iirc) that just stops syncing && waits for exactly that block finalization. We're just trying to get something that finalizes block-that-enacts-consensus-changes asap (by issuing finality proof requests).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only downside I see is that we'll get more justifications. Although the point is kind of moot in general because the GRANDPA authorities will change 99% of the time on the same block as BABE or other ones do. It's unlikely that they'll be out of sync. |
||
| let import_result = (&*self.inner).import_block(block, new_cache); | ||
|
|
||
| let mut imported_aux = { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.