feat(host-contracts): introduce coprocessor contexts logic#875
Closed
isaacdecoded wants to merge 15 commits intofeat/coprocessor_contexts_in_gatewayfrom
Closed
Conversation
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
jatZama
reviewed
Sep 19, 2025
melanciani
reviewed
Sep 23, 2025
melanciani
reviewed
Sep 23, 2025
melanciani
reviewed
Sep 23, 2025
melanciani
reviewed
Sep 23, 2025
9e66fa1 to
35e30cc
Compare
6a7d736 to
89f17d7
Compare
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
melanciani
requested changes
Oct 6, 2025
Contributor
melanciani
left a comment
There was a problem hiding this comment.
great !! made several comments, mostly to align the logic and names with what has been done in the gateway PR !
melanciani
reviewed
Oct 6, 2025
melanciani
reviewed
Oct 6, 2025
29b4ec8 to
0bb20fb
Compare
0bb20fb to
390c08a
Compare
…ate and signers mapping
3101161 to
d9253bd
Compare
melanciani
reviewed
Oct 10, 2025
| } | ||
|
|
||
| // Activate the initial context. | ||
| _activateContext(1, initialCoprocessorSigners); |
Contributor
There was a problem hiding this comment.
no this is wrong : someone might deploy the contract one day in the future and the contextId might be much greater in the gateway : the contextId should be an input to initializeFromEmptyProxy
only reinitializeV2 should not consider it, as it will be used only to upgrade the preivous version (without context) to the new one (so with initial context)
melanciani
requested changes
Oct 10, 2025
Contributor
melanciani
left a comment
There was a problem hiding this comment.
great work ! have one request changes that needs to be addressed
Contributor
Author
|
Outdated implementation. |
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.
This PR introduces two types of coprocessor contexts into the InputVerifier contract: active and suspended. The active context is always present and initialized during the contract deployment. The suspended one is always the contextId being replaced when calling the
addNewContextAndSuspendCurrentOne, and it could be "removed" by setting it into a deactivated state.On the other hand, the signers set is now retrieved based on a given coprocessorContextId, which must match the currently stored active or suspended contexts.
Closes https://github.com/zama-ai/fhevm-internal/issues/112