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

Fix random seed calculation for a delegate when using previous block headers #6516

Closed
ManuGowda opened this issue Jul 1, 2021 · 0 comments
Closed
Assignees
Milestone

Comments

@ManuGowda
Copy link
Contributor

Expected behavior

Should return header for a delegate if random seed exists, if the random seed does not exists it should return undefined.

Actual behavior

With the genesis block height != 0, when selecting a random seed, it tries to look too much in the past (ie: height lower than genesis block) and fail

Steps to reproduce

  • Enable debug logs
  • Start Lisk Core 3.0.0-rc.0 node and sync with network
  • During the synchronization observe the following error
18:28:15 INFO lisk-framework: Synchronization finished. (module=lisk:app)
{
 "lastBlockHeight": 14075361,
 "lastBlockID": "366ab5417d71dcba580952d218b18645e60771b68ae17934a63d039bd2a2d88d",
 "mechanism": "BlockSynchronizationMechanism"
}
18:28:15 WARN lisk-framework: Received invalid event message (module=lisk:app)
Message: Cannot read property 'generatorPublicKey' of undefined
 Trace: TypeError: Cannot read property 'generatorPublicKey' of undefined
    at findPreviousHeaderOfDelegate (/home/lisk/lisk-core/node_modules/lisk-framework/dist-node/modules/dpos/random_seed.js:33:27)

Which version(s) does this affect? (Environment, OS, etc...)

Lisk SDK 5.0.5, Lisk Core 3.0.0-rc.0

@sridharmeganathan sridharmeganathan added this to the Sprint 47 milestone Jul 1, 2021
@ManuGowda ManuGowda changed the title Fix random seed for a delegate in the previous block headers Fix random seed calculation for a delegate using previous block headers Jul 1, 2021
@ManuGowda ManuGowda changed the title Fix random seed calculation for a delegate using previous block headers Fix random seed calculation for a delegate when using previous block headers Jul 1, 2021
shuse2 added a commit that referenced this issue Jul 1, 2021
@shuse2 shuse2 closed this as completed Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants