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

Determine whether the hash of the contract should include the compilation report #294

Closed
bvavala opened this issue Aug 1, 2020 · 2 comments

Comments

@bvavala
Copy link
Member

bvavala commented Aug 1, 2020

The hash of the contract code (see here) currently includes the compilation report.
From the conversation here, it is not clear that this adds any benefit. The reason is that the compilation report carries a signature of the contract code, and it is therefore already bound to the contract code itself.

@cmickeyb
Copy link
Contributor

cmickeyb commented Aug 5, 2020

The problem with removing this is that the reverse is not true. Since we record the code hash in the ledger we could not ensure that the compilation report is used. Suggestion: the compilation report contains the hash of the code, but we hash the contract code object and put that information into the ledger. That is... we keep the behavior as defined & rename the fields. This is effectively what we already do since class names and entry points and nonce are already part of the contract code object though they are not strictly part of the code.

The hash referenced in the ledger is the hash over the entire contract code object as defined in the "ContractCode" object here:
https://github.com/hyperledger-labs/private-data-objects/blob/master/eservice/docs/contract.json

We should probably pull that definition out of the request message and make it a basetype so we can reference it in the documentation more clearly.

@cmickeyb
Copy link
Contributor

cmickeyb commented Apr 4, 2023

@marcelamelara do we need this one any more? Its part of the old aot code. We don't have support for compilation reports.

@marcelamelara marcelamelara closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2023
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

No branches or pull requests

3 participants