Skip to content

Refactor/dx 1614 optimize verification result table#251

Open
nicov-iov wants to merge 4 commits intodevelopfrom
refactor/DX-1614-optimize-verification-result-table
Open

Refactor/dx 1614 optimize verification result table#251
nicov-iov wants to merge 4 commits intodevelopfrom
refactor/DX-1614-optimize-verification-result-table

Conversation

@nicov-iov
Copy link
Collaborator

This pull request updates the database schema and Prisma model for the verification_result table to support more detailed contract verification metadata. The main changes include adding new columns for contract details, optimization settings, bytecode hashes, and other verification attributes, as well as introducing new indexes to improve query performance on these fields.

Schema and model enhancements for contract verification:

  • Added new columns to the verification_result table for contract name, verification date, optimization settings, compiler and EVM versions, source files, constructor arguments, deployment and runtime bytecodes and their hashes, libraries, method identifiers, remappings, IR usage, and language. [1] [2]

Performance improvements:

  • Introduced new indexes on contract_name, deployment_bytecode_hash, and runtime_bytecode_hash in the verification_result table to optimize queries involving these fields. [1] [2]

Documentation update:

  • Updated the schema version and notes in rsk-explorer-database.sql to reflect the new version (V1.2.4) and summarize the added columns and indexes.

@nicov-iov nicov-iov requested a review from Copilot March 17, 2026 20:45
@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the verification_result table and its Prisma model to store richer smart contract verification metadata (compiler/EVM settings, bytecodes/hashes, sources, etc.) and adds indexes to improve lookup performance on newly query-relevant fields.

Changes:

  • Added multiple metadata columns to verification_result in both the SQL schema and Prisma model (contract details, compilation/optimization parameters, source/ABI-related data, bytecodes and hashes).
  • Added new indexes on contract_name, deployment_bytecode_hash, and runtime_bytecode_hash to optimize common query patterns.
  • Updated the SQL schema version header and notes to V1.2.4 to document the new table shape and indexes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
prisma/schema.prisma Expands the verification_result Prisma model with new mapped columns and adds corresponding Prisma indexes.
prisma/rsk-explorer-database.sql Updates the canonical SQL schema (V1.2.4) to add the new columns and create the new indexes on verification_result.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants