docs icon indicating copy to clipboard operation
docs copied to clipboard

Provide guidance on how to reproduce bytecodes

Open PaulRBerg opened this issue 1 year ago • 7 comments

Third-parties may be interested in reproducing the bytecodes deployed on Mainnet. To assist them, we should provide a wiki or some sort of docs for how to recompile the contracts and passing the appropriate constructor arguments.

More context here:

https://discord.com/channels/883432404780466176/1077650654396428348/1183046520975675462

PaulRBerg avatar Dec 09 '23 16:12 PaulRBerg

This issue is stale because it has been open 182 days with no activity. Leave a comment or remove the "stale" label, otherwise this will be closed in 14 days.

github-actions[bot] avatar Jul 07 '24 03:07 github-actions[bot]

We should keep this open.

PaulRBerg avatar Jul 08 '24 06:07 PaulRBerg

This issue is stale because it has been open 182 days with no activity. Leave a comment or remove the "stale" label, otherwise this will be closed in 14 days.

github-actions[bot] avatar Jan 12 '25 03:01 github-actions[bot]

The Discord link isn't showing the message anymore. May I know what the original ask was? I am curious as to why someone would be interested in "reproducing" the bytecode. If they need to use the bytecode, they can copy it from Etherscan.

smol-ninja avatar Jan 12 '25 06:01 smol-ninja

I would keep this issue open.

It's a low-priority task, but somewhat important for decentralization purposes.

The bytecodes can be copied from Etherscan, but the purpose of reproducing them from a Foundry repo is to enable developers to trustlessly verify that the source code in the repo matches the contracts on Etherscan.

Another way would be to diff-check the verified source code, but this approach is way more time-consuming (because there are many different files to verify).

PaulRBerg avatar Jan 13 '25 11:01 PaulRBerg

I see. Thanks for explaining.

But any experienced developer can verify it even right now. We log all deployment files in the deployments repo which contains all constructor arguments used at the time of deployment. So it's just a matter of printing the bytecode using the Foundry script and comparing it with Etherscan's displayed bytecode.

That said, would it not be more appropriate to provide the guidance in the docs repo?

smol-ninja avatar Jan 13 '25 11:01 smol-ninja

But any experienced developer can verify it even right now

  1. Not all developers are experienced
  2. Even for experienced folks, a little guidance can be helpful, e.g. what Foundry profile and settings to use, etc.

it's just a matter of printing the bytecode using the Foundry script and comparing it with Etherscan's displayed bytecode

This 'matter' is precisely what should be documented.

would it not be more appropriate to provide the guidance in the docs repo?

Yes. I have transferred the issue to the docs repo.

PaulRBerg avatar Jan 13 '25 12:01 PaulRBerg