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

Verifier interface changes + LivepeerVerifier #79

Merged
merged 11 commits into from Sep 28, 2017

Conversation

Projects
None yet
2 participants
@yondonfu
Member

yondonfu commented Sep 28, 2017

  • Added the dataStorageHash parameter to the verify function. This parameter should be content addressable storage hash for segment data used during verification (in the case of Oraclize this would be the IPFS hash). Previously, we were treating dataHash as the storage hash. Now, dataHash is just the keccak256 hash of the segment data.
  • dataHash and transcodedDataHash are now both bytes32 instead of strings
  • The OraclizeVerifier now uses a binary helper (http://docs.oraclize.it/#general-concepts-parsing-helpers) that unhexlifies the result of running a Docker application before submitting the result on-chain in a callback
  • Added a getPrice function to the Verifier interface. The JobsManager checks if a transcoder can pay for the price of verification and forwards the payment to the Verifier contract
  • Added a LivepeerVerifier contract that replicates a lot of the logic in OraclizeVerifier, but we can run an application off-chain to watch for request events, run verification computations ourselves and then submit the results back on-chain
  • Using the MerkleProof library that is now included in OpenZeppelin

@yondonfu yondonfu requested review from dob and ericxtang Sep 28, 2017

string public verificationCodeHash;
uint256 public gasPrice;

This comment has been minimized.

@yondonfu

yondonfu Sep 28, 2017

Member

Since the price of using Oraclize includes the price of the callback, we can set the gas price and gas limit to be used for the callback. Oraclize does not provide refunds if the gas provided is not all used, so it is important to accurately estimate the cost of the callback...We can probably do this and then set the gasLimit and gasPrice to be used in the constructor, but perhaps we want to introduce setters to change the values used over time - less so for gasLimit, more so for gasPrice.

@yondonfu

yondonfu Sep 28, 2017

Member

Since the price of using Oraclize includes the price of the callback, we can set the gas price and gas limit to be used for the callback. Oraclize does not provide refunds if the gas provided is not all used, so it is important to accurately estimate the cost of the callback...We can probably do this and then set the gasLimit and gasPrice to be used in the constructor, but perhaps we want to introduce setters to change the values used over time - less so for gasLimit, more so for gasPrice.

@ericxtang

This comment has been minimized.

Show comment
Hide comment
@ericxtang

ericxtang Sep 28, 2017

Member

Did in-person code review. 🚢

Member

ericxtang commented Sep 28, 2017

Did in-person code review. 🚢

@yondonfu yondonfu merged commit 84a1558 into develop Sep 28, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@yondonfu yondonfu deleted the yf/verifier-additions branch Sep 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment