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

Implement verifyBlockForger in Dpos module #4144

Closed
lsilvs opened this issue Aug 26, 2019 · 2 comments
Closed

Implement verifyBlockForger in Dpos module #4144

lsilvs opened this issue Aug 26, 2019 · 2 comments
Assignees
Milestone

Comments

@lsilvs
Copy link
Contributor

lsilvs commented Aug 26, 2019

Description

Dpos module should expose a method to validate if a given block was forged by the expected delegate.

Motivation

As Dpos module is replacing Rounds module, this method is required to replace round. validateBlockSlot and round.validateBlockSlotAgainstPreviousRound

Acceptance Criteria

The new method should validate if a block was forged by the expected delegate for any given block that was not finalized yet.

Additional Information

feature/bft

@michielmulders
Copy link
Contributor

michielmulders commented Aug 26, 2019

Before finalizedheight, we don't have the delegate list anymore. We only store up to finalizedheight. (Check first if block height is between last finalized and current block - first simple check -> If not, throw this block is older than the last finalized height and cannot be validated and then the full check.)

Note: Combine both methods into one!

@michielmulders michielmulders self-assigned this Aug 26, 2019
@shuse2
Copy link
Collaborator

shuse2 commented Aug 26, 2019

@michielmulders I think dpos doesn't know anything about finalized (it is property of bft), im not sure how to check or when we need to check.
I think it make more sense to check if the checking round exists, and if not just throw an error?

@shuse2 shuse2 added this to the Sprint 5 milestone Aug 26, 2019
@lsilvs lsilvs changed the title Implement validateBlockSlot in Dpos module Implement verifyBlockForger in Dpos module Aug 27, 2019
shuse2 added a commit that referenced this issue Aug 27, 2019
@shuse2 shuse2 closed this as completed Aug 27, 2019
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

3 participants