feat(*): flexible duration of election phases #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add option to change duration of the phases inside election.
Restriction is, that total election duration must stay the same.
Currently we have even phase duration - but this is only in theory.
In reality we spending 2 block of
proposephase waiting for confirmation, then we spend time to prepare data. All this make propose phase much shorter for validator.Having option to change ratio of propose/reveal makes event chances for both transactions to be mined on time.
My recommendation will be 13/7 or 14/6.
Another speed improvement will be to do small change into validator: instead start reveal on
reveal_start_blockwe can send tx on previous block, because if it be mined in next block it will be first reveal block - this will give us additional time for reveal, so with 14/6 ration we will have full 6 blocks when we start revealing on last propose block.