Skip to content

feat(coprocessor): add copro context ID for input proofs#890

Merged
dartdart26 merged 1 commit intofeat/coprocessor_contexts_in_gatewayfrom
petar/uint256_context_id_in_copro
Sep 25, 2025
Merged

feat(coprocessor): add copro context ID for input proofs#890
dartdart26 merged 1 commit intofeat/coprocessor_contexts_in_gatewayfrom
petar/uint256_context_id_in_copro

Conversation

@dartdart26
Copy link
Copy Markdown
Collaborator

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

@dartdart26 dartdart26 self-assigned this Sep 24, 2025
@cla-bot cla-bot bot added the cla-signed label Sep 24, 2025
Copy link
Copy Markdown

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 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 coprocessorContextId field to the VerifyProofRequest event and CiphertextVerification struct
  • 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.

Copy link
Copy Markdown
Contributor

@melanciani melanciani left a comment

Choose a reason for hiding this comment

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

looks good to me !

@dartdart26 dartdart26 force-pushed the petar/uint256_context_id_in_copro branch 2 times, most recently from cec1a8a to 85c3f94 Compare September 25, 2025 11:40
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
@dartdart26 dartdart26 force-pushed the petar/uint256_context_id_in_copro branch from 85c3f94 to 7e46c22 Compare September 25, 2025 13:43
@dartdart26 dartdart26 merged commit 980ecf5 into feat/coprocessor_contexts_in_gateway Sep 25, 2025
108 checks passed
@dartdart26 dartdart26 deleted the petar/uint256_context_id_in_copro branch September 25, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants