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

[FlowContractAudits] Adding Hashed Vouchers #273

Merged
merged 1 commit into from
Jan 27, 2022
Merged

Conversation

nvdtf
Copy link
Member

@nvdtf nvdtf commented Jan 26, 2022

addVoucher takes in the full contract code. Having the full contract code on the audit transaction is a feature because the developer can always compare the audited code with the deployment to fix any inconsistencies. This PR makes a second addVoucherHashed function that accepts the hashed source code instead. This can be desirable in two ways:

  • Since contract audits happen before the actual deployment, information can be leaked about upcoming contracts when the audit voucher is generated. This enables the auditor to optionally make a "private" audit that doesn't disclose the source code before deployment.
  • If a contract is too large (larger than 1.5 MB transaction size) it might be deployed to an account with intermediate storage usage. The auditor would have to use the same technique to generate the voucher which can be cumbersome. This PR addresses this case.

@nvdtf nvdtf requested a review from joshuahannan as a code owner January 26, 2022 23:15
@nvdtf nvdtf requested a review from janezpodhostnik January 26, 2022 23:15
Copy link
Member

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

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

Looks good!

@nvdtf nvdtf merged commit d123d87 into master Jan 27, 2022
@nvdtf nvdtf deleted the navid/add-hashed-vouchers branch January 27, 2022 17:11
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.

3 participants