Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Allow Truffle to publish source+metadata information to Sourcify #1118

Open
gnidan opened this issue Jul 18, 2018 · 16 comments
Open

Allow Truffle to publish source+metadata information to Sourcify #1118

gnidan opened this issue Jul 18, 2018 · 16 comments
Labels
enhancement needs requirements feature request is unclear

Comments

@gnidan
Copy link
Contributor

gnidan commented Jul 18, 2018

solc terminates all bytecode output with a CBOR-encoded hash of the metadata, intended for use in contract verification (ref: documentation). Provided a commonly-used repository containing public contract metadata, wallet software should be able to perform contract verification natively, without relying on (or in addition to) centralized services such as Etherscan.

Truffle should likely:

  • Allow outputting solc's native metadata format as an artifact of compilation
  • Add a new configuration parameter, to enable users to specify a repository for uploading these metadata files
  • Add a command, or update the publish command, to publish these metadata files to the specified repository.

With this in place, wallet software can start downloading these metadata files from a given repository and perform contract verification at transaction-time.

Probably lots of unknowns here to investigate, such as IPFS support (since solc currently only outputs the Swarm hash).

This comes out of a discussion with @chriseth. cc @danfinlay.

@stale
Copy link

stale bot commented Nov 8, 2018

Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.

@stale stale bot added the stale label Nov 8, 2018
@stale
Copy link

stale bot commented Nov 15, 2018

There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed. If you'd like help with this or a different problem, please open a new issue. Thanks!

@stale stale bot closed this as completed Nov 15, 2018
@chriseth
Copy link
Contributor

Would be really great to have this...

@gnidan gnidan reopened this Nov 21, 2018
@stale
Copy link

stale bot commented Nov 21, 2018

Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can.

@stale stale bot removed the stale label Nov 21, 2018
@gnidan
Copy link
Contributor Author

gnidan commented Nov 21, 2018

You're right, @chriseth :)

@gnidan
Copy link
Contributor Author

gnidan commented Jan 16, 2019

Just cause @Stale's gonna come in here soon and tell us this is stale. It's not. We should still do this.

@stale
Copy link

stale bot commented May 16, 2019

Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.

@stale stale bot added the stale label May 16, 2019
@chriseth
Copy link
Contributor

Oh, I just discussed with again with @eggplantzzz - didn't even remember we already had this issue here :)

@stale
Copy link

stale bot commented May 16, 2019

Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can.

@stale stale bot removed the stale label May 16, 2019
@gnidan
Copy link
Contributor Author

gnidan commented May 16, 2019

stalebot!!!!

@snario
Copy link

snario commented Aug 19, 2019

+1

@gnidan
Copy link
Contributor Author

gnidan commented Dec 4, 2019

PRs welcome on this!

@rkalis
Copy link
Contributor

rkalis commented Oct 27, 2020

It sounds like bullet point one is satisfied by #1856. Point two and three sound like they'd be better suited for a Truffle plugin to be honest.

The example plugin for truffle-plugin-store that I created for Truffle University last year seems like it could be extended by someone in order to store metadata in a dedicated repository.

@haltman-at
Copy link
Contributor

@gnidan Is there more work to be done here, or does @rkalis have the right of it?

@chriseth
Copy link
Contributor

In my opinion, the best action would be to publish the metadata on ipfs, so it can be picked up by the sourcify monitor or whoever wants to. Then we could have instant source verification without any action required on the deployer's part.

@gnidan gnidan changed the title Feature: support Solidity metadata Allow Truffle to publish source+metadata information to Sourcify Dec 9, 2020
@gnidan
Copy link
Contributor Author

gnidan commented Dec 9, 2020

I believe the next step for this would be to integrate this workflow into Truffle's upcoming truffle preserve command. Moving this to our icebox to revisit in a couple months when the infrastructure is in place.

Thanks for continuing to champion this effort, @chriseth 🙇

@gnidan gnidan removed the help wanted label Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement needs requirements feature request is unclear
Projects
None yet
Development

No branches or pull requests

5 participants