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

Invalid proofs #15

Merged
merged 4 commits into from
Sep 27, 2018
Merged

Invalid proofs #15

merged 4 commits into from
Sep 27, 2018

Conversation

lorenzb
Copy link
Owner

@lorenzb lorenzb commented Aug 24, 2018

This pull requests depends on #14

It currently implements the first part of #9, i.e. reverting on invalid proofs.

@lorenzb
Copy link
Owner Author

lorenzb commented Aug 24, 2018

I also added some manual tests (see #11)

@lorenzb lorenzb force-pushed the invalid_proofs branch 2 times, most recently from bc97cb3 to f65ec95 Compare August 29, 2018 11:18
@lorenzb lorenzb changed the base branch from specification to master August 29, 2018 11:19
@lorenzb
Copy link
Owner Author

lorenzb commented Sep 25, 2018

Let's get this merged for now and address the remaining parts of #9 and #11 in later PRs.

@@ -190,26 +186,19 @@ contract ProvethVerifier {
bytes32 blockHash,
bytes proofBlob
) internal returns (uint8 result, uint256 index, Transaction memory t) {
result = TX_PROOF_RESULT_INVALID;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why you're getting rid of this? I generally favor descriptive names to returning an integer, but it's probably fine either way

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got rid of TX_PROOF_RESULT_INVALID, since we now revert on invalid proofs.
But I could probably kick out

result = 0;
index = 0;

since that's the default anyways.

@relyt29
Copy link
Collaborator

relyt29 commented Sep 27, 2018

Okay, reviewed code and ran tests everything seems good to me to merge.

@relyt29 relyt29 merged commit d113927 into master Sep 27, 2018
@relyt29 relyt29 deleted the invalid_proofs branch September 27, 2018 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants