feat(coprocessor): add copro context ID for input proofs#890
Merged
dartdart26 merged 1 commit intofeat/coprocessor_contexts_in_gatewayfrom Sep 25, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a coprocessor context ID in the verification proof system. It introduces a new uint256 context ID field that flows from the Solidity contract event through the gateway listener and into the transaction sender for signing verification proofs.
- Adds
coprocessorContextIdfield to theVerifyProofRequestevent andCiphertextVerificationstruct - Updates database schema to store the context ID as BYTEA
- Modifies the gateway listener to capture and store the context ID from blockchain events
Reviewed Changes
Copilot reviewed 6 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| InputVerification.sol | Adds coprocessorContextId field to event and contract with default value of 7 |
| gw_listener.rs | Updates database insertion to include coprocessor context ID |
| verify_proof.rs | Adds coprocessorContextId to CiphertextVerification struct and database query |
| 20250924120045_verify_proofs_coprocessor_context_id.sql | Adds new BYTEA column for context ID storage |
| gw_listener_tests.rs | Updates test to verify context ID is properly stored |
| verify_proof_tests.rs | Removes duplicate CiphertextVerification struct definition |
Files not reviewed (15)
- coprocessor/fhevm-engine/gw-listener/.sqlx/query-989cdc420a832541b7df7be83086f6b78eb1966540df01871b27fe8383c0d52e.json: Language not supported
- coprocessor/fhevm-engine/gw-listener/.sqlx/query-a06d342308b9f63791f9fdfc1568b351137d9561c952cceb0eb1fdf66c33c59d.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-048212909e0bbe46633e404235d2c5cffb5284903adb757b4fda59b7fbe81d57.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-09f4bb2ed7df17aa0305c7fb88e87473e5be704202eb8f2fa571d47a4f98b7af.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-556dbda2415973bd6d94b8455eeae8cb8e4e177cd72376a7acad880eef60e419.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-5631176c0419193e1007788434d8786ea0872b263ad07a2c7c205a8b04d041b8.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-92524ec746c5f2a7dd986cacd005d98d68a8fe112f1e8310c3a78e4e208dcd39.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-9d468cb6afef82b0206d4498ad03759ef15cf64f2da3fd3d3484b6dd74467e4a.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-a3581b82aa78344b06e4270d0aec5ac76c2d0fa1661c1502600852450d92fe8a.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-ad702e3febf9f7dea99259e19f36b7da23fc42f7363e1f9f29d15f7d94e8fe56.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-b5b633e5812b7396037e2ab0a1db9a1d753b8650ed3367681ba30ed426799502.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-b7d5ed966527dfc500ce529e0249d96c058a06c18a02ed117ad2f4140fbc470f.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-be2b163e885ff2e4df27ae07c51f8c304f534b50565504a96bd63ce63a6179d7.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-eadec222d0154713dc15ea7ba1e113ae7838d935e4462421fd796f5f7986dbbd.json: Language not supported
- coprocessor/fhevm-engine/transaction-sender/.sqlx/query-f77c171e5206860291e8d884535b3bf1989a40fb31f8df696e46da68ed6b8231.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...fhevm-engine/db-migration/migrations/20250924120045_verify_proofs_coprocessor_context_id.sql
Outdated
Show resolved
Hide resolved
cec1a8a to
85c3f94
Compare
Add support for a separate uin256 context ID in the event listened to by the gw-listener and using it to sign a `CiphertextVerification` in transaction-sender. Related to #211
85c3f94 to
7e46c22
Compare
980ecf5
into
feat/coprocessor_contexts_in_gateway
108 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for a separate uin256 context ID in the event listened to by the gw-listener and using it to sign a
CiphertextVerificationin transaction-sender.Related to #211