Skip to content

Conversation

@DZariusz
Copy link
Contributor

@DZariusz DZariusz commented Oct 30, 2019

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 propose phase 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_block we 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.

Add option to change duration of the phases inside election.
Restriction is, that total election duration must stay the same.

Propose phase is more time consuming for validators, because data needs to be prepared.
When we will be able to adjust propose/reveal ratio we can make more time for send a proposal.
require(_blocksPerPropose > 0, "_blocksPerPropose can't be empty");
require(_blocksPerReveal > 0, "_blocksPerReveal can't be empty");
require(blocksPerPropose + blocksPerReveal == _blocksPerPropose + _blocksPerReveal, "election duration must be fixed");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might add some additional condition like: can't make longer propose if there is already some reveal... but for now, just to see idea - this PR is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants