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

[Milestone] Refactoring the Verification Flow #1665

Open
1 of 7 tasks
kuzdogan opened this issue Sep 25, 2024 · 0 comments · May be fixed by #1845
Open
1 of 7 tasks

[Milestone] Refactoring the Verification Flow #1665

kuzdogan opened this issue Sep 25, 2024 · 0 comments · May be fixed by #1845
Assignees

Comments

@kuzdogan
Copy link
Member

kuzdogan commented Sep 25, 2024

While rethinking the verification flow we should keep in mind the following features:

  • Multiple languages support: we recently added Vyper support. The new verification flow should abstract away the language of the contract
  • Not focused on metadata: we need a “std-json based” verification. Metadata should be an opt-in feature, not the foundation of the verification flow. We should also consider support for alternatives such as Vyper's integrity field.
  • Compiler package: we already extracted the compilers code from lib-sourcify. But we are not shipping the compiler code in any package. We need to maintain a new package @ethereum-sourcify/compilation.
  • APIV2: it is important to keep in mind all the new fields needed by APIV2. Also, the new verification flow will be executed in an async environment by the server, but it will probably doesn't affect much the architecture of the new verification.

@kuzdogan is currently suggesting the following new structure:

1. Validation step

  • 📋MetadataContract object
    • previously CheckedContract and validate.ts
    • Does the validation, source fetching, preparing the compilation with the metadata.json, tryToFindPerfectMetadata()
    • input:
      • metadata.json
      • sources
    • creates:
      • ⚙️Compilation object
  • MetadataValidation
  • IntegrityValidation

2. Compilation step

  • ⚙️Compilation object:
    • input:
      • std-json
      • ISolidityCompiler / IVyperCompiler
      • contract identifier (for the output)
    • compile()
      • output:
        • creationBytecode
        • runtimeBytecode
        • metadata
        • other compilation artifacts
        • compilation metadata: duration, hardware?
  • SolidityCompilation
  • VyperCompilation

3. Verification step

  • ✔Verification object
    • input:
      • SourcifyChain / chainId
      • address
      • ⚙️Compilation
    • output:
      • match status
      • transformations
      • ⚙️Compilation properties
    • Other things like findAuxdataPositions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

Successfully merging a pull request may close this issue.

1 participant