Skip to content
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

PoET validation #781

Merged
merged 5 commits into from Apr 4, 2019

Conversation

Projects
None yet
2 participants
@moshababo
Copy link
Contributor

moshababo commented Apr 4, 2019

  • Upgraded poet-ref & merkle-tree.
  • Added validations for membership, poet, poetMembership to be used now in the NIPST constructions, and later in other places as well.

moshababo added some commits Apr 4, 2019

@moshababo moshababo requested a review from antonlerner Apr 4, 2019

@@ -142,32 +184,17 @@ func (c *RPCPoetClient) subscribeProof(r *poetRound,
return nil, err
}

labels, err := wireLabelsToNative(res.Proof.L)
labels, err := rpc.WireLabelsToNative(res.Proof.L)
if err != nil {
return nil, err

This comment has been minimized.

Copy link
@antonlerner

antonlerner Apr 4, 2019

Member

print error here as well

@@ -115,7 +150,7 @@ func (c *RPCPoetClient) subscribeMembershipProof(r *poetRound,
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()

req := api.GetMembershipProofRequest{RoundId: int32(r.id), Commitment: challenge[:], Wait: true}
req := api.GetMembershipProofRequest{RoundId: int32(r.id), Challenge: challenge[:], Wait: true}
res, err := c.client.GetMembershipProof(ctx, &req)
if err != nil {

This comment has been minimized.

Copy link
@antonlerner

antonlerner Apr 4, 2019

Member

log errors here

}

res, err := v.VerifyNIP(*p.proof)
if err != nil {

This comment has been minimized.

Copy link
@antonlerner

antonlerner Apr 4, 2019

Member

log error

func (p *poetProof) valid() bool {
// TODO(moshababo): implement
return true
if err != nil {

This comment has been minimized.

Copy link
@antonlerner

if !nb.verifyPoetMembership(nb.nipst.poetMembershipProof, proof) {
nb.errChan <- fmt.Errorf("received an invalid PoET proof due to "+
"commitment value, found: %x, expected: %x",

This comment has been minimized.

Copy link
@antonlerner

antonlerner Apr 4, 2019

Member

log as well

@antonlerner
Copy link
Member

antonlerner left a comment

please log errors and merge

@moshababo moshababo merged commit 2ae176e into develop Apr 4, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@moshababo moshababo deleted the verify_poet branch Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.