-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State Manager and initial miner retrieval methods #224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few small nits and qs
@@ -233,6 +239,12 @@ impl<'a> Syncer<'a> { | |||
// see https://github.com/filecoin-project/lotus/blob/master/chain/sync.go#L611 | |||
header.check_block_signature(header.miner_address())?; | |||
|
|||
// TODO: incomplete, still need to retrieve power in order to ensure ticket is the winner | |||
let _slash = self.state_manager.miner_slashed(header.miner_address())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we check this? Can't correlate with spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under Semantical Validation: must be from a valid miner, i.e. has not been slashed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't appear in the current spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec uses the term 'plausible miner' which to me is the equivalent to 'valid miner' the term given in the link I posted above which uses slashing as an example of what makes a 'valid miner', and in lotus, it's being used for their block validation. I am happy to remove but I want to make sure I provide relevant information as to why I included it.
Summary of changes
Changes introduced in this pull request:
StateManager
and retrieval methods for state objectsStorageMinerActor
,MinerInfo
andStorageMinerActorState
structures used to retrieve data about minersslashed_at
andminer_sector_size
to block validation methodReference issue to close (if applicable)
It does not close any particular task although it pushes #78 forward.
Other information and links
Block validation will remain incomplete until we implement missing VM components required to retrieve storage power, get a raw miner worker address and can validate miner.