Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: Add Contract Metadata Standard #330
feat: Add Contract Metadata Standard #330
Changes from all commits
8802cb5
27a855d
89f044c
9617b09
1bd0767
657dd68
4add736
63c3267
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the main use cases of having this standard, is if we are able to reproduce the same binary after we have access to the source code. I'm wondering if as part of it we should add a proposal or advise about how we can achieve byte for byte reproducibility.
Having a standard for reproducibility can be useful for external tools to automatically verify the code.
This is hard in general, mostly because there is more than one stack that can be used to generate the contract binary (i.e today we support rust and assembly script). Relevant discussion on how to make this possible on rust: rust-lang/cargo#9506
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A link to a docker image could be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BenKurrek @austinabell @MaximusHaximus what are your thoughts of adding a system field so we can get some info on what system helped generate the wasm as well. This way we can try to rebuild the wasm and compare the hashes for auditing purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system: "local"|string,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, you would need architecture and toolchain version at least. Would the purpose of this be human-readable so someone could try to replicate it? You would also need some commit or version since the link doesn't specify repo links to commit that it was built with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah ideally i want to be able to reference the source code and source dependencies to help with auditing the contract. Here's what polygon does which is pretty cool: https://polygonscan.com/address/0x217cF04C783818E5b15Ae0723b22Ee2415Ab5fe3#code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was assuming that the toolchain version would be kept in the Github repo. I don't really see the need to add a system field but would love other people's opinions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding some sort of organization contact link as well that points to the website of the application, or the developers; potentially with more contact information!
The difference between it and
link
is that one is to discover the source code, and the other is to discover what is the preferred way to reach developers/community behind this smart contract.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this information could be found by utilizing the
link
since you can open issues or PRs on Github and follow or view the developers' public profiles. The case where I think this might be useful, is if the link is a CID to somewhere on IPFS since you don't have the same ability to reach out or view the developers as you do using Github.thoughts? @austinabell @agileurbanite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually go even further and provide three different fields (similar to crates.io):
Homepage
,Documentation
andRepository
+version
(to pin the exact version and allow reproducing the exact same binary).Some services like npm only have
Homepage
andRepository
. (Maybedocumentation
is a bit too much).