Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
9 stars 0 forks source link

Validators ignore blocks less than their current view #1400

Open JamesHinshelwood opened 1 month ago

JamesHinshelwood commented 1 month ago

Currently, if a validator times out and increments self.view it will then ignore any block proposals received which are before self.view. It is correct that we shouldn't try to vote on proposals which are before our self.view, but we should still store them in case the rest of the network chooses that block as the canonical chain. We can maintain a condition of ignoring proposals if they are less than self.finalised_view, since these are blocks which are definitely not canonical.

rrw-zilliqa commented 2 weeks ago

A natural way of doing this is to keep them in block_store's (upcoming!) block response cache, where all the other blocks which we don't recognise (yet) as being canonical sit.

86667 commented 1 day ago

Turns out that this issue fixes itself by re-requesting blocks which were previously rejected due to having views less than current.

@rrw-zilliqa's PR adding a block_cache provides a mechanism to resolve this inefficiency. I will pick this up again once it has been merged.