-
Notifications
You must be signed in to change notification settings - Fork 204
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
added checks on proofs parameters like epoch, nonce and shard #6698
base: equivalent-proofs-feat-stabilization
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -430,6 +430,18 @@ func (mp *metaProcessor) checkProofsForShardData(header *block.MetaBlock) error | |
if !mp.proofsPool.HasProof(shardData.ShardID, shardData.HeaderHash) { | ||
return fmt.Errorf("%w for header hash %s", process.ErrMissingHeaderProof, hex.EncodeToString(shardData.HeaderHash)) | ||
} | ||
|
||
prevProof := shardData.GetPreviousProof() | ||
headersPool := mp.dataPool.Headers() | ||
prevHeader, err := headersPool.GetHeaderByHash(prevProof.GetHeaderHash()) | ||
Comment on lines
430
to
+436
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here we check if there is shardData.HeaderHash proof in pool, and then we check proof fields on previousProof, is this ok? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, the proof from pool should have already been validated |
||
if err != nil { | ||
return err | ||
} | ||
|
||
err = mp.verifyProofAgainstHeader(prevProof, prevHeader) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
|
||
return nil | ||
|
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.
check for round here also