Skip to content

Draft and discuss schema changes for VerA v2 #30

@marcocastignoli

Description

@marcocastignoli

This issue serves as a collaborative space to draft and discuss proposed updates for the VerA schema v2.

Proposed changes:

  1. Handle better verifications from same verifier but with different version: There are cases in which for the same compilation_id and deployment_id, a more recent version of the same verifier can find a better verified_contract. This cases are not currently supported by VerA because we follow the policity "always insert, never update" and the better entries are in conflicts with existing verified_contracts's unique constraint. Read more here: Find a solution for UNIQUE constraint blocking re‑verification of contracts originally verified by a buggy Sourcify server argotorg/sourcify#2089
  2. Add code.keccak_normalized_code, so it will be possible to compare similar bytecodes with the same executional bytecodes but different immutables, libraries, auxdata, constructor arguments, ecc..
  3. Add additional_input column to compiled_contracts, see Add new additional_input field in VerA argotorg/sourcify#2001
  4. Consider adding a proxy_info table: Integrate proxy detection into the verification flow argotorg/sourcify#1712
  5. Consider adding platform binaries to compiled_contracts: (e.g. linux, darwin) Input validation in APIv2 preventing from verifying Vyper versions lower than 0.3.2 argotorg/sourcify#2247 (comment)
  6. Duplicate verifications by different verifiers: Add created_by to the unique constraint of verified_contracts such that the same verification can be added by multiple verifiers.

Blocked by

Adding migrations to verifier-alliance/database-specs. we should maintain migrations to better support schema upgrades. See #31 Done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions