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

Create BlockProcessorV0 which handles the genesis block - Closes #5278 #5457

Merged
merged 28 commits into from
Jun 24, 2020

Conversation

nazarhussain
Copy link
Contributor

What was the problem?

This PR resolves #5278

How was it solved?

Created new block processor for version zero.

How was it tested?

  • All unit tests should pass
  • The application should be able to start with new genesis block

@nazarhussain nazarhussain changed the base branch from feature/new-genesis-integration to development June 22, 2020 17:02
@nazarhussain nazarhussain changed the base branch from development to feature/new-genesis-integration June 22, 2020 17:03
@nazarhussain nazarhussain requested review from shuse2 and ManuGowda June 22, 2020 20:30
@nazarhussain
Copy link
Contributor Author

@shuse2 @ManuGowda Please review the PR, meanwhile I will fix the tests.

Copy link
Collaborator

@shuse2 shuse2 left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor thing

framework/src/application/node/block_processor_v0.ts Outdated Show resolved Hide resolved
@@ -123,7 +123,14 @@ export const validateGenesisBlock = (
accountAddresses.push(account.address);
totalBalance += BigInt(account.balance);

if (account.asset.delegate.username !== '') {
// TODO: Find better way to specify generic type to make delgate asset required
Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree, this should be more generic and ideally genesis block shouldn't know about the asset field

Copy link
Contributor

@ManuGowda ManuGowda left a comment

Choose a reason for hiding this comment

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

LGTM, minor comments

elements/lisk-chain/src/chain.ts Show resolved Hide resolved
elements/lisk-dpos/src/dpos.ts Outdated Show resolved Hide resolved
framework/src/application/node/block_processor_v0.ts Outdated Show resolved Hide resolved
framework/src/application/node/block_processor_v0.ts Outdated Show resolved Hide resolved
framework/src/application/node/block_processor_v0.ts Outdated Show resolved Hide resolved
framework/src/application/node/synchronizer/utils.ts Outdated Show resolved Hide resolved
@nazarhussain nazarhussain requested review from ManuGowda and shuse2 June 23, 2020 22:42
Copy link
Collaborator

@shuse2 shuse2 left a comment

Choose a reason for hiding this comment

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

LGTM, just one minor point regards to the genesis block processing

framework/src/application/node/block_processor_v0.ts Outdated Show resolved Hide resolved
@nazarhussain nazarhussain requested a review from shuse2 June 24, 2020 08:12
@shuse2 shuse2 merged commit 580080b into feature/new-genesis-integration Jun 24, 2020
@shuse2 shuse2 deleted the 5278-genesis-block-processor branch June 24, 2020 09:22
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.

4 participants