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 vol. 2 #13

Open
sdaveas opened this issue Mar 1, 2020 · 3 comments
Open

Provide regression tests for submitting contesting proofs vol. 2 #13

sdaveas opened this issue Mar 1, 2020 · 3 comments
Labels
Python Label issues that are relevant to python Test Label issues that are relevant to new functionality testing Todo Label things that are need to be implemented

Comments

@sdaveas
Copy link
Owner

sdaveas commented Mar 1, 2020

Issue #9 did some high level testing but there are more some case to be addressed.
This will close #2 as well

Check if nipopowContract.sol works correctly under in the following cases:

  1. The interlinks are invalid
    1. Inclusion fail (wrong Merkle Tree) (see Provide regression tests for submitting contesting proofs vol. 2 #13 (comment))
    2. Block(s) indicated by some interlink at some level is missing (see Provide regression tests for submitting contesting proofs vol. 2 #13 (comment))
    3. Leaf of Merkle Tree does not point to the previous block
  2. Proof succeeds at all cases regarding different μ s
    1. μ1 = μ2
    2. μ1 < μ2
    3. μ1 > μ2
  3. Chain does not start from genesis (see Provide regression tests for submitting contesting proofs vol. 2 #13 (comment))
  4. Less collateral than needed is provided (see (Provide regression tests for submitting contesting proofs vol. 2 #13 (comment)))
  5. Check if each block has the difficulty of genesis target
    1. Contract should fail calling submit with insufficient funds
    2. Refund collateral to honest caller
@sdaveas sdaveas added Python Label issues that are relevant to python Test Label issues that are relevant to new functionality testing Todo Label things that are need to be implemented labels Mar 1, 2020
@sdaveas sdaveas added this to the NiPoPow Verifier milestone Mar 1, 2020
@sdaveas
Copy link
Owner Author

sdaveas commented Mar 3, 2020

Case 3 fails. Contract needs to know hash of the genesis block. We have to provide that upon instantiation of is there any way to avoid that? Client should be able use the contract for different blockchains as well.

@sdaveas
Copy link
Owner Author

sdaveas commented Mar 4, 2020

Case 1i and 1ii works, see 32aa848

@sdaveas
Copy link
Owner Author

sdaveas commented Mar 4, 2020

Case 4 works, see 837069a

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 Todo Label things that are need to be implemented
Projects
None yet
Development

No branches or pull requests

1 participant