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 #5278

Closed
shuse2 opened this issue May 4, 2020 · 0 comments
Closed

Create BlockProcessorV0 which handles the genesis block #5278

shuse2 opened this issue May 4, 2020 · 0 comments
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented May 4, 2020

Description

Add block processor v0 to process genesis block by implementing below steps according to the LIP:

  • Validate step
    • header.generatorPublicKey must be empty
    • header.reward must be zero
    • header.signature must be empty
    • header.asset.initDelegates must be array of account addresses
    • Those account must exists in header.asset.accounts and must be a delegate
    • The list should have minimum 1 element
    • The list should have maximum ROUND_LENGTH (active + standby delegates) elements
    • header.asset.initRounds should be minimum 3
    • Genesis block should be considered as zero round, direct child of this genesis block must be first block of a round
  • Apply step
    • Save accounts
    • Save initDelegates

Motivation

New genesis block needs to be processed differently from other blocks.

Acceptance Criteria

  • Add unit test for the validation and apply

Additional Information

Related issues: #5234

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants