Prevote nil if proposal is not timely (#7415)

* Prevote nil if not timely

* William's suggestion to get the proposal from the proposer instead of
generating it.

* Don't check rhs for genesis block

* Update IsTimely to match the specification

* Fix proposal tests

* Add more timely tests and check votes

* Mark proposal invalid in SetProposal, fix in the future test

* save proposal time on roundstate

* received -> receive

* always reset proposal time

* Add IsTimely test for genesis proposal

* Check timely before ValidateBlock

* Review comments from Daniel

Co-authored-by: William Banfield <wbanfield@gmail.com>
This commit is contained in:
Anca Zamfir
2022-01-14 19:50:36 -05:00
committed by William Banfield
co-authored by William Banfield
parent 9e56a95473
commit 8eec8447e8
7 changed files with 209 additions and 71 deletions
+2 -2
View File
@@ -572,8 +572,8 @@ var testGenesisFmt = `{
"time_iota_ms": "10"
},
"timing": {
"message_delay": "200",
"precision": "50"
"message_delay": "500000000",
"precision": "10000000"
},
"evidence": {
"max_age_num_blocks": "100000",