ethereum / casper

Casper contract, and related software and tests
The Unlicense
687 stars 175 forks source link

Create `voting_period` and seal off vote data #158

Open djrtwo opened 6 years ago

djrtwo commented 6 years ago

Issue

Note: this update will be paired with a corresponding update to EIP 1011.

There are issues with the assumed one-way independence between votes and normal block transactions. We aim to create a two-way independence between votes and normal block txs to ensure paralellizability of vote txs and to remove the ordering constraint on vote txs (votes will no longer have to be at the end of the block).

We do this by

The new hidden vote related vars will be readable via ENTRY_ADDRESS so that they are still accessible off chain to interested parties such as Validators.

voting_period degrades UX for validator clients due to the requirement of timing non-voting actions to fall not in_voting_period, but this is a necessary trade off to achieve vote parallelization.

Proposed Implementation

in_voting_period() is something like the following:

def in_voting_period() -> bool:
    return block.number % self.EPOCH_LENGTH >= self.VOTE_START_BLOCK
djrtwo commented 6 years ago

This should solve #117