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

Incorrect values for consecutive missed blocks #8211

Closed
Tracked by #7210
bobanm opened this issue Mar 2, 2023 · 1 comment
Closed
Tracked by #7210

Incorrect values for consecutive missed blocks #8211

bobanm opened this issue Mar 2, 2023 · 1 comment
Assignees
Milestone

Comments

@bobanm
Copy link
Contributor

bobanm commented Mar 2, 2023

Steps to reproduce

  1. Start pos-mainchain example app on node1 with default config.
  2. Start pos-mainchain example app on node2 without generator.keys config property.
  3. Enable a new generator on node2 and wait until it produces a block.
  4. Stop node1, so that the newly created generator on node2 is the only block producer that is online.
  5. Let node2 running for a while, so that the newly created generator generates several consecutive blocks.
  6. Invoke pos_getAllValidators and check if some validators have consecutiveMissedBlocks: 0

Expected behavior

By now, every validator from the initial validator pool [those having their name starting with genesis_] should have 1 or more consecutive missed blocks. Only the new validator on node2 should have 0 consecutive missed blocks.

Actual behavior

For several validators the value for consecutiveMissedBlocks is still 0. The other values are also possibly incorrect.

Check the attached file provided by pos_getAllValidators endpoint.

pos_getAllValidators.txt

@bobanm bobanm self-assigned this Mar 9, 2023
@Madhulearn Madhulearn modified the milestones: Sprint 90, Sprint 91 Mar 12, 2023
@bobanm
Copy link
Contributor Author

bobanm commented Mar 16, 2023

The system is working as intended.

The investigation showed that those validators that had consecutiveMissedBlocks === 0 and lastGeneratedHeight > 0 were the ones that have already been removed from the initValidators pool before their node was stopped.

During the period their node was offline, the system never assigned a slot to them. That is why their consecutiveMissedBlocks value remained at 0, while that value for other validators on that node started increasing while the node was offline.

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

2 participants