Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add genesis block and bootstrap handling for dpos and bft - Closes #5281 and #5282 #5469

Merged
merged 5 commits into from
Jun 29, 2020

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Jun 25, 2020

What was the problem?

This PR resolves #5281 and resolves #5282

Main changes are

How was it solved?

  • Update dpos to calculate bootstrap period
  • Update dpos to handle genesis block
  • Update dpos not to calculate forgerslist while bootstrap period
  • Update minActiveHeight to return lastBootstrapHeight + 1 the result is lower
  • Update bft not to calculate properties during bootstrap period

How was it tested?

  • Update all the test
  • Connect to core and run fresh application

@shuse2 shuse2 requested review from nazarhussain and janhack June 25, 2020 17:04
@shuse2 shuse2 self-assigned this Jun 25, 2020
elements/lisk-dpos/src/constants.ts Outdated Show resolved Hide resolved
elements/lisk-dpos/src/dpos.ts Outdated Show resolved Hide resolved
elements/lisk-dpos/src/dpos.ts Outdated Show resolved Hide resolved
elements/lisk-dpos/src/dpos.ts Outdated Show resolved Hide resolved
@@ -84,6 +90,8 @@ export class Dpos {
this.delegateActiveRoundLimit = 3;
this.chain = chain;
this.rounds = new Rounds({
genesisHeight,
initRound,
blocksPerRound: this._delegatesPerRound,
Copy link
Contributor

Choose a reason for hiding this comment

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

I notice or used somewhere else as roundLength we should be consistent. If required can create an issue to make these consistent.

elements/lisk-dpos/src/rounds.ts Show resolved Hide resolved
…bft to initialize finalized height with genesis height
@shuse2 shuse2 requested review from nazarhussain and janhack June 26, 2020 15:27
Copy link

@janhack janhack left a comment

Choose a reason for hiding this comment

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

Looks good to me now.

@shuse2 shuse2 requested a review from nazarhussain June 29, 2020 07:35
@shuse2 shuse2 merged commit b9c3d7d into development Jun 29, 2020
@shuse2 shuse2 deleted the 5281-update_dpos_bft_genesis_handling branch June 29, 2020 07:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update lisk-bft to handle bootstrap period Update lisk-dpos to handle bootstrap period
3 participants