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

Provide regression tests for submitting contesting proofs #9

Closed
sdaveas opened this issue Dec 12, 2019 · 1 comment
Closed

Provide regression tests for submitting contesting proofs #9

sdaveas opened this issue Dec 12, 2019 · 1 comment
Labels
Python Label issues that are relevant to python Test Label issues that are relevant to new functionality testing

Comments

@sdaveas
Copy link
Owner

sdaveas commented Dec 12, 2019

Operation from Proof-of-sidechains, Algorithm 1, line 10 is missing from contractNipopow.sol:331

---------+---x1---->  Ca
         |
         +--->        Cb

and

---------+-------->   Ca
         |
         +--x2->      Cb

  • Create chains Ca and Cb which have a common ancestor block
  • Only Ca contains block x1 and only Cb contains x2
  • Execute the following:
    1.|Ca| > |Cb|: Execute submit_event_proof(Ca, x1) and submit_contesting_proof(Cb, x1)
    2.|Ca| > |Cb|: Execute submit_event_proof(Cb, x2) and submit_contesting_proof(Ca, x2)

Update

Pn denotes the proof that was generated for chain Cn

x0 contained in Pa and Pb

---x0---+-------->  Ca
        |
        +--->       Cb
test case expected output reason received output
submit_event_proof(Pa, x0) TRUE x0 in Ca TRUE
submit_contest_proof(Pb, x0) FALSE |Cb| < |Ca|; existing proof is stronger FALSE
--
submit_event_proof(Pb, x0) TRUE x0 in Cb TRUE
submit_contest_proof(Pa, x0) FALSE FALSE

x1 contained in Pa but not in Pb

--------+---x1--->  Ca
        |
        +--->       Cb
test case expected output reason received output
submit_event_proof(Pa, x1) TRUE x1 in Ca TRUE
submit_contest_proof(Pb, x1) FALSE |Cb| < |Ca|; existing proof is stronger FALSE
--
submit_event_proof(Pb, x1) FALSE x1 not in Cb FALSE
submit_contest_proof(Pa, x1) FALSE event x1 is not mapped yet FALSE

x2 contained in Pb but not in Pb

--------+---------->  Ca
        |
        +--x2-->      Cb
test case expected output reason received output
submit_event_proof(Ca, x2) FALSE x2 not in Ca FALSE
submit_contest_proof(Cb, x2) FALSE event x2 is not mapped yet FALSE
--
submit_event_proof(Cb, x2) TRUE x2 in Cb TRUE
submit_contest_proof(Ca, x2) TRUE |Ca| > |Cb| and x2 not in Ca; honest chain does not include 'x2' TRUE
@sdaveas sdaveas changed the title Provide a regression for submitting contesting proofs Provide regression tests for submitting contesting proofs Dec 19, 2019
@sdaveas sdaveas added Python Label issues that are relevant to python Todo Label things that are need to be implemented labels Dec 30, 2019
@sdaveas sdaveas added this to the NiPoPow Verifier milestone Dec 30, 2019
@sdaveas sdaveas added the Test Label issues that are relevant to new functionality testing label Dec 30, 2019
@sdaveas sdaveas assigned sdaveas and unassigned sdaveas Dec 31, 2019
@sdaveas
Copy link
Owner Author

sdaveas commented Jan 4, 2020

It seems that the assignment of proof π is not missing. It is done inside the verify() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python Label issues that are relevant to python Test Label issues that are relevant to new functionality testing
Projects
None yet
Development

No branches or pull requests

1 participant