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

Add GET /v2/verify/{verificationId} endpoint #1913

Merged
merged 9 commits into from
Feb 19, 2025
Merged

Conversation

manuelwedler
Copy link
Contributor

Closes #1831

@kuzdogan
Copy link
Member

Note: We'd need to run the BIGSERIAL to BIGINT conversion command on the databases?

Copy link
Member

@marcocastignoli marcocastignoli left a comment

Choose a reason for hiding this comment

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

Looks great, I have some comments. I also have a doubt regarding "v1" verifications. Do we want to create a "fake" verification jobs also for them?I think it makes sense:

If we don't implement verification_jobs for old APIs, we will have a lot of contracts that don't have verification_jobs information (such as compilation_time). And in general it feels wrong to have this discrepancy in our database. @kuzdogan please leave here also your opinion about this

@marcocastignoli marcocastignoli self-assigned this Feb 12, 2025
@manuelwedler
Copy link
Contributor Author

manuelwedler commented Feb 18, 2025

To summarize our yesterday's discussion, I will add the following fields to the API (also in Stoplight):

  • recompiledCreationCode
  • recompiledRuntimeCode
  • onchainCreationCode
  • onchainRuntimeCode
  • creatorTransactionHash
  • compilationTime

Copy link
Member

@marcocastignoli marcocastignoli left a comment

Choose a reason for hiding this comment

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

lgtm

@manuelwedler manuelwedler merged commit 23cb7ba into apiv2 Feb 19, 2025
6 checks passed
@manuelwedler manuelwedler deleted the apiv2-job-endpoint branch February 19, 2025 11:51
manuelwedler added a commit that referenced this pull request Mar 3, 2025
* Move API v2 related methods to bottom of SourcifyDatabaseService

* Remove status column from verification_jobs table

The status can be implicitly derived and is not needed for the API response

* Turn id of verification_jobs table into a uuid

* Add GET /v2/verify/{verificationId} endpoint

* Add tests for get job endpoint

* Add onchain bytecodes to verification_jobs_ephemeral table

* Update API v2 specs

* Make compilation_time a bigint

* Add compilationTime, bytecodes and creatorTransactionHash to GET job response
manuelwedler added a commit that referenced this pull request Mar 3, 2025
* Move API v2 related methods to bottom of SourcifyDatabaseService

* Remove status column from verification_jobs table

The status can be implicitly derived and is not needed for the API response

* Turn id of verification_jobs table into a uuid

* Add GET /v2/verify/{verificationId} endpoint

* Add tests for get job endpoint

* Add onchain bytecodes to verification_jobs_ephemeral table

* Update API v2 specs

* Make compilation_time a bigint

* Add compilationTime, bytecodes and creatorTransactionHash to GET job response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

3 participants