Skip to content

Conversation

@larskuhtz
Copy link
Contributor

[This is work in progress.]

The goal is to replace the current service dates by forks that are voted for by miners, usually by installing the next version of the software. But it would also possible to vote via, say, a command line flag or some other configuration option.

It guarantees continuous operation of the network without the need of regular service releases. It also allows to react in a more agile way to issues and rollout changes on an on-demand basis.

Service date releases are well suited for incremental software improvements that are non-controversial among the the users of the system. Updates that affect economic incentives of the system should be affirmed explicitly by the block producers. This PR introduces such a mechanism.

  • Define fork number and related block validation logic
  • Replace feature flag validation by fork state validation
  • Implement fork for enabling new fork logic
  • Implement logic for activating forks based on fork number in block header

validateForkNumber :: Parent BlockHeader -> BlockHeader -> Bool
validateForkNumber (Parent parent) hdr
| isForkEpoch hdr =
if view getForkNumberVotes parent >= (forkEpochLength * 2 `div 3)
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax error, missing back tick

and is this 3 supposed to be graph diameter? if so we need to get the graph diameter from the blockheader, not hardcode

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the idea here is to allow fork votes to pass given that 2/3 of the blocks vote in favor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the PR proposes that a super-majority is required.

The idea is that a forking changes only triggers when there is already sufficient support for it such the two branches of the network growth at different rates. The forking branch would establish itself is the clear winner, preventing inefficiencies and potential load spikes due to intermittent reorgs.

It probably also is generally a good idea to be conservative. In the "code is law" paradigm of a decentralized blockchain, a forking protocol change is a kind of constitutional change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants